diff --git a/dr.botzo.py b/dr.botzo.py index e705886..e50f500 100644 --- a/dr.botzo.py +++ b/dr.botzo.py @@ -27,13 +27,20 @@ modlist = [] moduleList = [ "Countdown", "Dice", "IrcAdmin", "GoogleTranslate", "Seen", "FactFile" ] modObjs = [] +# DrBotServerConnection subclasses irclib's ServerConnection, in order to expand +# privmsg. + class DrBotServerConnection(irclib.ServerConnection): + def privmsg(self, target, text): # Send a PRIVMSG command. # TODO: length limiting or splitting self.send_raw("PRIVMSG %s :%s" % (target, text)) +# DrBotIRC subclasses irclib's IRC, in order to create a DrBotServerConnection. + class DrBotIRC(irclib.IRC): + def server(self): c = DrBotServerConnection(self) self.connections.append(c)