Changeset 339
- Timestamp:
- 04/30/10 19:07:31 (3 years ago)
- Location:
- trollforge/mao/dickbot
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trollforge/mao/dickbot/dick.pl
r337 r339 11 11 use AnyEvent::IRC::Client; 12 12 13 my $nick = " DiCKbot";14 my $chan = "# flashsupport";15 my $server = "irc. buttes.org";16 my $prob = 50; # probability, in %13 my $nick = "fagot"; 14 my $chan = "#gapp"; 15 my $server = "irc.anonymuncule.com"; 16 my $prob = 40; # probability, in % 17 17 18 18 … … 39 39 say $ch." - ".$offset." - ".$ind; 40 40 push @positions, $ind; 41 last if ($offset +1== $ind);41 last if ($offset == $ind); 42 42 $offset = $ind; 43 43 } … … 88 88 my ($self, $msg) = @_; 89 89 my $from = $msg->{params}->[0]; 90 my @words = split " " => $msg->{params}->[-1]; 90 my @words = grep { length($_) > 4 } split " " => $msg->{params}->[-1]; 91 return if $#words < 0; 91 92 my $rand = int(rand(100)); 92 93 return unless ($rand%(100/$prob) == 0); 93 my $word = $words[rand @words]; 94 my $word = ""; 95 $word = $words[rand @words]; 94 96 $client->send_chan($from, "PRIVMSG", $from, chlen_word($word)); 95 97 }); … … 98 100 99 101 $client->send_srv ("JOIN", $chan); 100 $client->send_chan ($chan, "PRIVMSG", $chan, "dickbot here");102 #$client->send_chan ($chan, "PRIVMSG", $chan, "dickbot here"); 101 103 $client->connect ( 102 104 $server, 6667, { nick => $nick, user => $nick, real => 'DICKBOT [HEAD] :: http://www.gnaa.eu/browser/trollforge/mao/dickbot' }
Note: See TracChangeset
for help on using the changeset viewer.
