Skip to content

Instantly share code, notes, and snippets.

@mfrost503
Created May 3, 2013 16:07
Show Gist options
  • Save mfrost503/5510439 to your computer and use it in GitHub Desktop.
Save mfrost503/5510439 to your computer and use it in GitHub Desktop.
>>> import socket
>>> s=socket.socket()
>>> s.connect(("irc.freenode.net",6667))
>>> s.send("NICK :%s\r\n" % "testbot")
15
>>> s.send("USER %s %s bla :%s\r\n" % ("testbot","irc.freenode.net","testbot"))
44
>>> s.send("JOIN :%s\r\n" % "#dayly")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
socket.error: [Errno 32] Broken pipe
>>> s.send("JOIN :%s\r\n" % "#phpmentoring")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
socket.error: [Errno 32] Broken pipe
>>> s.send("JOIN :%s\r\n" % "phpmentoring")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
socket.error: [Errno 32] Broken pipe
>>> s.send("JOIN :%s\r\n" % "#dayly")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
socket.error: [Errno 32] Broken pipe
>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment