From 46cb4f9d60a1e2a1f414f726c8bc495ef02ec33c Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Wed, 11 Dec 2013 18:50:18 +0100 Subject: collection of minor updates from the live version --- modules/command.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'modules/command.pl') diff --git a/modules/command.pl b/modules/command.pl index 014e89b..dd270ea 100644 --- a/modules/command.pl +++ b/modules/command.pl @@ -28,7 +28,7 @@ sub command foreach my $command ( @{$::commands->{command}} ) { my $fail = 0; - unless ( (ASM::Util->speak($event->{to}->[0])) or (!ASM::Util->notRestricted($nick, "nocommands")) ) { + unless ( (ASM::Util->speak($event->{to}->[0])) ) { next unless (defined($command->{nohush}) && ($command->{nohush} eq "nohush")); } if (defined($command->{flag})) { #If the command is restricted, @@ -44,6 +44,9 @@ sub command } if ($cmd=~/$command->{cmd}/) { ASM::Util->dprint("$event->{from} told me: $cmd", "commander"); + if (!ASM::Util->notRestricted($nick, "nocommands")) { + $fail = 1 unless (defined($command->{nohush}) && ($command->{nohush} eq "nohush")); + } if ($fail == 1) { $conn->privmsg($nick, "You don't have permission to use that command, or you're not signed into nickserv."); } else { -- cgit v1.2.3