only try to delete !to messages when there are any

This commit is contained in:
jesopo 2018-08-05 11:42:40 +01:00
parent 558b368b1a
commit f143169cb5

View file

@ -15,6 +15,7 @@ class Module(object):
for nickname, message in messages: for nickname, message in messages:
event["channel"].send_message("%s: <%s> %s" % ( event["channel"].send_message("%s: <%s> %s" % (
event["user"].nickname, nickname, message)) event["user"].nickname, nickname, message))
if messages:
event["channel"].del_setting(setting) event["channel"].del_setting(setting)
def to(self, event): def to(self, event):