Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- import sys
- import socket, ssl
- import string
- import re
- import web
- SERVER="ssl://irc.psych0tik.net"
- PORT="6697"
- CHANNEL="#hbh"
- NICK="Lugi"
- IDENT="lugi"
- REALNAME="LUGI"
- readbuffer=""
- s=socket.socket(socket.AF_INET, socket.SOCK_STREAM )
- sslSocket = ssl.wrap_socket
- s.connect(('irc.psych0tik.net', 6697))
- s.send("NICK %s\r\n" % "Lugi")
- s.send("USER %s %s bla :%s\r\n" % (("lugi", "irc.psych0tik.net", "Lugi"))
- s.send('JOIN %s \r\n' % '#hbh')
- while 1:
- readbuffer=readbuffer+s.recv(1024)
- temp=string.split(readbuffer, "\n")
- readbuffer=temp.pop( )
- for line in temp:
- line=string.rstrip(line)
- line=string.split(line)
- if(line[0]=="PING"):
- s.send("PONG %s\r\n" % line[1])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement