use ban-format for mute masks
This commit is contained in:
parent
7549c0f998
commit
f59b161fbd
1 changed files with 4 additions and 3 deletions
|
@ -168,8 +168,8 @@ class Module(ModuleManager.BaseModule):
|
||||||
def tappend(self, event):
|
def tappend(self, event):
|
||||||
event["target"].send_topic(event["target"].topic + event["args"])
|
event["target"].send_topic(event["target"].topic + event["args"])
|
||||||
|
|
||||||
def _mute_method(self, server, user):
|
def _mute_method(self, server, channel, user):
|
||||||
mask = "*!*@%s" % user.hostname
|
mask = self._get_hostmask(channel, user)
|
||||||
mute_method = server.get_setting("mute-method", "qmode").lower()
|
mute_method = server.get_setting("mute-method", "qmode").lower()
|
||||||
|
|
||||||
if mute_method == "qmode":
|
if mute_method == "qmode":
|
||||||
|
@ -201,7 +201,8 @@ class Module(ModuleManager.BaseModule):
|
||||||
if not event["target"].has_user(target_user):
|
if not event["target"].has_user(target_user):
|
||||||
raise utils.EventError("No such user")
|
raise utils.EventError("No such user")
|
||||||
|
|
||||||
mode, mask = self._mute_method(event["server"], target_user)
|
mode, mask = self._mute_method(event["server"], event["target"],
|
||||||
|
target_user)
|
||||||
if mode == None:
|
if mode == None:
|
||||||
raise utils.EventError("This network doesn't support mutes")
|
raise utils.EventError("This network doesn't support mutes")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue