From 5b7e61b6ce6ae936ceb6eed1c112849cb477107e Mon Sep 17 00:00:00 2001 From: Someone Date: Fri, 15 Apr 2011 15:18:45 +0200 Subject: [PATCH] blah --- bot.v3.1.2.pl => bot.pl | 62 ++++++++++++++++++++++------------------- events.txt | 31 +++++++++++++-------- 2 files changed, 53 insertions(+), 40 deletions(-) rename bot.v3.1.2.pl => bot.pl (98%) diff --git a/bot.v3.1.2.pl b/bot.pl similarity index 98% rename from bot.v3.1.2.pl rename to bot.pl index 0571286..5e48d15 100755 --- a/bot.v3.1.2.pl +++ b/bot.pl @@ -36,7 +36,7 @@ my %opts; readconfig(); -my $version = "3.1.2"; +my $version = "3.1.3"; # command line overrides .irpg.conf GetOptions(\%opts, @@ -80,7 +80,7 @@ GetOptions(\%opts, "owneraddonly", "ownerdelonly", "ownerpevalonly", - "checkupdates", + "daemonize", "senduserlist", "limitpen=i", "mapx=i", @@ -180,7 +180,6 @@ if (! -e $opts{dbfile}) { print "OK, wrote you into $opts{dbfile}.\n"; } -print "\n".debug("Becoming a daemon...")."\n"; daemonize(); $SIG{HUP} = "readconfig"; # sighup = reread config file @@ -360,9 +359,7 @@ sub parse { if ($opts{voiceonlogin}) { my @vnicks = map { $rps{$_}{nick} } keys(%auto_login); while (@vnicks) { - sts("MODE $opts{botchan} +". - ('v' x $opts{modesperline})." ". - join(" ",@vnicks[0..$opts{modesperline}-1])); + sts("MODE $opts{botchan} +".('v' x $opts{modesperline})." ".join(" ",@vnicks[0..$opts{modesperline}-1])); splice(@vnicks,0,$opts{modesperline}); } } @@ -1274,17 +1271,19 @@ sub challenge_opp { # pit argument player against random player $rps{$u}{next} += $gain; chanmsg("$u reaches next level in ".duration($rps{$u}{next})."."); #interrogation - debug("interrogation"); - my $csfactor = $rps{$opp}{alignment} eq "g" ? 50 : - $rps{$opp}{alignment} eq "e" ? 20 : - 35; - if (rand($csfactor) < 1) { - $gain = int(((5 + int(rand(20)))/100) * $rps{$opp}{next}); - chanmsg(clog("$opp has captured and interrogated $u! ". - duration($gain)." is removed from $opp\'s clock.")); - $rps{$opp}{next} -= $gain; - chanmsg("$opp reaches next level in ".duration($rps{$opp}{next})."."); - } + if ($opp ne $primnick) { + debug("interrogation"); + my $csfactor = $rps{$opp}{alignment} eq "g" ? 50 : + $rps{$opp}{alignment} eq "e" ? 20 : + 35; + if (rand($csfactor) < 1) { + $gain = int(((5 + int(rand(20)))/100) * $rps{$opp}{next}); + chanmsg(clog("$opp has captured and interrogated $u! ". + duration($gain)." is removed from $opp\'s clock.")); + $rps{$opp}{next} -= $gain; + chanmsg("$opp reaches next level in ".duration($rps{$opp}{next})."."); + } + } } } @@ -1727,6 +1726,8 @@ sub itemsum { } sub daemonize() { + if ($opts{daemonize}){ + print "\n".debug("Becoming a daemon...")."\n"; # win32 doesn't daemonize (this way?) if ($^O eq "MSWin32") { print debug("Nevermind, this is Win32, no I'm not.")."\n"; @@ -1749,6 +1750,9 @@ sub daemonize() { }; print PIDFILE $$; close(PIDFILE); + } else { + print "\n".debug("NOT Becoming a daemon...")."\n"; + } } sub calamity { # suffer a little one @@ -2125,17 +2129,19 @@ sub collision_fight { $rps{$u}{next} += $gain; chanmsg("$u reaches next level in ".duration($rps{$u}{next})."."); #interrogation - debug("interrogation"); - my $csfactor = $rps{$opp}{alignment} eq "g" ? 50 : - $rps{$opp}{alignment} eq "e" ? 20 : - 35; - if (rand($csfactor) < 1) { - $gain = int(((5 + int(rand(20)))/100) * $rps{$opp}{next}); - chanmsg(clog("$opp has captured and interrogated $u! ". - duration($gain)." is removed from $opp\'s clock.")); - $rps{$opp}{next} -= $gain; - chanmsg("$opp reaches next level in ".duration($rps{$opp}{next})."."); - } + if ($opp ne $primnick) { + debug("interrogation"); + my $csfactor = $rps{$opp}{alignment} eq "g" ? 50 : + $rps{$opp}{alignment} eq "e" ? 20 : + 35; + if (rand($csfactor) < 1) { + $gain = int(((5 + int(rand(20)))/100) * $rps{$opp}{next}); + chanmsg(clog("$opp has captured and interrogated $u! ". + duration($gain)." is removed from $opp\'s clock.")); + $rps{$opp}{next} -= $gain; + chanmsg("$opp reaches next level in ".duration($rps{$opp}{next})."."); + } + } } } diff --git a/events.txt b/events.txt index becb890..21b5fd8 100755 --- a/events.txt +++ b/events.txt @@ -1,23 +1,29 @@ -C was bitten by drdink +C was swimming in the sea while BP dumped some kilotons oil into that water +C watched the Nuclear meltdown in Fukushima for too long +C was hit by a 150 year old collapsing pedestrian bridge +C saw George W. Bush +C heared a song by Justin Bieber +C got addicted to facebook +C got surrounded by a bushfire +C lost their hentai collection +C took a break for playing angry birds +C remembered a traumatic expirience at the Neverland-Ranch C fell into a hole C bit their tongue C set themself on fire C ate a poisonous fruit C lost their mind -C died, temporarily.. C was caught in a terrible snowstorm -C EXPLODED, somewhat.. C got knifed in a dark alley C saw an episode of Ally McBeal -C got turned INSIDE OUT, practically C ate a very disagreeable fruit, getting a terrible case of heartburn C met up with a mob hitman for not paying his bills C has fallen ill with the black plague C was struck by lightning C was attacked by a rabid cow C was attacked by a rabid wolverine +C was attacked by a rabid rabbit C was set on fire -C was decapitated, temporarily.. C was tipped by a cow C was bucked from a horse C was bitten by a møøse @@ -25,33 +31,34 @@ C was sat on by a giant C ate a plate of discounted, day-old sushi C got harassed by peer C got lost in the woods +C got burnt while setting the woods on fire C misplaced his map C broke his compass C lost his glasses +C could not connect to google maps C walked face-first into a tree -G found a pair of Nikes +C was abducted by aliens +C lost their iPhone +C got a caffeine overdose +C had to listen to an anti-abortion activist's speech G caught a unicorn G discovered a secret, underground passage G was taught to run quickly by a secret tribe of pygmies that know how to, among other things, run quickly G discovered caffeinated coffee -G grew an extra leg G was visited by a very pretty nymph G found kitten G learned Perl G found an exploit in the IRPG code +G bribed the local IRPG administrator G tamed a wild horse G found a one-time-use spell of quickness G bought a faster computer -G bribed the local IRPG administrator G stopped using dial-up -G invented the wheel G gained a sixth sense -G got a kiss from drwiii G had his clothes laundered by a passing fairy G was rejuvenated by drinking from a magic stream -G was bitten by a radioactive spider -G hit it off with a drunk sorority chick named Jenny G was accepted into Pi Beta Phi +G was shown how to use the screen command Q2 225 415 280 460 lay waste to the Towers of Ankh-Allor, wherein lies the terrible sorceror Croocq Q1 locate the centuries-lost tomes of the grim prophet Haplashak Mhadhu Q2 400 475 480 380 explore and chart the dark lands of T'rnalvph -- 2.43.0