find "word" type, not cuser (because i can be 'user')
This commit is contained in:
parent
2f5e2a8345
commit
174f0070ff
1 changed files with 3 additions and 3 deletions
|
@ -71,12 +71,12 @@ 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] == "cuser":
|
if target[0] == "word":
|
||||||
hostmask = self._get_hostmask(channel, target[1])
|
|
||||||
else:
|
|
||||||
if not allow_hostmask:
|
if not allow_hostmask:
|
||||||
raise utils.EventError("No such user")
|
raise utils.EventError("No such user")
|
||||||
hostmask = target[1]
|
hostmask = target[1]
|
||||||
|
else:
|
||||||
|
hostmask = self._get_hostmask(channel, target[1])
|
||||||
|
|
||||||
if not add:
|
if not add:
|
||||||
channel.send_unban(hostmask)
|
channel.send_unban(hostmask)
|
||||||
|
|
Loading…
Reference in a new issue