#! /usr/bin/env python #Python IRC Raybot import sys import socket import string #### Config section #### HOST="chat.freenode.net" PORT=6667 NICK="raybot" IDENT="The Original!" REALNAME="#raybot for info" CHANNEL="#raybot" #### End Config #### irc=socket.socket() irc.connect((HOST,PORT)) irc.send("NICK %s \r\n" % NICK) irc.send("USER %s %s bla :%s\r\n" % (IDENT,HOST,REALNAME)) irc.send("JOIN %s\r\n" % CHANNEL) def privmsg(message): irc.send("PRIVMSG " + CHANNEL + " :" + message + "\r\n") #this is the main loop while 1: data=irc.recv(4096)