]> de.git.xonotic.org Git - voretournament/voretournament.git/blob - server/rcon2irc/rename.pl
Rename a particle effect
[voretournament/voretournament.git] / server / rcon2irc / rename.pl
1 # VoreTournament rcon2irc plugin by Merlijn Hofstra licensed under GPL - rename.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 [ irc => q{:(([^! ]*)![^ ]*) (?i:PRIVMSG) [^&#%]\S* :(.*)} => sub {
7         my ($hostmask, $nick, $command) = @_;
8         
9         return 0 if (($store{logins}{$hostmask} || 0) < time());
10         
11         if ($command =~ m/^name (\d+) (.*)/i) {
12                 out dp => 0, "prvm_edictset server $1 netname \"$2\"";
13                 
14                 return -1;
15         }
16         
17         return 0;
18 } ],