From: <car...@us...> - 2008-07-17 08:31:49
|
Revision: 6161 http://bioclipse.svn.sourceforge.net/bioclipse/?rev=6161&view=rev Author: carl_masak Date: 2008-07-17 08:31:54 +0000 (Thu, 17 Jul 2008) Log Message: ----------- [zarah] new synonyms for restart: reboot, update. also put main words first Modified Paths: -------------- bot/trunk/zarah.pl Modified: bot/trunk/zarah.pl =================================================================== --- bot/trunk/zarah.pl 2008-07-15 11:30:29 UTC (rev 6160) +++ bot/trunk/zarah.pl 2008-07-17 08:31:54 UTC (rev 6161) @@ -43,12 +43,13 @@ [ [qw<tell ask>], \&tell_message ], [ [qw<messages massages msg msgs moosages>], \&messages ], - [ [qw<clear clear-messages>], \&clear_messages ], - [ [qw<boo boo! restart>], \&restart ], + [ [qw<clear-messages clear>], \&clear_messages ], + [ [qw<restart boo boo! + reboot update>], \&restart ], [ [qw<google>], \&google, 'bare' ], [ [qw<seen>], \&seen ], [ [qw<slap>], \&slap, 'bare' ], - [ [qw<thx thanks thanx dz>], \&thanks, ], + [ [qw<thanks thx thanx dz>], \&thanks, ], [ $address_bot, \&no_comprende ], ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2008-07-17 10:56:29
|
Revision: 6163 http://bioclipse.svn.sourceforge.net/bioclipse/?rev=6163&view=rev Author: carl_masak Date: 2008-07-17 10:56:23 +0000 (Thu, 17 Jul 2008) Log Message: ----------- [zarah] added help command, which lists available commands Modified Paths: -------------- bot/trunk/zarah.pl Modified: bot/trunk/zarah.pl =================================================================== --- bot/trunk/zarah.pl 2008-07-17 09:52:53 UTC (rev 6162) +++ bot/trunk/zarah.pl 2008-07-17 10:56:23 UTC (rev 6163) @@ -49,7 +49,8 @@ [ [qw<google>], \&google, 'bare' ], [ [qw<seen>], \&seen ], [ [qw<slap>], \&slap, 'bare' ], - [ [qw<thanks thx thanx dz>], \&thanks, ], + [ [qw<thanks thx thanx dz>], \&thanks ], + [ [qw<help>], \&help, 'bare' ], [ $address_bot, \&no_comprende ], ); @@ -331,6 +332,24 @@ => "$sender: " . $messages[rand @messages] ); } +sub help { + my ($sender, $topic, $channel, $irc) = @_; + + my @cmds; + for my $action ( @actions ) { + my ($matcher, $code, $param) = @{$action}; + if ( ref($matcher) eq 'Regexp' ) { + # don't list it, because it's not really a command + } + else { # it's a list of strings + push @cmds, $matcher->[0]; + } + } + + $irc->yield( privmsg => $channel + => "$sender: avaliable commands are " . join ' ', @cmds ); +} + sub possibly_report_new_messages { my ($person, $channel, $irc) = @_; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2008-07-17 10:58:48
|
Revision: 6164 http://bioclipse.svn.sourceforge.net/bioclipse/?rev=6164&view=rev Author: carl_masak Date: 2008-07-17 10:58:51 +0000 (Thu, 17 Jul 2008) Log Message: ----------- [zarah] commands sorted alphabetically Modified Paths: -------------- bot/trunk/zarah.pl Modified: bot/trunk/zarah.pl =================================================================== --- bot/trunk/zarah.pl 2008-07-17 10:56:23 UTC (rev 6163) +++ bot/trunk/zarah.pl 2008-07-17 10:58:51 UTC (rev 6164) @@ -347,7 +347,8 @@ } $irc->yield( privmsg => $channel - => "$sender: avaliable commands are " . join ' ', @cmds ); + => "$sender: avaliable commands are " + . sort(join ' ', @cmds) ); } sub possibly_report_new_messages { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2008-07-17 11:00:51
|
Revision: 6165 http://bioclipse.svn.sourceforge.net/bioclipse/?rev=6165&view=rev Author: carl_masak Date: 2008-07-17 11:00:40 +0000 (Thu, 17 Jul 2008) Log Message: ----------- [zarah] fixed last commit Modified Paths: -------------- bot/trunk/zarah.pl Modified: bot/trunk/zarah.pl =================================================================== --- bot/trunk/zarah.pl 2008-07-17 10:58:51 UTC (rev 6164) +++ bot/trunk/zarah.pl 2008-07-17 11:00:40 UTC (rev 6165) @@ -348,7 +348,7 @@ $irc->yield( privmsg => $channel => "$sender: avaliable commands are " - . sort(join ' ', @cmds) ); + . join ' ', sort @cmds ); } sub possibly_report_new_messages { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2008-07-18 08:26:02
|
Revision: 6166 http://bioclipse.svn.sourceforge.net/bioclipse/?rev=6166&view=rev Author: carl_masak Date: 2008-07-18 08:26:08 +0000 (Fri, 18 Jul 2008) Log Message: ----------- [zarah] zarah now keeps quiet when her karma is changed Modified Paths: -------------- bot/trunk/zarah.pl Modified: bot/trunk/zarah.pl =================================================================== --- bot/trunk/zarah.pl 2008-07-17 11:00:40 UTC (rev 6165) +++ bot/trunk/zarah.pl 2008-07-18 08:26:08 UTC (rev 6166) @@ -30,14 +30,14 @@ my $inc_karma = qr[\b([\w]+)\+\+]; my $dec_karma = qr[\b([\w]+)--]; my $url = qr[($RE{URI}{HTTP})]; -my $address_bot = qr[^$botname(?:,:)?]; +my $address_bot = qr[^$botname(?:,:)?(.*)]; my @actions = ( [ $global_greeting, \&global_greeting ], [ $inc_karma, \&inc_karma ], [ $dec_karma, \&dec_karma ], + [ $url, \&shorten_url ], [ [qw<karma>], \&report_karma, 'bare' ], - [ $url, \&shorten_url ], [ [qw<hi y0 moin hello hey ey>], \&say_hello ], [ [qw<tell ask>], \&tell_message ], @@ -319,8 +319,11 @@ } sub no_comprende { - my ($sender, undef, $channel, $irc) = @_; + my ($sender, $message, $channel, $irc) = @_; + return if trim($message) eq '--'; + return if trim($message) eq '++'; + my @messages = (q[I did not understand that], q[excuse me?], q[eh... wha'?], This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2008-07-20 14:01:50
|
Revision: 6176 http://bioclipse.svn.sourceforge.net/bioclipse/?rev=6176&view=rev Author: carl_masak Date: 2008-07-20 14:01:07 +0000 (Sun, 20 Jul 2008) Log Message: ----------- [zarah] refactored all mentions of masak and jonalv into a global Modified Paths: -------------- bot/trunk/zarah.pl Modified: bot/trunk/zarah.pl =================================================================== --- bot/trunk/zarah.pl 2008-07-18 12:55:04 UTC (rev 6175) +++ bot/trunk/zarah.pl 2008-07-20 14:01:07 UTC (rev 6176) @@ -20,6 +20,7 @@ my $server = 'irc.freenode.net'; my @channels = ('#farmbio', '#ki-twiki', '#bioclipse', '#cdk', '#metware'); +my @developers = qw<masak jonalv>; my $karma = load_from_file($file_of{karma}); my $seen = load_from_file($file_of{seen}); @@ -172,7 +173,8 @@ my ($sender, $content, $channel, $irc) = @_; $irc->yield( privmsg => $channel - => "I can't do that; complain with masak and jonalv" ); + => "$sender: I can't do that; complain with " + . join ' and ', @developers ); } sub tell_message { @@ -242,7 +244,7 @@ sub restart { my ($sender, $content, $channel, $irc) = @_; - return if $sender ne 'jonalv' && $sender ne 'masak'; + return if !grep { $sender eq $_ } @developers; system('svn up'); @@ -293,7 +295,7 @@ sub thanks { my ($person, $content, $channel, $irc) = @_; - if ( rand() < .5 && ($person eq 'masak' || $person eq 'jonalv') ) { + if ( rand() < .5 && (grep { $person eq $_ } @developers) ) { $irc->yield( privmsg => $channel => "no, YOU'RE the cute one! :)" ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2008-07-20 14:14:15
|
Revision: 6177 http://bioclipse.svn.sourceforge.net/bioclipse/?rev=6177&view=rev Author: carl_masak Date: 2008-07-20 14:13:54 +0000 (Sun, 20 Jul 2008) Log Message: ----------- [zarah] implemented long-awaited slap Modified Paths: -------------- bot/trunk/zarah.pl Modified: bot/trunk/zarah.pl =================================================================== --- bot/trunk/zarah.pl 2008-07-20 14:01:07 UTC (rev 6176) +++ bot/trunk/zarah.pl 2008-07-20 14:13:54 UTC (rev 6177) @@ -289,7 +289,49 @@ } sub slap { - unsupported(@_); + my ($asker, $person, $channel, $irc) = @_; + + my $possesive_form = $person + . (substr($person, -1, 1) eq 's' ? "'" : "'s"); + + my @slap_phrases = ( + "/me slaps $person", + "/me smacks $person about with a large trout", + "/me beats up $person", + "/me pokes $person in the eye", + "why on earth would I slap $person?", + "*SMACK*, *SLAM*, take that $person!", + "/me activates her slap-o-matic...", + "/me orders her trained monkeys to punch $person", + "/me smashes a lamp on $possesive_form head", + "/me hits $person with a hammer, so he breaks into a thousand pieces", + "/me throws some pointy lambdas at $person", + "/me loves $person, so no slapping", + "/me would never hurt $person!", + "go slap $person yourself", + "I don't perform such side effects on command!", + "stop telling me what to do", + "/me clobbers $person with an untyped language", + "/me pulls $person through the Evil Mangler", + "/me secretly deletes $possesive_form source code", + "/me places her fist firmly on $possesive_form jaw", + "/me locks up $person in a Monad", + "/me submits $possesive_form email address to a dozen spam lists", + "/me will count to five...", + "/me jabs $person with a C pointer", + "/me is overcome by a sudden desire to hurt $person", + "/me karate-chops $person into two equally sized halves", + "Come on, let's all slap $person", + "/me pushes $person from his chair", + "/me hits $person with an assortment of kitchen utensils", + "/me slaps $person with a slab of concrete", + "/me puts on her slapping gloves, and slaps $person", + "/me decomposes $person into several parts using the Banach-Tarski " + ."theorem and reassembles them to get two copies of $person!", + ); + + $irc->yield( privmsg => $channel + => $slap_phrases[rand @slap_phrases] ); } sub thanks { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2008-07-20 14:22:19
|
Revision: 6178 http://bioclipse.svn.sourceforge.net/bioclipse/?rev=6178&view=rev Author: carl_masak Date: 2008-07-20 14:22:20 +0000 (Sun, 20 Jul 2008) Log Message: ----------- [zarah] fixed up /me messages in @slap Modified Paths: -------------- bot/trunk/zarah.pl Modified: bot/trunk/zarah.pl =================================================================== --- bot/trunk/zarah.pl 2008-07-20 14:13:54 UTC (rev 6177) +++ bot/trunk/zarah.pl 2008-07-20 14:22:20 UTC (rev 6178) @@ -330,8 +330,14 @@ ."theorem and reassembles them to get two copies of $person!", ); - $irc->yield( privmsg => $channel - => $slap_phrases[rand @slap_phrases] ); + my $phrase = $slap_phrases[rand @slap_phrases]; + + if ( my ($notice) =~ m[ /me [ ] (.*) ]x ) { + $irc->yield( notice => $channel => $notice ); + } + else { + $irc->yield( privmsg => $channel => $phrase ); + } } sub thanks { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2008-07-20 14:30:54
|
Revision: 6179 http://bioclipse.svn.sourceforge.net/bioclipse/?rev=6179&view=rev Author: carl_masak Date: 2008-07-20 14:30:12 +0000 (Sun, 20 Jul 2008) Log Message: ----------- [zarah] more corrections to make /me work Modified Paths: -------------- bot/trunk/zarah.pl Modified: bot/trunk/zarah.pl =================================================================== --- bot/trunk/zarah.pl 2008-07-20 14:22:20 UTC (rev 6178) +++ bot/trunk/zarah.pl 2008-07-20 14:30:12 UTC (rev 6179) @@ -332,8 +332,8 @@ my $phrase = $slap_phrases[rand @slap_phrases]; - if ( my ($notice) =~ m[ /me [ ] (.*) ]x ) { - $irc->yield( notice => $channel => $notice ); + if ( my ($me_phrase) = $phrase =~ m[/me\s+(.*)] ) { + $irc->yield( ctcp => $channel => $me_phrase ); } else { $irc->yield( privmsg => $channel => $phrase ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2008-07-20 14:34:29
|
Revision: 6180 http://bioclipse.svn.sourceforge.net/bioclipse/?rev=6180&view=rev Author: carl_masak Date: 2008-07-20 14:33:45 +0000 (Sun, 20 Jul 2008) Log Message: ----------- [zarah] further fixes to make /me work Modified Paths: -------------- bot/trunk/zarah.pl Modified: bot/trunk/zarah.pl =================================================================== --- bot/trunk/zarah.pl 2008-07-20 14:30:12 UTC (rev 6179) +++ bot/trunk/zarah.pl 2008-07-20 14:33:45 UTC (rev 6180) @@ -333,7 +333,7 @@ my $phrase = $slap_phrases[rand @slap_phrases]; if ( my ($me_phrase) = $phrase =~ m[/me\s+(.*)] ) { - $irc->yield( ctcp => $channel => $me_phrase ); + $irc->yield( ctcp => $channel => "ACTION $me_phrase" ); } else { $irc->yield( privmsg => $channel => $phrase ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2008-07-21 08:06:07
|
Revision: 6190 http://bioclipse.svn.sourceforge.net/bioclipse/?rev=6190&view=rev Author: carl_masak Date: 2008-07-21 08:06:06 +0000 (Mon, 21 Jul 2008) Log Message: ----------- [zarah] special case for @slap me Modified Paths: -------------- bot/trunk/zarah.pl Modified: bot/trunk/zarah.pl =================================================================== --- bot/trunk/zarah.pl 2008-07-21 08:00:49 UTC (rev 6189) +++ bot/trunk/zarah.pl 2008-07-21 08:06:06 UTC (rev 6190) @@ -291,6 +291,11 @@ sub slap { my ($asker, $person, $channel, $irc) = @_; + $person = trim($person); + if ( $person eq 'me' ) { + $person = $asker; + } + my $possesive_form = $person . (substr($person, -1, 1) eq 's' ? "'" : "'s"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2008-07-21 08:41:26
|
Revision: 6191 http://bioclipse.svn.sourceforge.net/bioclipse/?rev=6191&view=rev Author: carl_masak Date: 2008-07-21 08:40:54 +0000 (Mon, 21 Jul 2008) Log Message: ----------- [zarah] replies specially for yes/no Modified Paths: -------------- bot/trunk/zarah.pl Modified: bot/trunk/zarah.pl =================================================================== --- bot/trunk/zarah.pl 2008-07-21 08:06:06 UTC (rev 6190) +++ bot/trunk/zarah.pl 2008-07-21 08:40:54 UTC (rev 6191) @@ -376,18 +376,23 @@ sub no_comprende { my ($sender, $message, $channel, $irc) = @_; - return if trim($message) eq '--'; - return if trim($message) eq '++'; + $message = trim($message); + return if $message eq '--'; + return if $message eq '++'; - my @messages = (q[I did not understand that], - q[excuse me?], - q[eh... wha'?], - q[I'm just a bot, you expect me to understand that?], - q[you've just exceeded my capabilities :/], - q[please rephrase or stop trying to be witty :)]); + my @replies = (q[I did not understand that], + q[excuse me?], + q[eh... wha'?], + q[I'm just a bot, you expect me to understand that?], + q[you've just exceeded my capabilities :/], + q[please rephrase or stop trying to be witty :)]); - $irc->yield( privmsg => $channel - => "$sender: " . $messages[rand @messages] ); + my $reply = $replies[rand @replies]; + if ( $message eq 'yes' || $message eq 'no' ) { + $reply = 'I see.'; + } + + $irc->yield( privmsg => $channel => "$sender: " . $reply ); } sub help { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2008-07-21 08:53:23
|
Revision: 6192 http://bioclipse.svn.sourceforge.net/bioclipse/?rev=6192&view=rev Author: carl_masak Date: 2008-07-21 08:53:24 +0000 (Mon, 21 Jul 2008) Log Message: ----------- [zarah] fixed addressing qr Modified Paths: -------------- bot/trunk/zarah.pl Modified: bot/trunk/zarah.pl =================================================================== --- bot/trunk/zarah.pl 2008-07-21 08:40:54 UTC (rev 6191) +++ bot/trunk/zarah.pl 2008-07-21 08:53:24 UTC (rev 6192) @@ -31,7 +31,7 @@ my $inc_karma = qr[\b([\w]+)\+\+]; my $dec_karma = qr[\b([\w]+)--]; my $url = qr[($RE{URI}{HTTP})]; -my $address_bot = qr[^$botname(?:,:)?(.*)]; +my $address_bot = qr[^ $botname [,:]? (.*) ]x; my @actions = ( [ $global_greeting, \&global_greeting ], This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2008-07-22 07:32:43
|
Revision: 6200 http://bioclipse.svn.sourceforge.net/bioclipse/?rev=6200&view=rev Author: carl_masak Date: 2008-07-22 07:32:52 +0000 (Tue, 22 Jul 2008) Log Message: ----------- [zarah] typo in regex Modified Paths: -------------- bot/trunk/zarah.pl Modified: bot/trunk/zarah.pl =================================================================== --- bot/trunk/zarah.pl 2008-07-21 23:07:10 UTC (rev 6199) +++ bot/trunk/zarah.pl 2008-07-22 07:32:52 UTC (rev 6200) @@ -27,7 +27,7 @@ my $messages = load_from_file($file_of{messages}); my $num_msgs = load_from_file($file_of{num_msgs}); -my $global_greeting = qr[^(hi|moin|y0|hello)(?:,? all).?$]; +my $global_greeting = qr[^(hi|moin|y0|hello)(?:,? all)?$]; my $inc_karma = qr[\b([\w]+)\+\+]; my $dec_karma = qr[\b([\w]+)--]; my $url = qr[($RE{URI}{HTTP})]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2008-07-23 08:46:24
|
Revision: 6225 http://bioclipse.svn.sourceforge.net/bioclipse/?rev=6225&view=rev Author: carl_masak Date: 2008-07-23 08:46:33 +0000 (Wed, 23 Jul 2008) Log Message: ----------- [zarah] now refuses self-slap Modified Paths: -------------- bot/trunk/zarah.pl Modified: bot/trunk/zarah.pl =================================================================== --- bot/trunk/zarah.pl 2008-07-23 08:44:29 UTC (rev 6224) +++ bot/trunk/zarah.pl 2008-07-23 08:46:33 UTC (rev 6225) @@ -337,6 +337,11 @@ my $phrase = $slap_phrases[rand @slap_phrases]; + if ( $person eq $botname || $person eq 'yourself' ) { + $irc->yield( privmsg => $channel => "no, I'd rather not" ); + return; + } + if ( my ($me_phrase) = $phrase =~ m[/me\s+(.*)] ) { $irc->yield( ctcp => $channel => "ACTION $me_phrase" ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jo...@us...> - 2008-07-29 08:16:17
|
Revision: 6295 http://bioclipse.svn.sourceforge.net/bioclipse/?rev=6295&view=rev Author: jonalv Date: 2008-07-29 08:16:26 +0000 (Tue, 29 Jul 2008) Log Message: ----------- [zarah] answers ehlo! Modified Paths: -------------- bot/trunk/zarah.pl Modified: bot/trunk/zarah.pl =================================================================== --- bot/trunk/zarah.pl 2008-07-29 08:14:25 UTC (rev 6294) +++ bot/trunk/zarah.pl 2008-07-29 08:16:26 UTC (rev 6295) @@ -27,7 +27,7 @@ my $messages = load_from_file($file_of{messages}); my $num_msgs = load_from_file($file_of{num_msgs}); -my $global_greeting = qr[^(hi|moin|y0|hello)(?:,? all)?$]; +my $global_greeting = qr[^(hi|moin|y0|hello|ehlo)(?:,? all)?!?$]; my $inc_karma = qr[\b([\w]+)\+\+]; my $dec_karma = qr[\b([\w]+)--]; my $url = qr[($RE{URI}{HTTP})]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2008-07-29 11:45:15
|
Revision: 6318 http://bioclipse.svn.sourceforge.net/bioclipse/?rev=6318&view=rev Author: carl_masak Date: 2008-07-29 11:45:24 +0000 (Tue, 29 Jul 2008) Log Message: ----------- [zarah] increased lower URL shortening length limit Modified Paths: -------------- bot/trunk/zarah.pl Modified: bot/trunk/zarah.pl =================================================================== --- bot/trunk/zarah.pl 2008-07-29 11:40:46 UTC (rev 6317) +++ bot/trunk/zarah.pl 2008-07-29 11:45:24 UTC (rev 6318) @@ -22,6 +22,8 @@ my @channels = ('#farmbio', '#ki-twiki', '#bioclipse', '#cdk', '#metware'); my @developers = qw<masak jonalv>; +my $url_shortening_limit = 30; + my $karma = load_from_file($file_of{karma}); my $seen = load_from_file($file_of{seen}); my $messages = load_from_file($file_of{messages}); @@ -370,7 +372,7 @@ while ( $what =~ /($RE{URI}{HTTP})/g ) { my $url = $1; - next URL_SHORTENING if length($url) < 25; + next URL_SHORTENING if length($url) < $url_shortening_limit; next URL_SHORTENING if $url =~ m[ //tinyurl ]x; my $tiny_url = makeashorterlink($url); $irc->yield( privmsg => $channel => This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2008-07-29 13:03:12
|
Revision: 6324 http://bioclipse.svn.sourceforge.net/bioclipse/?rev=6324&view=rev Author: carl_masak Date: 2008-07-29 13:02:35 +0000 (Tue, 29 Jul 2008) Log Message: ----------- [zarah] "no you are the cute one" Modified Paths: -------------- bot/trunk/zarah.pl Modified: bot/trunk/zarah.pl =================================================================== --- bot/trunk/zarah.pl 2008-07-29 12:54:04 UTC (rev 6323) +++ bot/trunk/zarah.pl 2008-07-29 13:02:35 UTC (rev 6324) @@ -33,28 +33,30 @@ my $inc_karma = qr[\b([\w]+)\+\+]; my $dec_karma = qr[\b([\w]+)--]; my $url = qr[($RE{URI}{HTTP})]; +my $yourcute = qr[(?:you're|you are) the (\w+) one]i; # ' for vim my $address_bot = qr[^ $botname [,:]? (.*) ]x; my @actions = ( - [ $global_greeting, \&global_greeting ], - [ $inc_karma, \&inc_karma ], - [ $dec_karma, \&dec_karma ], - [ $url, \&shorten_url ], - [ [qw<karma>], \&report_karma, 'bare' ], + [ $global_greeting, \&global_greeting ], + [ $inc_karma, \&inc_karma ], + [ $dec_karma, \&dec_karma ], + [ $url, \&shorten_url ], + [ [qw<karma>], \&report_karma, 'bare' ], [ [qw<hi y0 moin hello - hey ey>], \&say_hello ], - [ [qw<tell ask>], \&tell_message ], + hey ey>], \&say_hello ], + [ [qw<tell ask>], \&tell_message ], [ [qw<messages massages - msg msgs moosages>], \&messages ], - [ [qw<clear-messages clear>], \&clear_messages ], + msg msgs moosages>], \&messages ], + [ [qw<clear-messages clear>], \&clear_messages ], [ [qw<restart boo boo! - reboot update>], \&restart ], - [ [qw<google>], \&google, 'bare' ], - [ [qw<seen>], \&seen ], - [ [qw<slap>], \&slap, 'bare' ], - [ [qw<thanks thx thanx dz>], \&thanks ], - [ [qw<help>], \&help, 'bare' ], - [ $address_bot, \&no_comprende ], + reboot update>], \&restart ], + [ [qw<google>], \&google, 'bare' ], + [ [qw<seen>], \&seen ], + [ [qw<slap>], \&slap, 'bare' ], + [ [qw<thanks thx thanx dz>], \&thanks ], + [ [qw<help>], \&help, 'bare' ], + [ $yourcute, \&no_you_are_the_cute_one ], + [ $address_bot, \&no_comprende ], ); for my $action ( @actions ) { @@ -380,6 +382,14 @@ } } +sub no_you_are_the_cute_one { + my ($sender, $attribute, $channel, $irc) = @_; + + $irc->yield( privmsg => $channel => + "$sender: no, YOU'RE the $attribute one!" + . (rand() < .5 ? '' : ' :)') ); +} + sub no_comprende { my ($sender, $message, $channel, $irc) = @_; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2008-07-29 13:05:43
|
Revision: 6325 http://bioclipse.svn.sourceforge.net/bioclipse/?rev=6325&view=rev Author: carl_masak Date: 2008-07-29 13:05:49 +0000 (Tue, 29 Jul 2008) Log Message: ----------- [zarah] now does not get confused by cuteness messages Modified Paths: -------------- bot/trunk/zarah.pl Modified: bot/trunk/zarah.pl =================================================================== --- bot/trunk/zarah.pl 2008-07-29 13:02:35 UTC (rev 6324) +++ bot/trunk/zarah.pl 2008-07-29 13:05:49 UTC (rev 6325) @@ -461,6 +461,7 @@ $matched_text = $what; } $code->($nick, $matched_text, $channel, $irc); + last ACTION if $code == \&no_you_are_the_cute_one; } } else { # it's a list of strings This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2008-07-29 13:41:17
|
Revision: 6326 http://bioclipse.svn.sourceforge.net/bioclipse/?rev=6326&view=rev Author: carl_masak Date: 2008-07-29 13:41:26 +0000 (Tue, 29 Jul 2008) Log Message: ----------- [zarah] more varied "cute one" message Modified Paths: -------------- bot/trunk/zarah.pl Modified: bot/trunk/zarah.pl =================================================================== --- bot/trunk/zarah.pl 2008-07-29 13:05:49 UTC (rev 6325) +++ bot/trunk/zarah.pl 2008-07-29 13:41:26 UTC (rev 6326) @@ -386,8 +386,10 @@ my ($sender, $attribute, $channel, $irc) = @_; $irc->yield( privmsg => $channel => - "$sender: no, YOU'RE the $attribute one!" - . (rand() < .5 ? '' : ' :)') ); + "$sender: no, " + . (rand() < .5 ? q[YOU'RE] : q[YOU are]) # ' + . " the $attribute one!" + . (rand() < .5 ? q[] : q[ :)]) ); } sub no_comprende { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2008-07-29 13:49:00
|
Revision: 6327 http://bioclipse.svn.sourceforge.net/bioclipse/?rev=6327&view=rev Author: carl_masak Date: 2008-07-29 13:49:08 +0000 (Tue, 29 Jul 2008) Log Message: ----------- [zarah] now tires of "cute one" exchanges after some time Modified Paths: -------------- bot/trunk/zarah.pl Modified: bot/trunk/zarah.pl =================================================================== --- bot/trunk/zarah.pl 2008-07-29 13:41:26 UTC (rev 6326) +++ bot/trunk/zarah.pl 2008-07-29 13:49:08 UTC (rev 6327) @@ -385,6 +385,10 @@ sub no_you_are_the_cute_one { my ($sender, $attribute, $channel, $irc) = @_; + if ( rand() < .1 ) { + $irc->yield( privmsg => $channel => "$sender: oh, shut up :)" ); + } + $irc->yield( privmsg => $channel => "$sender: no, " . (rand() < .5 ? q[YOU'RE] : q[YOU are]) # ' @@ -401,15 +405,18 @@ my @replies = (q[I did not understand that], q[excuse me?], - q[eh... wha'?], - q[I'm just a bot, you expect me to understand that?], - q[you've just exceeded my capabilities :/], + q[eh... wha'?], # ' + q[I'm just a bot, you expect me to understand that?], # ' + q[you've just exceeded my capabilities :/], # ' q[please rephrase or stop trying to be witty :)]); my $reply = $replies[rand @replies]; if ( $message eq 'yes' || $message eq 'no' ) { $reply = 'I see.'; } + if ( $message =~ m[shut up] ) { + $reply = ':)'; + } $irc->yield( privmsg => $channel => "$sender: " . $reply ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2008-07-29 14:20:43
|
Revision: 6329 http://bioclipse.svn.sourceforge.net/bioclipse/?rev=6329&view=rev Author: carl_masak Date: 2008-07-29 14:20:52 +0000 (Tue, 29 Jul 2008) Log Message: ----------- [zarah] added @message Modified Paths: -------------- bot/trunk/zarah.pl Modified: bot/trunk/zarah.pl =================================================================== --- bot/trunk/zarah.pl 2008-07-29 13:53:18 UTC (rev 6328) +++ bot/trunk/zarah.pl 2008-07-29 14:20:52 UTC (rev 6329) @@ -46,6 +46,7 @@ hey ey>], \&say_hello ], [ [qw<tell ask>], \&tell_message ], [ [qw<messages massages + message massage msg msgs moosages>], \&messages ], [ [qw<clear-messages clear>], \&clear_messages ], [ [qw<restart boo boo! This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2008-07-29 14:37:33
|
Revision: 6331 http://bioclipse.svn.sourceforge.net/bioclipse/?rev=6331&view=rev Author: carl_masak Date: 2008-07-29 14:37:41 +0000 (Tue, 29 Jul 2008) Log Message: ----------- [zarah] now greets meklund whenever he enters a channel Modified Paths: -------------- bot/trunk/zarah.pl Modified: bot/trunk/zarah.pl =================================================================== --- bot/trunk/zarah.pl 2008-07-29 14:28:21 UTC (rev 6330) +++ bot/trunk/zarah.pl 2008-07-29 14:37:41 UTC (rev 6331) @@ -543,6 +543,13 @@ $poe_kernel->run(); } + elsif ( $event eq 'irc_join' ) { + if ( (shift @{$args}) =~ 'meklund' ) { + my $channel = shift @{$args}; + $irc->yield( privmsg => $channel => + "meklund: dober dan!" ); + } + } return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2008-07-30 14:59:44
|
Revision: 6356 http://bioclipse.svn.sourceforge.net/bioclipse/?rev=6356&view=rev Author: carl_masak Date: 2008-07-30 14:59:48 +0000 (Wed, 30 Jul 2008) Log Message: ----------- [zarah] now responds a bit better to yes/no and lone question marks Modified Paths: -------------- bot/trunk/zarah.pl Modified: bot/trunk/zarah.pl =================================================================== --- bot/trunk/zarah.pl 2008-07-30 14:23:24 UTC (rev 6355) +++ bot/trunk/zarah.pl 2008-07-30 14:59:48 UTC (rev 6356) @@ -412,12 +412,15 @@ q[please rephrase or stop trying to be witty :)]); my $reply = $replies[rand @replies]; - if ( $message eq 'yes' || $message eq 'no' ) { + if ( $message =~ /^(?:yes|no)\b/ ) { $reply = 'I see.'; } - if ( $message =~ m[shut up] ) { + elsif ( $message =~ m[shut up] ) { $reply = ':)'; } + elsif ( $message eq '?' ) { + $reply = 'yes?'; + } $irc->yield( privmsg => $channel => "$sender: " . $reply ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <car...@us...> - 2008-08-01 17:09:30
|
Revision: 6429 http://bioclipse.svn.sourceforge.net/bioclipse/?rev=6429&view=rev Author: carl_masak Date: 2008-08-01 17:09:36 +0000 (Fri, 01 Aug 2008) Log Message: ----------- [zarah] "kick in the fork", requested by egonw++, added "mek" nick Modified Paths: -------------- bot/trunk/zarah.pl Modified: bot/trunk/zarah.pl =================================================================== --- bot/trunk/zarah.pl 2008-08-01 17:07:13 UTC (rev 6428) +++ bot/trunk/zarah.pl 2008-08-01 17:09:36 UTC (rev 6429) @@ -306,6 +306,7 @@ my @slap_phrases = ( "/me slaps $person", + "/me kicks $person in the fork", "/me smacks $person about with a large trout", "/me beats up $person", "/me pokes $person in the eye", @@ -547,7 +548,7 @@ $poe_kernel->run(); } elsif ( $event eq 'irc_join' ) { - if ( (shift @{$args}) =~ 'meklund' ) { + if ( (shift @{$args}) =~ /meklund|mek`/ ) { my $channel = shift @{$args}; $irc->yield( privmsg => $channel => "meklund: dober dan!" ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |