Fix PONG response when no registered input treatment
This commit is contained in:
parent
b0e457ffc9
commit
c32f1579ee
@ -118,11 +118,14 @@ class MessageConsumer:
|
||||
|
||||
self.responses = list()
|
||||
for msg in self.msgs:
|
||||
for h in hm.get_hooks("in", msg.cmd, msg.qual):
|
||||
# TODO: should be placed in server hooks
|
||||
if msg.cmd == "PING":
|
||||
self.srv.write("%s :%s" % ("PONG", msg.params[0]))
|
||||
|
||||
elif h.match(message=msg, server=self.srv):
|
||||
else:
|
||||
for h in hm.get_hooks("in", msg.cmd, msg.qual):
|
||||
|
||||
if h.match(message=msg, server=self.srv):
|
||||
res = h.run(msg)
|
||||
if isinstance(res, list):
|
||||
self.responses += res
|
||||
|
Loading…
Reference in New Issue
Block a user