From 7ea23cad4c72904b02ad5c359f5edfab8328268d Mon Sep 17 00:00:00 2001 From: William Heimbigner Date: Thu, 28 Jun 2007 21:13:35 +0000 Subject: memleak fix, better nick tracking, new commands, major security exploit fix --- modules/command.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/command.pl') diff --git a/modules/command.pl b/modules/command.pl index 87c768f..41d65fb 100644 --- a/modules/command.pl +++ b/modules/command.pl @@ -14,7 +14,7 @@ sub do_command if (defined($command->{flag})) { next unless defined($::xusers->{$nick}); next unless defined($::xusers->{$nick}->{flags}); - next unless defined(grep {$_ eq $command->{flag}} split('', $::xusers->{$nick}->{flags})); + next unless (grep {$_ eq $command->{flag}} split('', $::xusers->{$nick}->{flags})); if ($::xusers->{$nick}->{host} ne 'IDENTIFY') { next unless leq($::xusers->{$nick}->{host}, $event->{host}); } @@ -22,7 +22,7 @@ sub do_command if ( $cmd =~ /$command->{cmd}/ ){ push (@{$::idqueue{$nick}}, [$cmd, $command, $event]); $conn->sl("whois $nick $nick"); - next; + last; } } } @@ -30,6 +30,7 @@ sub do_command print "$event->{from} told me: $cmd \n"; eval $command->{content}; warn $@ if $@; + last; } } } -- cgit v1.2.3