]> git.donarmstrong.com Git - infobot.git/commitdiff
forgot about int() in randnick - found by lunartear
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Tue, 19 Dec 2000 13:06:37 +0000 (13:06 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Tue, 19 Dec 2000 13:06:37 +0000 (13:06 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@211 c11ca15a-4712-0410-83d8-924469b57eb5

src/Factoids/Reply.pl

index 83cd90684a4aaa4f65523532198aecf884038162..d0607c17c47013a485a64f36738ed03efa671429 100644 (file)
@@ -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/;
        }