Advertisement
Shiny_

rzal i bul

Apr 20th, 2014
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.10 KB | None | 0 0
  1. # -*- coding: cp1250 -*-
  2. import socket, time
  3.  
  4. nick = "Lunux_"
  5. password = "LMAO"
  6. debug = True
  7. network = "irc.pirc.pl"
  8. port = 6667
  9.  
  10. if debug == True:
  11.     chan = "#testingchannel"
  12. elif debug == False:
  13.     chan = "#mirkofm"
  14.  
  15. irc = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  16. irc.connect((network, port))
  17. irc.recv(4096)
  18. irc.send("NICK " + nick + "\r\n\
  19.          USER " + nick + " " + nick + " " + nick + " :PIRC.pl\r\n")
  20. #irc.send("PRIVMSG NICKSERV IDENTIFY " + password + "\r\n\
  21.           #MODE +i+w\r\n\
  22.           #JOIN " + chan + "\r\n"
  23. #)
  24. # irc.send("PRIVMSG " + chan + " :no kurwa wreszcie XD\r\n")
  25.  
  26. while True:
  27.     data = irc.recv(4096).decode("UTF-8")
  28.     print(data)
  29.  
  30.     if data.find("PING") != -1:
  31.         irc.send("PONG " + data.split()[1] + "\r\n")
  32.  
  33.     if data.find("limit sesji") != -1:
  34.         irc.send("/quit")
  35.         exit()
  36.  
  37.     if data.find("nick nie jest zarejestrowany") or data.find("Ten nick jest zarejestrowany i chroniony") != -1:
  38.         irc.send("PRIVMSG NICKSERV IDENTIFY " + password + "\r\n\
  39.          MODE +i+w\r\n\
  40.          JOIN " + chan + "\r\n")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement