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,7 +15,8 @@ class Module(object):
for nickname, message in messages:
event["channel"].send_message("%s: <%s> %s" % (
event["user"].nickname, nickname, message))
event["channel"].del_setting(setting)
if messages:
event["channel"].del_setting(setting)
def to(self, event):
setting = "to-%s" % event["args_split"][0]