diff --git a/Module.py b/Module.py index 0579d9d..cf9ec61 100644 --- a/Module.py +++ b/Module.py @@ -140,6 +140,23 @@ class Module(object): for line in msgs: connection.privmsg(target, line) + def new_sendmsg(self,target, msg): + """Send a privmsg over IRC to target. + + This should replace Module.sendmsg() once all code has been converted. + + Args: + target destination on the network + msg the message to send + + """ + + if msg is not None: + if target is not None: + msgs = msg.split('\n') + for line in msgs: + self.irc.server.privmsg(target, line) + def save(self): """Save whatever the module may need to save. Sync files, etc.