From 643f065adfc79f100bddd93e8331e4e23b606d3e Mon Sep 17 00:00:00 2001 From: David Phillips Date: Sat, 22 Sep 2018 00:02:33 +1200 Subject: Admin: Allow in-channel mode without specifying channel --- Plugin/Admin.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 " 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); } -- cgit v1.1