X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=Commands%2FQuotes.pm;h=608832f9d38094c40173c8d92c0800105acf7d10;hb=a7e034b3599d41cdf5a158b14bd1715451f89a0c;hp=3353eb6a112df54326dd6690d6aae155823d1fa6;hpb=e8c94cdebefdc428ea92fde6db63f18d3e8399b2;p=NDIRC.git diff --git a/Commands/Quotes.pm b/Commands/Quotes.pm index 3353eb6..608832f 100644 --- a/Commands/Quotes.pm +++ b/Commands/Quotes.pm @@ -68,6 +68,7 @@ sub findquote { my ($self,$c,$pattern) = @_; die 'ARGS' unless $pattern; + my $matcher; if ($self->name eq 'findqre'){ if (defined (eval 'm/$pattern/ix')){ @@ -91,7 +92,7 @@ sub findquote $n++; } if ($match){ - close $file; + $file->flush; $c->command(dcc => $c->nick => SEND => $file); }else{ $c->reply("No quotes matching $pattern."); @@ -107,8 +108,8 @@ sub delquote $n = $n-1; if (exists $FILE[$n]){ my ($uid,$username) = $c->model->selectrow_array(q{ -SELECT uid,username FROM users where hostmask ILIKE ? - },undef,$c->host); +SELECT uid,username FROM users where uid = ? + },undef,$c->uid); my $text = $FILE[$n]; push @OLDFILE,"Removed by $username ($uid): $text";