mehr pudding weniger bugs
This commit is contained in:
parent
ef1223d6a4
commit
b454fb16ed
1 changed files with 7 additions and 4 deletions
|
@ -71,10 +71,13 @@ sub on_msg {
|
|||
|
||||
if ($nick ne $mynick && ($text =~ /pudding/ || $text =~ /brums/)) {
|
||||
print Dumper($event);
|
||||
sleep(rand(30));
|
||||
print "=> $conn->{channel}\n";
|
||||
$conn->privmsg($conn->{channel}, "$nick: " . pudding);
|
||||
$conn->{lastpudding} = time();
|
||||
my $wait = 300;
|
||||
if (time() > $conn->{lastpudding} + $wait) {
|
||||
sleep(rand(30));
|
||||
print "=> $conn->{channel}\n";
|
||||
$conn->privmsg($conn->{channel}, "$nick: " . pudding);
|
||||
$conn->{lastpudding} = time();
|
||||
}
|
||||
} else {
|
||||
my $wait = 24 * 3600 * (0.5 + 0.5*rand());
|
||||
my (undef, undef, undef, undef, undef, undef, $wday) = localtime(time());
|
||||
|
|
Reference in a new issue