From f72f4f32e4d0aaa366f64e6f74c9230702203029 Mon Sep 17 00:00:00 2001 From: Bukz Date: Thu, 23 Aug 2012 23:42:03 +0000 Subject: [PATCH] cleanup git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6860 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- config/admin.cfg | 25 ------------------------- config/mdarray.cfg | 9 --------- config/scripts.cfg | 29 +++++++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 34 deletions(-) diff --git a/config/admin.cfg b/config/admin.cfg index d5bacbc2..f53cc0ed 100644 --- a/config/admin.cfg +++ b/config/admin.cfg @@ -1,5 +1,3 @@ -ingall = 0 - const kick [ callvote 0 $arg1 $arg2 ] const ban [ callvote 1 $arg1 $arg2 ] const removebans [ callvote 2 $arg1 ] @@ -7,29 +5,6 @@ const mastermode [ callvote 3 $arg1 ] const autoteam [ callvote 4 $arg1 ] const forceteam [ callvote 5 $arg1 ] const forceme [ forceteam (player1 cn) ] -const ignoreall [ if $connected [ ingall = 1; loop ia 21 [ ignore $ia ]; echo (blue)NOTE: (white)All clients currently on the server were ignored. ] ] -const unignoreall [ if $connected [ ingall = 0; clearignored; echo (blue)NOTE: (white)All clients currently on the server were unignored. ] ] -const ignoreteam [ - if (curmodeattr team) [ - _arg1 = (toupper $arg1) - if (|| (strcmp $_arg1 CLA) (strcmp $_arg1 RVSF)) [ - loop itl 21 [ - if (isclient $itl) [ - if (= (player $itl team) (at "0 1" (strcmp $_arg1 RVSF))) [ ignore $itl ] - ] - ] - ] [ - if (checkrange $_arg1 0 1) [ - loop itl 21 [ - if (isclient $itl) [ - if (= (player $itl team) $_arg1) [ ignore $itl ] - ] - ] - ] - ] - ] [ echo (red)Error: (white)Not in a team mode. ] -] -const ignoreenemy [ ignoreteam (at "0 1" (! (player1 team))) ] const giveadmin [ callvote 6 $arg1 ] const map [ callvote 7 $arg1 $arg2 ] const recorddemo [ callvote 8 1 ] diff --git a/config/mdarray.cfg b/config/mdarray.cfg index 469f5da1..2ef306b1 100644 --- a/config/mdarray.cfg +++ b/config/mdarray.cfg @@ -29,15 +29,6 @@ getQuotePosition = [ ] ] -removeLeadingWhitespace = [ - newstr = ""; gotchar = 0 - loop re (strlen $arg1) [ - if (&& (! $gotchar) (! (testchar (substr $arg1 $re 1) 7))) [ gotchar = 1 ] - if $gotchar [ newstr = (concatword $newstr (substr $arg1 $re 1)) ] - ] - result $newstr -] - reverseString = [ oldstr = $arg1 newstr = "" diff --git a/config/scripts.cfg b/config/scripts.cfg index 732eb927..0ed01853 100644 --- a/config/scripts.cfg +++ b/config/scripts.cfg @@ -109,6 +109,7 @@ const MODES "tdm coop dm surv ts ctf pf btdm bdm lss osok tosok bosok htf tktf k const NUM_MODES (listlen $MODES) const PUNCTUATION "QUOTES BRACKETS PARENTHESIS _$_ QUOTE PERCENT" const MAX_BOT_MATCH_LENGTH 60 +const MAX_ARGS 24 const ENT_NUM_ATTRS 4 loop g (listlen $PUNCTUATION) [ const (at $PUNCTUATION $g) $g ] @@ -371,6 +372,34 @@ const convertcase [ ] ] +ingall = 0 + +const ignoreall [ if $connected [ ingall = 1; loop ia 21 [ ignore $ia ]; echo (blue)NOTE: (white)All clients currently on the server were ignored. ] ] +const unignoreall [ if $connected [ ingall = 0; clearignored; echo (blue)NOTE: (white)All clients currently on the server were unignored. ] ] + +const ignoreteam [ + if (curmodeattr team) [ + _arg1 = (toupper $arg1) + if (|| (strcmp $_arg1 CLA) (strcmp $_arg1 RVSF)) [ + loop itl 21 [ + if (isclient $itl) [ + if (= (player $itl team) (at "0 1" (strcmp $_arg1 RVSF))) [ ignore $itl ] + ] + ] + ] [ + if (checkrange $_arg1 0 1) [ + loop itl 21 [ + if (isclient $itl) [ + if (= (player $itl team) $_arg1) [ ignore $itl ] + ] + ] + ] + ] + ] [ echo (red)Error: (white)Not in a team mode. ] +] + +const ignoreenemy [ ignoreteam (at "0 1" (! (player1 team))) ] + // Simple claim-admin script for one single-server. // Fill in the 3 aliases below, and uncomment the below line to activate. // bind F3 "customclaimadminscript"