From 084f58b49992f5af3dae171c8efff4007f7d86e4 Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 12 May 2017 19:41:55 -0700 Subject: [PATCH] automode: remove extraneous +'s from mode lists Closes #447. --- plugins/automode.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/automode.py b/plugins/automode.py index a0f723c..d129bd4 100644 --- a/plugins/automode.py +++ b/plugins/automode.py @@ -200,10 +200,10 @@ def setacc(irc, source, args): # exported easily as JSON. dbentry = db[ircobj.name+channel] - # Otherwise, update the modes as is. + modes = modes.lstrip('+') # remove extraneous leading +'s dbentry[mask] = modes log.info('(%s) %s set modes +%s for %s on %s', ircobj.name, irc.getHostmask(source), modes, mask, channel) - reply(irc, "Done. \x02%s\x02 now has modes \x02%s\x02 in \x02%s\x02." % (mask, modes, channel)) + reply(irc, "Done. \x02%s\x02 now has modes \x02+%s\x02 in \x02%s\x02." % (mask, modes, channel)) # Join the Automode bot to the channel if not explicitly told to. modebot.join(ircobj, channel)