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=b1c44e0e5c230f7ca6e3e22b275ad97758e9c298;p=infobot.git dont overwrite nuh{} if it already exists. git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@344 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/src/IRC/IrcHooks.pl b/src/IRC/IrcHooks.pl index 0b0887a..8423271 100644 --- a/src/IRC/IrcHooks.pl +++ b/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.