--- bot.v3.0.1.pl Sun May 30 18:04:19 2004 +++ bot.v3.0.2.pl Mon May 31 00:41:58 2004 @@ -1,5 +1,5 @@ #!/usr/local/bin/perl -# irpg bot v3.0.1 by jotun, jotun@idlerpg.net, et al. See http://idlerpg.net/ +# irpg bot v3.0.2 by jotun, jotun@idlerpg.net, et al. See http://idlerpg.net/ # # Some code within this file was written by authors other than myself. As such, # distributing this code or distributing modified versions of this code is @@ -164,7 +164,7 @@ reportregs => 1, ); -my $version = "3.0.1"; +my $version = "3.0.2"; GetOptions(\%opts, "help|h", @@ -399,7 +399,7 @@ } elsif ($arg[1] eq 'kick') { $usernick = $arg[3]; - penalize($username,"kick"); + penalize(finduser($usernick),"kick"); delete($onchan{$usernick}); } # don't penalize /notices to the bot @@ -417,7 +417,7 @@ # 315 is /WHO end. report who we automagically signed online iff it will # print < 2k of text if (keys(%auto_login)) { - if (length("%auto_login") < 2048) { + if (length("%auto_login") < 1024) { chanmsg(scalar(keys(%auto_login))." users matching ". scalar(keys(%prev_online))." hosts automatically ". "logged in; accounts: ".join(", ",keys(%auto_login))); @@ -1112,6 +1112,10 @@ my $online = scalar(grep { $rps{$_}{online} } keys(%rps)); # there's really nothing to do here if there are no online users return unless $online; + my $onlineevil = scalar(grep { $rps{$_}{online} && + $rps{$_}{alignment} eq "e" } keys(%rps)); + my $onlinegood = scalar(grep { $rps{$_}{online} && + $rps{$_}{alignment} eq "g" } keys(%rps)); if (!$opts{noscale}) { if (rand((20*86400)/$opts{self_clock}) < $online) { hog(); } if (rand((24*86400)/$opts{self_clock}) < $online) { team_battle(); } @@ -1124,8 +1128,8 @@ calamity() if rand(4000) < 1; godsend() if rand(2000) < 1; } - if (rand((8*86400)/$opts{self_clock}) < $online) { evilness(); } - if (rand((12*86400)/$opts{self_clock}) < $online) { goodness(); } + if (rand((8*86400)/$opts{self_clock}) < $onlineevil) { evilness(); } + if (rand((12*86400)/$opts{self_clock}) < $onlinegood) { goodness(); } moveplayers(); @@ -1197,7 +1201,7 @@ $rps{$k}{level}++; if ($rps{$k}{level} > 60) { $rps{$k}{next} = int(($opts{rpbase} * - ($opts{rpstep}**63)) + + ($opts{rpstep}**60)) + (86400*($rps{$k}{level} - 60))); } else {