fix _ban looking for user instead of cuser, fix kickban _kick arg

This commit is contained in:
jesopo 2020-01-26 15:46:42 +00:00
parent 223fe9fc7c
commit e26d8c5536

View file

@ -71,7 +71,7 @@ class Module(ModuleManager.BaseModule):
return self._format_hostmask(user, format) return self._format_hostmask(user, format)
def _ban(self, server, channel, target, allow_hostmask, time, add): def _ban(self, server, channel, target, allow_hostmask, time, add):
if target[0] == "user": if target[0] == "cuser":
hostmask = self._get_hostmask(channel, target[1]) hostmask = self._get_hostmask(channel, target[1])
else: else:
if not allow_hostmask: if not allow_hostmask:
@ -120,7 +120,7 @@ class Module(ModuleManager.BaseModule):
def kickban(self, event): def kickban(self, event):
self._ban(event["server"], event["spec"][0], event["spec"][2], self._ban(event["server"], event["spec"][0], event["spec"][2],
False, event["spec"][1], True) False, event["spec"][1], True)
self._kick(event["server"], event["spec"][0], event["spec"][2], self._kick(event["server"], event["spec"][0], event["spec"][2][1],
event["spec"][3]) event["spec"][3])
@utils.hook("received.command.op") @utils.hook("received.command.op")