dp_server_from_wan => "",
dp_listen_from_server => "",
dp_utf8_enable => $color_utf8_enable,
+ dp_timinglog => "",
irc_local => "",
irc_admin_password => "",
irc_admin_quote_re => "",
irc_reconnect_delay => 300,
+ irc_commands => "",
plugins => "",
);
$store{irc_nick} = "";
schedule sub {
my ($timer) = @_;
- out dp => 0, 'sv_cmd bans', 'status 1', 'log_dest_udp';
+ out dp => 0, 'sv_cmd banlist', 'status 1', 'log_dest_udp';
$store{status_waiting} = -1;
} => 1;
# this will clear irc_error_active
# we get here again when Q asks us
}
}
+
+ for(split / *; */, $store{irc_commands})
+ {
+ s/\$nick/$store{irc_nick}/g;
+ out irc => 1, $_;
+ }
# if we get here, we are on IRC
$store{irc_joined_channel} = 1;
schedule sub {
+ # wait 1 sec to let stuff calm down
out irc => 1, "JOIN $config{irc_channel}";
} => 1;
return 0;
if ($nick eq $store{irc_nick}) {
$store{irc_maxlen} = 510 - length($hostmask);
- $store{irc_joined_channel} = 1;
+ if($store{irc_joined_channel} == 1)
+ {
+ $store{irc_joined_channel} = 2;
+ }
print "* detected maximum line length for channel messages: $store{irc_maxlen}\n";
}
my ($all, $cpu, $lost, $avg, $max, $sdev) = @_;
return 0 # don't complain when just on the voting screen
if !$store{playing};
+ if(length $config{dp_timinglog})
+ {
+ open my $fh, '>>', $config{dp_timinglog}
+ or warn "open >> $config{dp_timinglog}: $!";
+ print $fh "@{[time]} $cpu $lost $avg $max $sdev $store{slots_active}\n"
+ or warn "print >> $config{dp_timinglog}: $!";
+ close $fh
+ or warn "close >> $config{dp_timinglog}: $!";
+ }
return 0 # don't complain if it was less than 0.5%
if $lost < 0.5;
return 0 # don't complain if nobody is looking
# not containing our own IP:port, or by rcon2irc_eval not being a defined command).
schedule sub {
my ($timer) = @_;
- out dp => 0, 'sv_cmd bans', 'status 1', 'log_dest_udp', 'rcon2irc_eval set dummy 1';
+ out dp => 0, 'sv_cmd banlist', 'status 1', 'log_dest_udp', 'rcon2irc_eval set dummy 1';
$store{status_waiting} = -1;
schedule $timer => (exists $store{dp_hostname} ? $config{dp_status_delay} : 1);;
} => 1;