Really, there's very little that's actually IRC-specific in an IRC bot. There's the backend, and that's it. The rest of the bot (can be) almost totally oblivious to what the backend actually is, as long as it's kind of IRC-like.
Come up with an abstraction for backends which:
Are message-oriented
Have a notion of channels
Are read/write
The job of a concrete backend implementation would be:
To transform incoming messages into a form the bot can deal with, and pass them along.
To transform outgoing messages into a form the backend can deal with, and pass them along.
To automatically handle control messages (pings, etc).
To detect and resolve failures (disconnects).
To facilitate joining and leaving channels.
To most easily support different types of backend, the only configuration should be some sort of connection dictionary.
Furthermore, it should be possible for multiple backends to be executing simultaneously.
Really, there's very little that's actually IRC-specific in an IRC bot. There's the backend, and that's it. The rest of the bot (can be) almost totally oblivious to what the backend actually is, as long as it's kind of IRC-like.
Come up with an abstraction for backends which:
The job of a concrete backend implementation would be:
To most easily support different types of backend, the only configuration should be some sort of connection dictionary.
Furthermore, it should be possible for multiple backends to be executing simultaneously.