diff options
| author | 2020-02-21 15:43:52 +0000 | |
|---|---|---|
| committer | 2020-02-21 15:43:52 +0000 | |
| commit | fe4972bc03a3484ed4b5bf898040307c69be3d78 (patch) | |
| tree | 3a8161614d8ba1bd3d355c5e0f81d36895c69d37 /modules/channel_op.py | |
| parent | security issue: 'permissions'->'permission' (message_filters.py) (diff) | |
| signature | ||
update channel_op.py ban formatting to use ${}
Diffstat (limited to 'modules/channel_op.py')
| -rw-r--r-- | modules/channel_op.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/channel_op.py b/modules/channel_op.py index c4a8cc11..144b2aea 100644 --- a/modules/channel_op.py +++ b/modules/channel_op.py @@ -12,23 +12,23 @@ QUIET_METHODS = { } KICK_REASON = "your behavior is not conducive to the desired environment" - NO_QUIETS = "This network doesn't support quiets" KICK_REASON_SETTING = utils.Setting("default-kick-reason", "Set the default kick reason", example="have a nice trip") +BAN_FORMATTING = "${n} = nick, ${u} = username, ${h} = hostname, ${a} = account" @utils.export("channelset", utils.Setting("ban-format", - "Set ban format ($n = nick, $u = username, $h = hostname, $a = account)", + "Set ban format (%s)" % BAN_FORMATTING, example="*!${u}@${h}")) - example="*!$u@$h")) @utils.export("channelset", utils.Setting("ban-format-account", - "Set ban format for users with accounts " - "($n = nick, $u = username, $h = hostname, $a = account)", example="~a:$a")) + "Set ban format for users with accounts (%s)" % BAN_FORMATTING, + example="~a:${a}")) @utils.export("serverset", utils.OptionsSetting( list(QUIET_METHODS.keys())+["none"], "quiet-method", "Set this server's method of muting users")) + @utils.export("botset", KICK_REASON_SETTING) @utils.export("serverset", KICK_REASON_SETTING) @utils.export("channelset", KICK_REASON_SETTING) @@ -82,7 +82,7 @@ class Module(ModuleManager.BaseModule): if not account_format == None: return self._format_hostmask(user, account_format) - format = channel.get_setting("ban-format", "*!$u@$h") + format = channel.get_setting("ban-format", "*!${u}@${h}") return self._format_hostmask(user, format) def _ban(self, channel, masks, time, add): |
