----------------------------------------------------- ------------------------------------------------- Instructions for plugin_cavey_adminlog.sma 1.3 ------------------------------------------------- ----------------------------------------------------- Last revised 21:49 19/08/2002 1) How do I install this? 2) What extra functions does this add to my server? 3) How do I use the new functions? 4) How can I configure this plugin then?? 5) It isn't working, what is wrong with it? 6) Any questions?? /////// 1) How do I install this? //////////////////////////////////////// -----Win32------ 1) Place the uncompiled .sma in ../halflife/admin/scripting/myscripts. Place cavey.inc in ../halflife/admin/scripting/include directory. 2) Edit the .sma in a text editor if you feel the need. There should be no need, so skip to step 3. 3) Doubleclick the compile_all.bat 4) Find the ../halflife/admin/scripting/mybinaries directory and copy the .amx files. 5) Paste the .amx files into the ../halflife/{moddir}/addons/adminmod/scripts directory. 6) Add the names of the plugins to the plguin.ini in the {moddir}, ie for plugin_cavey_adminlog.amx add "addons/adminmod/scripts/plugin_cavey_adminlog.amx" to the TOP of the file. If you do not put it at the top, it will NOT work!! 7) Set file_access_read and file_access_write to 1 in your server.cfg If you dont, this will NOT work!!!! 8) Create a directory called "adminlogs" in the {moddir} and paste in the "loggedcmds.ini". If there is a command you want to monitor that is not in the "loggedcmds.ini", just add it as a new line to the bottom of the file. If you dont do this, it will sit there logging NOTHING. 9) The command "admin_adminlog" is available to those who have "ACCESS_RCON" priviledges. It should talk you through the process of making changes to the config. -----Linux------ Option 1 - As Win32, but use compile_all.sh on the Linux system instead of compile_all.bat Option 2 - Do the Win32 method to get a win32 amx. THEN use the Win32 to linux "Plugin Binaries Converter" from http://www.adminmod.org/index.php?go=downloads#tools /////// 2) What extra functions does this add to my server? //////////////// The extra functionalities it has are as follows. * If you suffer from, or even think you might suffer from abusive admins, this plugin will watch whatever commands you tell it to and log all usage of those commands. It even logs when people ATTEMPT to use commands!! * You can also set it to anounce the use of these commands to other admins present on the server. You can set the level it assumes defines an admin and you can make it STFU too. * Whenever it logs (or anounces) use of a command, it gives either their IP or WonID depending on the type of server that you run (IP for those on a LAN, WonID for those on the NET). These can also be used as the filenames instead of the user names. * The logs are tab-delimited so you can import them into Excel (or similar) with more ease than before. You can have them seperated by the plugin by day, admin or per day and per admin, or you can just have them lumped in one file. * Completely configurable using either variables in the "vault.ini" or from the Half-Life console, assuming you have access to use the command that is. And the command walks you through the use of it. The only thing it does not allow you to change is the level of admin that is able to use the command itsef, you need to edit the "vault.ini" to do that. * You can now have the port of the server included in the filename therefore showing which server the command was used on. This is good for servers on the same physical machine with different ports. /////// 3) How do I use the new functions? ////////////////////////////////// The plugin itself is designed to be install and forget. Once installed it will set itself up using the standard settings (see section 4) that I defined while I was writing it. THese settings are designed to leave the plugin running what it always has (that is logging the commands to a text file) with the maximum security for the admin. More details are in section 4. /////// 4) How can I configure this plugin then?? /////////////////////////// In your vault file you should find that you have the variables listed of ADMINLOG_SILENCE ADMINLOG_LOGTYPE ADMINLOG_FILTERCONSOLE ADMINLOG_ACCESSADMINLOG ADMINLOG_TELLADMIN ADMINLOG_ACCESSADMINALERT ADMINLOG_MULTIPLE_SERVERS ADMINLOG_LOGEVERYTHING ADMINLOG_LOGTOFILE But what does each of these define and how can I edit them? ADMINLOG_SILENCE This defines how the plugin runs. If it is set as silent (1) it will hide the existence of any commands it uses and will try to not alert any users to its presence. By default it is set to 0 which means it lets people see it, but not what it is logging. WARNING - Do NOT use ADMINLOG_SILENCE if you are having any troubles!! ADMINLOG_LOGTYPE Defines how the commands are actually logged. It is set to 1 by default which means it creates a new file for the log every day. A setting of 0 will put all logs in the same file, 2 will create a file per admin and a setting of 3 creates a new file per admin per day. A setting of 4 will create a file per admin by WonID or IP (depending on sv_lan) while 5 will also include the day. I really recommend setting it to 1 and leaving it as with 2 and 3 you get a lot of files very quickly and 0 just creates a file so huge it takes an age to process. ADMINLOG_FILTERCONSOLE Some plugins use the exec("admin_command ") line which means that the plugin uses another plugins command from the HLDS console. This happened a lot and there were a lot of lines from this in the file so I created an option to fiter it out. GIven that they are to block use of admin_command soon, this may be made redundant. Until then, the default setting is 1 (enabled). ADMINLOG_ACCESSADMINLOG This defines the level of user that is able to access the "admin_adminlog" command. I strongly advise you to leave it at its default level of 65536 (ACCESS_RCON). YOU CAN ONLY EDIT THIS SETTING FROM THE VAULT.INI!!!!! ADMINLOG_TELLADMIN This defines whether or not it anounces to the admins (see definition below) that a command has been used. This should help you deal with problems before they arise. ADMINLOG_ACCESSADMINALERT This defines the level that a user has got to have to hear the "TELLADMIN" text. The default is a paranoid 65536 (ACCESS_RCON) but I made a few levels available from the console of ACCESS_KICK, ACCESS_BAN and ACCESS_IMMUNITY depending on what sort of admin you are. From the vault.ini you can define whatever level access you want, but this is more from security fears than anything else :) ADMINLOG_MULTIPLE_SERVERS This defines whether to name the file and include the port number. If the port number is included (this is set to 1) you get an individual log per server if you have two servers running on the same physical machine. Default is 0 as most systems only ever run one server. ADMINLOG_LOGEVERYTHING This defines whether or not it should ignore the text file and just log everything. There are three settings, 0 logs from loggedcmds.ini and is recommended. A setting of 1 will ignore all commands that DONT start with "admin_". A setting of 2 logs absolutly everything. If it gets passed to the server this will log it, which could make for large log files. I strongly recommend you leave this at 0 (or maybe 1 if you REALLY must) unless you really want it to spam you with useless commands like "jointeam", "menuselect" and "say"...... ADMINLOG_LOGTOFILE This defines whether or not it logs to a text file or not. This is the bread and butter of this plugin, but I thought I would make it available for those who want to use it as meerly a way to anounce commands. /////// 5) It isn't working, what is wrong with it? /////////////////////////////// Okay, a list of symptoms and problems in the order that you ought to check them..... Symptom - It is not compiling when I click the compile_all file and the amx is 0 bytes in size. Possible Causes - Are you using the correct version of the AdminMod? This now requires AdminMod 2.51 or newer. - Okay, for this you need to check for a new version of the plugin from http://gosh.ex.ac.uk/~py99jan/ . If the version available there still has the problem I will want you to e-mail me the plugin_cavey_adminlog_error.txt file or ICQ me about the problem. Please see the details at the bottom of this file. Symptom - This is not generating any logs. Possible Causes - There is no adminlogs directory in the mod directory for the plugin to put the files in. - There is no loggedcmds.ini, so it is not actually logging any commands - File_access_read and/or file_access_write are not set to 1. They BOTH need to be set to 1. Symptom - It is not anouncing the use of commands to me. Possible Causes - You dont have the access to hear it. Edit the level in the vault file to something you do have access to. (See ADMINLOG_ACCESSADMINALERT above) - You have not turned it on. (See ADMINLOG_TELLADMIN above). I have not found any other problems, if you find one, please tell me. Please do not ask about installtion issues with general plugins, I am a scripter not a paid helpdesk attendee. /////// 6) Any questions?? //////////////////////////////////////////////////////// Author - Joe "Caveman" Noyes A/S/L - 20/Male/Exeter and Droitwich Spa, England. ICQ# - 70710878 Home Page - http://gosh.ex.ac.uk/~py99jan/ E-mail/MSN - dmcaveman@hotmail.com