nemuspeak: factoring code with nemubot
This commit is contained in:
parent
8230ed39e9
commit
7f539c926b
3 changed files with 60 additions and 128 deletions
|
@ -229,10 +229,8 @@ class Server(threading.Thread):
|
|||
print (" Already connected.")
|
||||
|
||||
def treat_msg(self, line, private = False):
|
||||
if srv is None:
|
||||
srv = self
|
||||
try:
|
||||
msg = message.Message (srv, line, private)
|
||||
msg = message.Message (self, line, private)
|
||||
msg.treat (self.mods)
|
||||
except:
|
||||
print ("\033[1;31mERROR:\033[0m occurred during the processing of the message: %s" % line)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue