This commit is contained in:
Pratyush Desai 2021-08-06 04:38:53 +05:30
parent 9607ee7cad
commit fc34ba12f0
Signed by: pratyush
GPG Key ID: DBA5BB7505946FAD

View File

@ -231,15 +231,16 @@ class EgoServ(callbacks.Plugin):
flag = '-a' flag = '-a'
elif mode == 'deop': elif mode == 'deop':
flag = '-o' flag = '-o'
else:
irc.error(f'Supplied mode {mode} is not allowed/valid')
for nick in nicks: for nick in nicks:
irc.queueMsg(msg=ircmsgs.IrcMsg(command='PRIVMSG', irc.queueMsg(msg=ircmsgs.IrcMsg(command='PRIVMSG',
args=('chanserv', f'amode {channel} {flag} {nick}'))) args=('chanserv', f'amode {channel} {flag} {nick}')))
else:
irc.error(f'Supplied mode {mode} is BAD INPUT!')
# Would love to handle responses for when it's not an account, # Would love to handle responses for when it's not an account,
# https://github.com/ergochat/ergo/issues/1515 Waiting for this. # https://github.com/ergochat/ergo/issues/1515 Waiting for this.
irc.replySuccess(f'Setting mode {flag} on given nick(s), if nick(s) weren\'t given the {flag} mode it/they is/are unregistered') irc.replySuccess(f'= Auto {flag} applied to \x02registered\x0F nicks!')
@wrap([many('channel')]) @wrap([many('channel')])
def chanreg(self, irc, msg, args, channels): def chanreg(self, irc, msg, args, channels):