xonotic/server/rcon2irc/fastest_lap.pl
Stephan Stahl 2ec7592650 rm'd further nex-havoc references
replace nex with xonotic in a lot of places
2010-03-30 20:55:57 +00:00

25 lines
756 B
Raku

sub out($$@);
# chat: Xonotic server -> IRC channel, fastest record in race and ctf
[ dp => q{:recordset:(\d+):(.*)} => sub {
my ($id, $record) = @_;
my $nick = $store{"playernick_byid_$id"};
my $time;
if ($record < 60) {
$time = $record;
} else {
my $minutes = int($record/60);
my $seconds = $record - $minutes*60;
$time = "$minutes:$seconds";
}
if ($store{map} =~ m/^ctf_/) {
out irc => 0, "PRIVMSG $config{irc_channel} :* \00306record\017 $nick\017 set the fastest flag capture record with \00304$time\017 on \00304" . $store{map} . "\017";
} else {
out irc => 0, "PRIVMSG $config{irc_channel} :* \00306record\017 $nick\017 set the fastest lap record with \00304$time\017 on \00304" . $store{map} . "\017";
}
return 0;
} ],