Player Admin by ][)ull ( Dull@ss-harvester.com ) - 7/11/00

----------------------------------------

Files and their placement:

PlayerAdminReadMe.txt -- this file: anywhere or no-where.
autoexec.cs -- enables the console: put this in your Scripts folder if you do not already have one.
PlayerAdmin.cs -- the admin script: Multiplayer folder, only needed by server hosts.
_PlayerAdmin.cs -- sets up keymaps: Keymaps folder, only needed by client (users)


----------------------------------------

Description:

     Player Admin is a combination of a server script with a client's keymap or console that gives the client
administrative abilities. In other words, you can allow friends or squadmates the ability to kick
undesirable persons intruding upon your private property (your server PC). These are a limited set
of functions that designed for people that are in-game. They are a way to avoide possible conflicts that
prevent the use of Telnet, and provide a simpler means for less scriptably knowledged persons. 


----------------------------------------

Hosting Instructions:

    Before setting up the admin functions you will want to change the password and distribute the new password to
anyone you want using it. To change the password you will have to edit the PlayerAdmin.cs file at aproximitly the
third line. You will want to change $AdminPW = "password"; to contain whatever password you want (but keep the quotes!).
To activate the script you will have to edit your Server_*whateverGoesHereForYou*.cs file. At the top you will need
to add the line:

exec("PlayerAdmin.cs");

Then all you have to do is follow the client set up instructions and play. A log of the admin's use will be saved
to the file AdminLog.txt

----------------------------------------

Use of the Admin function:

    There are two ways to use the Admin feature: the easy but limited way, and the flexible but 
more difficult way. The easy way is contains only three options:  get the IP of, kick, or ban your current target.
They have been set up to control-shift-I, control-shift-k, and control-shift-b. Be sure you have the correct target
before you ban them, there's no unban.

   Setting these up does require a little bit of work. You must extract the _PlayerAdmin.cs file to your keymaps
folder and then edit your keymap of choice (with notepad or another text editor). To do this, open the keymap you use 
(found by pressing f11 in-game) and adding to the bottom of the file :

exec("_PlayerAdmin.cs");

you will also need to edit the _PlayerAdmin.cs file so that \"password\" is replaced by the password that has been
given you by your host (Note: keep the \" as they are necessary).


--End of minimal skills portion--


    The second option requires some work and a little memorization (or copy-paste skills ;-). First you need
to enable your local console. To do this put the included autoexec.cs file in your scripts folder. If you
already have one, see instructions at the bottom of this document. If you already have your console enabled,
you've probably done this before, and don't need to do it again. In game you will now be able to push the ~ (tilde)
key and your local console will appear. Push ~ again to close it. Now for memorization and some other valuable commands.

Type into the console (and press enter):

playerlist();
   You will get a list of players in the game and his/her player number, amongst other info. The player
        number is used in the script, so you'll need to use this before you kick someone (or whatever).

Now for the real command, first the general format:

remoteEval(2048, Admin, "password", "command", "to whom", "reason", "how long");

You will need to replace anything in quotation marks with what you want to do, hence more complication
than the other option, but you can do much more. You will need to keep quotes around whatever you type
in, they are important.

**Everything in quotes is CASE SENSITIVE i.e. lowercase/uppercase must be exactly the same as indicated**

"password" --  the Admin password, in quotation marks.
"command"  --  "kick" "kill" "ban" "message" or "get IP".
"to whom"  --  player number (gotten through playerlist(); above). In "message" you can use "0" for everyone.
"reason"   --  optional in commands "kick" "kill" "ban". Sends messagebox with a reason for the action.
           --  required in commands "ban" "message".
           --  not used in command "get IP".
"how long" --  required in command "ban".
           --  not used in any other commands.


Description of commands:

"kick"     --  Kicks designated player off of the server. They are free to return. A message box pops up with the message in "reason".
"kill"     --  Kills designated player. A message box pops up with the message in "reason". Please don't abuse this one.
"ban"      --  Bans designated player from the server for "how long" minutes. A message box pops up with the message in "reason".
"message"  --  A message box pops up with the message in "reason" on the designated player's screen. Use "0" as "to whom" for everyone.
"get IP"   --  The designated player's IP is sent to the user in the chat box.






-----------Editing autoexec.cs------------

    This is only necessary if you have an autoexec.cs file in your scripts folder, and your console is
not enabled.  It is a fairly simple process.

1) Open autoexec.cs with a text editor (notepad works nicely)
2) Scroll down until you find a stop that looks like this: 
     // if the mission editor is on, give access to the console
     if ($me::enableMissionEditor) 
        Console::enable(true);
3) Change the line "if ($me::enableMissionEditor)" to "file://if ($me::enableMissionEditor)"
4) Save and close the file

The changes take effect the next time starsiege is *started*.


--END--

    Source: geocities.com/imverydull