Prevent doubled messages by lowering nicknames in tell plugin and adding unique constraint on to_user and message
This commit is contained in:
parent
04601fdf39
commit
f2f436e90a
@ -34,7 +34,7 @@ class Tell(DatabasePlugin):
|
||||
nick = args['<nick>'].lower()
|
||||
if nick not in self.tell_queue:
|
||||
self.tell_queue[nick] = []
|
||||
tell = [mask.nick.lower(), nick, ' '.join(args['<message>'])]
|
||||
tell = [mask.nick.lower(), nick, ' '.join(args['<message>']).strip()]
|
||||
self.tell_queue[nick].append(tell)
|
||||
self.cur.execute('insert into tells (from_user, to_user, message)'
|
||||
'values (?, ?, ?)', tell)
|
||||
|
Loading…
Reference in New Issue
Block a user