spacepaste

  1.  
  2. from socket import *
  3. s = socket(AF_INET,SOCK_STREAM)
  4. s.connect(("irc.freenode.net",6667))
  5. user = "BOTUSER"
  6. channel = "#mtmt"
  7. message = "Hello!"
  8. s.send("USER "+user+" "+user+" "+user+" "+user+"\n")
  9. s.send("NICK "+user+"\n")
  10. s.send("JOIN "+channel+"\n")
  11. while 1:
  12. msg = s.recv(1024)
  13. print (msg)
  14.