From ab1cb5ddc16bba736db790dcf1081ecca543d510 Mon Sep 17 00:00:00 2001 From: dms Date: Tue, 19 Dec 2000 13:06:37 +0000 Subject: [PATCH] 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 --- src/Factoids/Reply.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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/; } -- 2.39.2