From: dms Date: Mon, 5 Feb 2001 15:45:53 +0000 (+0000) Subject: dont overwrite nuh{} if it already exists. X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=3f1de52e7a84e2b957a66132a6ccb17d1dfa30bb;p=infobot.git dont overwrite nuh{} if it already exists. git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@344 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/blootbot/src/IRC/IrcHooks.pl b/blootbot/src/IRC/IrcHooks.pl index 0b0887a..8423271 100644 --- a/blootbot/src/IRC/IrcHooks.pl +++ b/blootbot/src/IRC/IrcHooks.pl @@ -173,10 +173,11 @@ sub on_dcc { my $nick = $event->nick(); # pity Net::IRC doesn't store nuh. Here's a hack :) - $self->whois($nick); - $nuh{lc $nick} = "GETTING-NOW"; # trying. + if (!exists $nuh{lc $nick}) { + $self->whois($nick); + $nuh{lc $nick} = "GETTING-NOW"; # trying. + } $type ||= "???"; - &DEBUG("on_dcc: nuh => GETTING-NOW."); if ($type eq 'SEND') { # GET for us. # incoming DCC SEND. we're receiving a file.