3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-24 11:42:51 +01:00

automode: remove extraneous +'s from mode lists

Closes #447.
This commit is contained in:
James Lu 2017-05-12 19:41:55 -07:00
parent 04f88df385
commit 084f58b499

View File

@ -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)