diff options
author | David Phillips <david@sighup.nz> | 2018-09-22 00:02:33 +1200 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2018-09-22 00:02:33 +1200 |
commit | 643f065adfc79f100bddd93e8331e4e23b606d3e (patch) | |
tree | 4b2ee6fb977ec954dce20b1bf5dd1cc4dc22f055 | |
parent | 31624f13d0768ecf67fcf457fe717b5fad41f6e6 (diff) | |
download | idalius-643f065adfc79f100bddd93e8331e4e23b606d3e.tar.xz |
Admin: Allow in-channel mode without specifying channel
-rw-r--r-- | Plugin/Admin.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Plugin/Admin.pm b/Plugin/Admin.pm index c2c4f55..2bc0e19 100644 --- a/Plugin/Admin.pm +++ b/Plugin/Admin.pm @@ -128,7 +128,10 @@ sub mode { return unless is_admin($logger, $who, $ided); return "Syntax: mode <everything>" unless @arguments > 0; - # FIXME should use $where if it's a channel (?) + if (not is_channel($arguments[0] and is_channel($where->[0]))) { + $rest = "$where->[0] $rest"; + } + $irc->yield(mode => $rest); } |