Commits

WaveHack committed b6ef8cb

Fixed ignore module where its commands could be invoked without authorization.

Comments (0)

Files changed (1)

 	my ($bot, $message) = @_;
 
 	return unless ($message->{body} =~ /^!ignore (.+)/);
-	return if ($bot->moduleActive('auth') && !$bot->module('auth')->authorizationLevel($message->{raw_nick}) >= 7);
+	return if ($bot->moduleActive('auth') && !$bot->module('auth')->checkAuthorization($bot, $message, 7));
 
 	my $host = $1;
 
 	my ($bot, $message) = @_;
 
 	return unless ($message->{body} =~ /^!unignore (.+)/);
-	return if ($bot->moduleActive('auth') && !$bot->module('auth')->authorizationLevel($message->{raw_nick}) >= 7);
+	return if ($bot->moduleActive('auth') && !$bot->module('auth')->checkAuthorization($bot, $message, 7));
 
 	my $host = $1;
 
 	my ($bot, $message) = @_;
 
 	return unless ($message->{body} =~ /^!(list )?ignored/);
-	return if ($bot->moduleActive('auth') && !$bot->module('auth')->authorizationLevel($message->{raw_nick}) >= 7);
+	return if ($bot->moduleActive('auth') && !$bot->module('auth')->checkAuthorization($bot, $message, 7));
 
 	my $ignoredlist = join("', '", @ignored);
 	if ($ignoredlist eq '') {