]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Factoids/Reply.pl
forgot about int() in randnick - found by lunartear
[infobot.git] / 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/;
        }