Guest User

Untitled

a guest
Aug 14th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. #!/usr/bin/python
  2. import socket
  3.  
  4. arjok=1
  5. irc = socket.socket ( socket.AF_INET, socket.SOCK_STREAM )
  6. network = 'irc.euirc.net'
  7. irc.connect ( (network, 6668) )
  8. irc.send('NICK testbot002223\r\n')
  9. irc.send('USER testbot002223 testbot002223 testbot002223: testbot002223\r\n')
  10. irc.send('JOIN #s4league\r\n')
  11. print irc.recv (4096)
  12.  
  13. def pong():
  14. if income.find('PING') != -1:
  15. irc.send('PONG ' + income.split()[1] + '\r\n')
  16. def msg(x,z):
  17. irc.send ('PRIVMSG '+x +' :'+z +'\r\n')
  18. def notice(x,z):
  19. irc.send('NOTICE '+x+' :'+z+'\r\n')
  20. def join(x):
  21. irc.send('JOIN '+x+'\r\n')
  22. def part(x):
  23. irc.send('PART '+x+'\r\n')
  24. def whois(y):
  25. irc.send('WHOIS '+y+'\r\n')
  26. def kick(x,y,z):
  27. irc.send('KICK '+x+' '+y+' '+z+'\r\n')
  28. def ban(x,y):
  29. irc.send('MODE '+x+' +b '+y+'\r\n')
  30. def kickban(x,y,z):
  31. kick(x,y,z,)
  32. ban(x,y)
  33.  
  34. while True:
  35. income = irc.recv ( 4096 )
  36. pong()
  37. print income
Add Comment
Please, Sign In to add comment