SHARE
TWEET

Untitled

a guest Feb 21st, 2020 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import socket, ssl
  2. sock = ssl.wrap_socket( socket.socket( socket.AF_INET, socket.SOCK_STREAM ) )
  3. sock.connect(( "irc.blackcatz.org", 6697 ))
  4. sock.send( "USER golfbot golfbot golfbot :trying to make a tiny bot\r\nNICK golfbot\r\n" )
  5. while True:
  6.     data = sock.recv( 1024 )
  7.     if data.find( "396" ) != -1:
  8.         sock.send( "JOIN #blackcatz\r\n" )
  9.     if data.find( "PING" ) != -1:
  10.         sock.send( "PONG {}\r\n".format( data.split()[1] ) )
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