| transbot: connecting to the IRC |
|
|
| Projects - transbot |
| Escrito por MDK |
| Seg, 15 de Junho de 2009 14:03 |
|
Hey guys, I'm here again, now with some code on how I do to connect to some IRC server using Python, on the Translation Bot (trully I found another bot with the same name, but I'll not change it ;p ): First, we need to add these modules: With it, we can define some constants: Cool! Right now we can connect to IRC simply doing: And now, just to enter on some channel (and identify): Now your bot is connected to the NETWOR (server) and joined on the CHANNEL that you specify. For just grab the messages on the channel, do it: And it's all for today, folks! Soon I'll post some tips on how to parse the messages grabbed from the channel. See ya! |
| Última atualização em Seg, 15 de Junho de 2009 14:48 |
Add your comment
Queremos saber...
Nós temos 38 visitantes online















