[Tutor] IRC bot

Luke Paireepinart rabidpoobear at gmail.com
Thu Sep 20 13:42:43 CEST 2007


Ulrich Holtzhausen wrote:
> शंतनु (Shantanoo) wrote:
>   
>> Instead of writing your own code for the bot, I would suggest using
>> supybot (http://supybot.com/).
>>
>> regards,
>> shantanoo
>>   
>>     
> Hey, thank you for the suggestion. I do know about supybot and phenny, 
> both are python bots. I want to get experience in some IRC parameters 
> and socks programming + I want to write it all from scratch. I'm not 
> sure how the modules work on the others. I'm still very new to this as 
> this is only my third day with python.
>   
Just read all incoming messages on the socket and dump them to an output 
file.  Then go look at it and figure out what you're receiving and how 
you can parse it.
IRC commands are generally pretty easy to parse.
Once you figure out the structure, you should be able to send stuff to 
the server in the same structure (using an online reference to find the 
commands and their corresponding arguments.)
If you don't feel like following this approach, I can just give you some 
code that listens to the IRC server and echoes everything.
But that somehow seems less fun.
-Luke


More information about the Tutor mailing list