From b1c44e0e5c230f7ca6e3e22b275ad97758e9c298 Mon Sep 17 00:00:00 2001 From: dms Date: Mon, 5 Feb 2001 15:45:53 +0000 Subject: [PATCH] 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 --- src/IRC/IrcHooks.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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. -- 2.39.5