AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   Auto Remove Password ( auto_remove_pass ) (https://forums.alliedmods.net/showthread.php?t=43486)

_KaszpiR_ 08-19-2006 12:50

Auto Remove Password ( auto_remove_pass )
 
1 Attachment(s)
Description
* This plugin will execute defined comamnds on server if it's empty for some time. By default it was used as only password remover, but it was extended to handle execution of extra commands (like executing some config)
* So if someone got a server for rent and the clan after war forget to execute some basic commands - here you got this plugin.

Detailes description
Usage:
- open file addons\amx\config\amx.cfg (just an example)
- add these lines to amx.cfg only if you don't like defaults:
arp_checkdelay <delay>
arp_checktimes <number of checks>
arp_command <string>
arp_setpass <string>
- save the changes to file amx.cfg :)

CVAR explanation
arp_checkdelay <X> - delay in seconds (replace <X> with seconds) between each check (default is 60 seconds)
arp_checktimes <X> - (replace <X> with number) number of checks before plugin removes password from the server (default is 5 checks)
If you leave defaults (you don't add any lines to admin.cfg) then the plugin will remove the password from the server after 5 minutes (60 seconds * 5 = 300 seconds = 5 minutes).
arp_command <string> - execute the extra command (replace <string> with commands set without quotes) after the time (after setting/clearing sv_password)
arp_setpass <string> - (replace <string> with password set without quotes) set the given sv_password to the string value, set to arp_setpass "" to clear the password
arp_bots <X> - the number <X> can be
1 treat bots as real players, the HLTV is also
0 - do not reat bots as real players (default)

Example 1 (basic setting pass)
Put to amxx.cfg
Code:

arp_checkdelay 30
arp_checktimes 3
arp_setpass "some_server_password"

Example 2 (basic clearing pass)
Put to amxx.cfg
Code:

arp_checkdelay 30
arp_checktimes 3
arp_setpass "";// clearing pass

Example 2 (executing additional commands after setting pass)
Put to amxx.cfg
Code:

arp_checkdelay 30
arp_checktimes 3
arp_setpass "for_rent" ; // clear sv_password in this way
arp_command "exec server.cfg;amx_matchstop" ;

Example 3 (executing a config):
Put to amxx.cfg
Code:

arp_checkdelay 30
arp_checktimes 3
arp_command "exec clear_server.cfg"
arp_setpass "" ; // clear sv_password in this way

and in cstrtike\clear_server.cfg you place some commands you want to execute:
Code:

writeip
writeid
servercfgfile server.cfg
mapcyclefile mapcycyle.txt
say Defaults Loaded
exec server.cfg
changelevel de_dust

Extra
Originally made by Marach for AMX Mod (it was only clearing password)
(c) Copyright 2003 by Marach ([email protected], ICQ: 242122535, AIM: marach24, MSN IM: [email protected])

This file is provided as is (no warranties).
version 1.2 by _KaszpiR_ http://nvt.prv.pl

Xanimos 12-12-2006 13:06

Re: Auto Remove Password ( auto_remove_pass )
 
The normal auto remove password on empty server has already been ported by GHW_Chronic here http://forums.alliedmods.net/showthread.php?t=17450 so I would recommend changing the name since you did change the functionality. Auto config on empty server or something similar.

s p l i t 12-12-2006 13:39

Re: Auto Remove Password ( auto_remove_pass )
 
In some places you need to change amx.cfg to amxx.cfg and please format the code so that it is readable.

GHW_Chronic 12-14-2006 19:50

Re: Auto Remove Password ( auto_remove_pass )
 
Quote:

Originally Posted by s p l i t (Post 414523)
In some places you need to change amx.cfg to amxx.cfg and please format the code so that it is readable.

This is true, in your how to: you need to change amx.cfg -> amxx.cfg

GHW_Chronic 12-20-2006 21:08

Re: Auto Remove Password ( auto_remove_pass )
 
i dont think this works well enough to be approved as well you should read from a cfg rather than a cvar. maybe try again later.


All times are GMT -4. The time now is 11:10.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.