aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/channel_op.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/channel_op.py b/modules/channel_op.py
index 40f7891a..ff200d61 100644
--- a/modules/channel_op.py
+++ b/modules/channel_op.py
@@ -11,7 +11,7 @@ KICK_REASON_SETTING = utils.Setting("default-kick-reason",
"Set the default kick reason", example="have a nice trip")
@utils.export("channelset", utils.Setting("ban-format",
- "Set ban format ($n = nick, $u = username, $h = hostname)",
+ "Set ban format ($n = nick, $u = username, $h = hostname, $a = account)",
example="*!$u@$h"))
@utils.export("serverset", utils.OptionsSetting(
["qmode", "insp", "unreal", "none"], "mute-method",
@@ -56,8 +56,10 @@ class Module(ModuleManager.BaseModule):
event["args_split"][1:])
def _format_hostmask(self, user, s):
- return s.replace("$n", user.nickname).replace("$u", user.username
- ).replace("$h", user.hostname)
+ return (s.replace("$n", user.nickname)
+ .replace("$u", user.username)
+ .replace("$h", user.hostname)
+ .replace("$a", user.get_identified_account()))
def _get_hostmask(self, channel, user):
format = channel.get_setting("ban-format", "*!$u@$h")
hostmask_split = [