|
|
@ -76,10 +76,10 @@ sub on_msg {
|
|
|
|
$conn->privmsg($conn->{channel}, "$nick: " . pudding);
|
|
|
|
$conn->privmsg($conn->{channel}, "$nick: " . pudding);
|
|
|
|
$conn->{lastpudding} = time();
|
|
|
|
$conn->{lastpudding} = time();
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
my $wait = 24 * 3600 * (rand()-0.5);
|
|
|
|
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());
|
|
|
|
if ($wday == $conn->{specialwday}) {
|
|
|
|
if ($wday == $conn->{specialwday}) {
|
|
|
|
$wait = 6 * 3600 * (rand()-0.5);
|
|
|
|
$wait = 6 * 3600 * (0.5 + 0.5*rand());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (time() > $conn->{lastpudding} + $wait) {
|
|
|
|
if (time() > $conn->{lastpudding} + $wait) {
|
|
|
|
print "=> $conn->{channel}\n";
|
|
|
|
print "=> $conn->{channel}\n";
|
|
|
|