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/)) {
|
if ($nick ne $mynick && ($text =~ /pudding/ || $text =~ /brums/)) {
|
||||||
print Dumper($event);
|
print Dumper($event);
|
||||||
|
my $wait = 300;
|
||||||
|
if (time() > $conn->{lastpudding} + $wait) {
|
||||||
sleep(rand(30));
|
sleep(rand(30));
|
||||||
print "=> $conn->{channel}\n";
|
print "=> $conn->{channel}\n";
|
||||||
$conn->privmsg($conn->{channel}, "$nick: " . pudding);
|
$conn->privmsg($conn->{channel}, "$nick: " . pudding);
|
||||||
$conn->{lastpudding} = time();
|
$conn->{lastpudding} = time();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
my $wait = 24 * 3600 * (0.5 + 0.5*rand());
|
my $wait = 24 * 3600 * (0.5 + 0.5*rand());
|
||||||
my (undef, undef, undef, undef, undef, undef, $wday) = localtime(time());
|
my (undef, undef, undef, undef, undef, undef, $wday) = localtime(time());
|
||||||
|
|
Reference in a new issue