slight documentation and whitespace for subclassing irclib.IRC, irclib.ServerConnection
This commit is contained in:
parent
331ca77337
commit
88186e1425
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue