r4720 - trunk/Docs/server/rcon2irc
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Fri Oct 10 13:02:56 EDT 2008
Author: div0
Date: 2008-10-10 13:02:44 -0400 (Fri, 10 Oct 2008)
New Revision: 4720
Modified:
trunk/Docs/server/rcon2irc/rcon2irc-example.conf
trunk/Docs/server/rcon2irc/rcon2irc.pl
Log:
irc_trigger
Modified: trunk/Docs/server/rcon2irc/rcon2irc-example.conf
===================================================================
--- trunk/Docs/server/rcon2irc/rcon2irc-example.conf 2008-10-10 16:25:04 UTC (rev 4719)
+++ trunk/Docs/server/rcon2irc/rcon2irc-example.conf 2008-10-10 17:02:44 UTC (rev 4720)
@@ -18,6 +18,9 @@
# Extra plug-ins to load
#plugins =
+# Alternate IRC trigger (can be used instead of nickname to send stuff to the server)
+#irc_trigger = nexnexnex
+
# Tuning
#dp_server_from_wan =
#dp_listen = 141.2.16.23:27771
Modified: trunk/Docs/server/rcon2irc/rcon2irc.pl
===================================================================
--- trunk/Docs/server/rcon2irc/rcon2irc.pl 2008-10-10 16:25:04 UTC (rev 4719)
+++ trunk/Docs/server/rcon2irc/rcon2irc.pl 2008-10-10 17:02:44 UTC (rev 4720)
@@ -413,6 +413,7 @@
irc_user => undef,
irc_channel => undef,
irc_ping_delay => 120,
+ irc_trigger => "",
irc_nickserv_password => "",
irc_nickserv_identify => 'PRIVMSG NickServ :IDENTIFY %2$s',
@@ -1052,7 +1053,7 @@
} ],
# chat: IRC channel -> Nexuiz server
- [ irc => q{:([^! ]*)![^ ]* (?i:PRIVMSG) (?i:(??{$config{irc_channel}})) :(?i:(??{$store{irc_nick}}))(?: |: ?)(.*)} => sub {
+ [ irc => q{:([^! ]*)![^ ]* (?i:PRIVMSG) (?i:(??{$config{irc_channel}})) :(?i:(??{$store{irc_nick}}))(?: |: ?|, ?)(.*)} => sub {
my ($nick, $message) = @_;
$nick = color_dpfix $nick;
# allow the nickname to contain colors in DP format! Therefore, NO color_irc2dp on the nickname!
@@ -1062,6 +1063,22 @@
return 0;
} ],
+ (
+ length $config{irc_trigger}
+ ?
+ [ irc => q{:([^! ]*)![^ ]* (?i:PRIVMSG) (?i:(??{$config{irc_channel}})) :(?i:(??{$config{irc_trigger}}))(?: |: ?|, ?)(.*)} => sub {
+ my ($nick, $message) = @_;
+ $nick = color_dpfix $nick;
+ # allow the nickname to contain colors in DP format! Therefore, NO color_irc2dp on the nickname!
+ $message = color_irc2dp $message;
+ $message =~ s/(["\\])/\\$1/g;
+ out dp => 0, "rcon2irc_say_as \"$nick on IRC\" \"$message\"";
+ return 0;
+ } ]
+ :
+ ()
+ ),
+
# irc: CTCP VERSION reply
[ irc => q{:([^! ]*)![^ ]* (?i:PRIVMSG) (?i:(??{$store{irc_nick}})) :\001VERSION( .*)?\001} => sub {
my ($nick) = @_;
More information about the nexuiz-commits
mailing list