From: dms Date: Tue, 19 Dec 2000 13:06:37 +0000 (+0000) Subject: forgot about int() in randnick - found by lunartear X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=ab1cb5ddc16bba736db790dcf1081ecca543d510;p=infobot.git forgot about int() in randnick - found by lunartear git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@211 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/src/Factoids/Reply.pl b/src/Factoids/Reply.pl index 83cd906..d0607c1 100644 --- a/src/Factoids/Reply.pl +++ b/src/Factoids/Reply.pl @@ -204,7 +204,7 @@ sub getReply { # randnick. if ($reply =~ /\$randnick/) { my @nicks = keys %{$channels{$chan}{''}}; - my $randnick = $nicks[$rand*$#nicks]; + my $randnick = $nicks[ int($rand*$#nicks) ]; s/\$randnick/$randnick/; }