kicking question
#4
Explanation:
The "kick" command requires an integer describing the client number -- not the player name.
Entering the player name, if it is strictly a string (such as "/kick V-Man"), causes the game to interpret the argument as 0 instead of the actual player you intended. Thus, whoever has cn 0 is more prone to accidental kick than everyone else. XD

Using tools.cfg, you can make a script that takes either a player name or the integer client number (and this is foiled by players with integers for names, in which case you'll want to kick based on client number).
alias kick_ [if (strstr (validcnumlist) $arg1) [kick $arg1] [kick (findcn $arg1)]]
or, if you prefer a more foolproof version,
alias kick_ [if (isint $arg1) [kick $arg1] [
loop i (listlen (validcnumlist)) [
  if (strcmp (findpn (at (validcnumlist) $i)) $arg1) [kick (findcn $arg1)] []]]]
The second one won't do anything at all if you misspell the player's name.
Thanks given by:


Messages In This Thread
kicking question - by matan - 24 Apr 11, 11:19AM
RE: kicking question - by OpenSource - 24 Apr 11, 11:25AM
RE: kicking question - by MykeGregory - 24 Apr 11, 12:53PM
RE: kicking question - by V-Man - 24 Apr 11, 03:17PM
RE: kicking question - by Gibstick - 24 Apr 11, 06:11PM
RE: kicking question - by V-Man - 25 Apr 11, 01:11AM
RE: kicking question - by Polusive - 29 Apr 11, 03:40PM
RE: kicking question - by Yarukinasu - 30 Apr 11, 07:03AM
RE: kicking question - by Frogulis - 30 Apr 11, 06:24AM
RE: kicking question - by lucky - 30 Apr 11, 06:44AM
RE: kicking question - by Thrawn - 30 Apr 11, 03:14PM
RE: kicking question - by Frogulis - 30 Apr 11, 07:17AM
RE: kicking question - by Xenon - 30 Apr 11, 02:24PM
RE: kicking question - by Polusive - 30 Apr 11, 02:57PM
RE: kicking question - by lucky - 30 Apr 11, 05:49PM
RE: kicking question - by Lantry - 30 Apr 11, 07:40PM
RE: kicking question - by Viper - 30 Apr 11, 08:15PM
RE: kicking question - by lucky - 30 Apr 11, 07:46PM