]> git.xonotic.org Git - xonotic/xonotic.git/blob - server/rcon2irc/echo-rcon.pl
Merge branch 'master' into divVerent/crypto2
[xonotic/xonotic.git] / server / rcon2irc / echo-rcon.pl
1 # Xonotic rcon2irc plugin by Merlijn Hofstra licensed under GPL - echo-rcon.pl
2 # Place this file inside the same directory as rcon2irc.pl and add the full filename to the plugins.
3
4 sub out($$@);
5
6 [ dp => q{server received rcon command from (.*):  (.*)} => sub {
7         my ($origin, $cmd) = @_;
8         my @dests = split ' ', $store{plugin_echo-rcon}->{dest};
9         return 0 if grep { $_ eq $origin } @dests; #do not relay rcon2irc commands
10         my $origin = color_dp2irc $origin;
11         out irc => 0, "PRIVMSG $config{irc_channel} :\00302* admin\017 command recieved from $origin: \00304$cmd\017";
12         return 0;
13 } ],
14
15 [ dp => q{"log_dest_udp" is "([^"]*)" \["[^"]*"\]} => sub {
16         my ($dest) = @_;
17         $store{plugin_echo-rcon}->{dest} = $dest;
18         return 0;
19 } ],