tags:

views:

417

answers:

2

alright, so im making an irc bot, and im wondering a few ways that i could create a connection class, so that i can connect to multiple networks, i have it connecting to one server, i just dont know how to make that into a way to connect to more than one.

basically my question is: how can i take the current bot i wrote, rewrite it, with a connection class that can be reused to make multiple connections.

A: 

This doesn't feel like much of an answer, but aside from rolling your own, I've played with Smart4Irc and it seems pretty good.

opello
A: 

It's hard to say without knowing what your bot's like - after all, there are any number of ways to write a bot.

That said, what I would do, is isolate all your per-connection logic into a certain set of classes, all controlled from a Connection class. Then have a bit of core logic that fires up multiple Connection classes. After that, you just have to deal with the issue of communicating between them when necessary (depending on what your bot does, this may not be needed at all)

bdonlan