diff options
| author | 2007-06-28 21:13:35 +0000 | |
|---|---|---|
| committer | 2007-06-28 21:13:35 +0000 | |
| commit | 7ea23cad4c72904b02ad5c359f5edfab8328268d (patch) | |
| tree | a0973bfe2aaa8d4d7c0e35c09f2466ed9410e56a /modules/command.pl | |
| parent | d944892a0c4d04c056a8697fc0aee54b5b01ff88 (diff) | |
memleak fix, better nick tracking, new commands, major security exploit fix
Diffstat (limited to 'modules/command.pl')
| -rw-r--r-- | modules/command.pl | 5 |
1 files changed, 3 insertions, 2 deletions
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; } } } |
