[Tutor] IRC bot
Kent Johnson
kent37 at tds.net
Thu Sep 20 14:24:22 CEST 2007
Ulrich Holtzhausen wrote:
> I recently used the existing codebase of a very very simple IRC bot of
> which is in one of O'Reilly's books. I modified it a bit and added the
> NICK properties etc. and I was able to get it to join the server and my
> IRC channel. However I'd like to know how can I get it to print to
> screen what's happening in the channel, because it only prints that it's
> connecting to the network and that it's connected. I want it to show the
> MOTD etc. of the server.
> while 1:
> readbuffer=readbuffer+s.recv(1024)
> temp=string.split(readbuffer, "\n")
> readbuffer=temp.pop( )
>
> for line in temp:
I think you want
print line
here.
Kent
More information about the Tutor
mailing list