Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- import socket
- arjok=1
- irc = socket.socket ( socket.AF_INET, socket.SOCK_STREAM )
- network = 'irc.euirc.net'
- irc.connect ( (network, 6668) )
- irc.send('NICK testbot002223\r\n')
- irc.send('USER testbot002223 testbot002223 testbot002223: testbot002223\r\n')
- irc.send('JOIN #s4league\r\n')
- print irc.recv (4096)
- def pong():
- if income.find('PING') != -1:
- irc.send('PONG ' + income.split()[1] + '\r\n')
- def msg(x,z):
- irc.send ('PRIVMSG '+x +' :'+z +'\r\n')
- def notice(x,z):
- irc.send('NOTICE '+x+' :'+z+'\r\n')
- def join(x):
- irc.send('JOIN '+x+'\r\n')
- def part(x):
- irc.send('PART '+x+'\r\n')
- def whois(y):
- irc.send('WHOIS '+y+'\r\n')
- def kick(x,y,z):
- irc.send('KICK '+x+' '+y+' '+z+'\r\n')
- def ban(x,y):
- irc.send('MODE '+x+' +b '+y+'\r\n')
- def kickban(x,y,z):
- kick(x,y,z,)
- ban(x,y)
- while True:
- income = irc.recv ( 4096 )
- pong()
- print income
Add Comment
Please, Sign In to add comment