From: Samual Date: Sun, 1 Jan 2012 19:44:44 +0000 (-0500) Subject: Merge remote branch 'origin/master' into samual/updatecommands X-Git-Tag: xonotic-v0.6.0~30^2~46^2~1 X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=commitdiff_plain;h=a39370ebba15e56b74b1a4a93ef0cd5abb5e84f3;hp=49a45eeff26ca019be0b989ca4f4e525ee9bc05a Merge remote branch 'origin/master' into samual/updatecommands --- diff --git a/all b/all index f69738a2..b451ac7d 100755 --- a/all +++ b/all @@ -1788,7 +1788,7 @@ case "$cmd" in verbose "$SELF" update-maps ;; release-qc) - verbose make -C Xonotic/source FTEQCC="../../../fteqcc/fteqcc.linux32" XON_BUILDSYSTEM=1 clean all + verbose env GIT_DIR="$d0/data/xonotic-data.pk3dir/.git" make -C Xonotic/source FTEQCC="$d0/Xonotic/fteqcc/fteqcc.linux32" XON_BUILDSYSTEM=1 clean all verbose rm -f Xonotic/source/qcsrc/*/fteqcc.log ;; release-buildpk3-transform-raw) diff --git a/server/rcon2irc/rcon2irc-example.conf b/server/rcon2irc/rcon2irc-example.conf index 2e031cdb..7a537991 100644 --- a/server/rcon2irc/rcon2irc-example.conf +++ b/server/rcon2irc/rcon2irc-example.conf @@ -21,6 +21,9 @@ irc_channel = #Xonotic-Pwayers # Users with a Q account listed here can use admin commands on the bot #irc_quakenet_authusers = a b c +# IRC on-connect commands +#irc_commands = PRIVMSG Admin :hello, I am there; MODE $nick +x + # Extra plug-ins to load #plugins = diff --git a/server/rcon2irc/rcon2irc.pl b/server/rcon2irc/rcon2irc.pl index ecc8d5aa..cb800e84 100755 --- a/server/rcon2irc/rcon2irc.pl +++ b/server/rcon2irc/rcon2irc.pl @@ -759,6 +759,7 @@ our %config = ( irc_admin_quote_re => "", irc_reconnect_delay => 300, + irc_commands => "", plugins => "", ); @@ -1062,10 +1063,17 @@ sub irc_joinstage($) # 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; @@ -1379,7 +1387,10 @@ sub cond($) 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"; }