daily pastebin goal
11%
SHARE
TWEET

Untitled

a guest May 17th, 2018 92 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import socket
  2.  
  3. network = 'chaos.esper.net'
  4. port = 5555
  5. irc = socket.socket( socket.AF_INET, socket.SOCK_STREAM )
  6. irc.connect ( ( network, port ) )
  7. print irc.recv ( 4096 )
  8. irc.send ( 'NICK rcxbot\r\n' )
  9. irc.send ( 'USER rcxbot rcxbot jaybot :Jaycows Bot\r\n' )
  10. irc.send ( 'JOIN #HCSMP\r\n' )
  11. irc.send ( 'PRIVMSG #HCSMP :Yo dawg!\r\n' )
  12. while True:
  13.       data = irc.recv ( 4096 )
  14.       if data.find ( 'PING' ) != -1:
  15.          irc.send ( 'PONG ' + data.split() [ 1 ] + '\r\n' )
  16.       if data.find ( 'JOIN' ) != -1:
  17.          print ('joining!')
  18.          irc.send ( 'JOIN #HCSMP\r\n' )
  19.          irc.send ( 'PRIVMSG #HCSMP :Yo dawg!\r\n' )
  20.       if data.find ( '!rcxbot quit' ) != -1:
  21.          irc.send ( 'PRIVMSG #HCSMP :okay.jpg, I will leave\r\n' )
  22.          irc.send ( 'QUIT\r\n' )
  23.       print data
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top