SHARE
TWEET

Untitled

a guest May 19th, 2017 36 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from sockets import sockets
  2. class IRC_functions(sockets):
  3.     def __init__(self):
  4.         self.connect((server,port))
  5.         self.nick()
  6.         self.user
  7.        
  8.     nick ="b00tii"
  9.     server ="irc.ninthbit.net"
  10.     port = 6667
  11.     _feedback = self.recv(4096)
  12.     def getfeedback():
  13.         self.feedback = self.recv(4096)
  14.  
  15.     def nick(nick = self.nick)
  16.         self.send("NICK" + nick)
  17.  
  18.     def user(nick = self.nick)
  19.         self.send("USER" + nick + "* * : " + nick)
  20.  
  21.     def pingpong(self):
  22.         if self._feedback.find ( 'PING' ) != -1:
  23.             self.send( 'PONG ' + data.split() [ 1 ] + '\r\n' )
  24.     def join(self, channel):
  25.         self.send("JOIN " + channel)
  26.  
  27.     def part(self, channel, message=""):
  28.         self.send("PART "+ channel + " " + message)
  29.  
  30.     def message(self, channel, message):
  31.         self.send("PRIVMSG " + channel + " :" + message)
  32.  
  33.     def ctcp(self, user, message):
  34.         self.message(user, "\001" + message + "\001")
  35.  
  36.     def action(self, channel, message):
  37.         self.ctcp(channel, "ACTION" + message)
  38.  
  39.     def mode(self, channel, mode, flags=""):
  40.         self.send("MODE " + channel + mode + " " + flags)
  41.  
  42.     def kick(self, channel, reason=""):
  43.         self.send("KICK" + channel + " " + reason)
RAW Paste Data
Top