Raised This Month: $32 Target: $400
 8% 

sv_password Remover


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 07-07-2019 , 16:41   sv_password Remover
Reply With Quote #1

Hello, I need help with a plugin.

A plugin, which detects if server is locked, it should remove pass instantly.
OR more specifically I can explain it as if any value of sv_password "" than this, i.e: sv_password "abx", plugin instantly changes it to sv_password "" or don't allow it.

Sorry, I might had explained it poorly but I hope you get the idea, what I'm asking !!

Thanks in advance.

I'm using AMXX 1.90 [5249].
Alber9091 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-08-2019 , 01:08   Re: sv_password Remover
Reply With Quote #2

Just don't set the value.
__________________
fysiks is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 07-08-2019 , 01:58   Re: sv_password Remover
Reply With Quote #3

https://forums.alliedmods.net/showpo...12&postcount=8
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
Mordekay
Squirrel of Fortune
Join Date: Apr 2006
Location: Germany
Old 07-08-2019 , 02:11   Re: sv_password Remover
Reply With Quote #4

If you want to prevent someone setting a sv_password a plugin won't help you.
If he has the rights to set that value he also has the right to stop/pause a plugin.
The only real working solution will be: don't give rcon or appropriate flags to anyone you do not trust.
__________________

Mordekay is offline
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 07-08-2019 , 04:53   Re: sv_password Remover
Reply With Quote #5

Quote:
Originally Posted by fysiks View Post
Just don't set the value.
Its already set in server.cfg but we need to wait for map change for it.

Quote:
Originally Posted by iceeedr View Post
Not Working. May be its when server is empty, but I want, regardless of players number, may be with some check method every minute?
This might help to derived some code? https://forums.alliedmods.net/showthread.php?t=17450

Quote:
Originally Posted by Mordekay View Post
If you want to prevent someone setting a sv_password a plugin won't help you.
If he has the rights to set that value he also has the right to stop/pause a plugin.
The only real working solution will be: don't give rcon or appropriate flags to anyone you do not trust.
You never know, when someone turns out.

Last edited by Alber9091; 07-08-2019 at 07:12.
Alber9091 is offline
BesTKiLLeR
Junior Member
Join Date: Jun 2019
Location: 127.0.0.1
Old 07-08-2019 , 09:09   Re: sv_password Remover
Reply With Quote #6

Check this, it sets sv_password cvar to "" every second.
PHP Code:
#include <amxmodx>

#define PLUGIN "Anti sv_password Changer"
#define VERSION "1.0"
#define AUTHOR "BesT"
#define TASK_ID 19459

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
set_task(1.0"EverySecond"TASK_ID__"b")
}

public 
EverySecond() {
    
server_cmd("sv_password ^"^"")


Last edited by BesTKiLLeR; 07-08-2019 at 09:24. Reason: thEsp notify :/
BesTKiLLeR is offline
thEsp
BANNED
Join Date: Aug 2017
Old 07-08-2019 , 09:13   Re: sv_password Remover
Reply With Quote #7

You don't need amxmisc header, so remove it.
thEsp is offline
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 07-08-2019 , 09:37   Re: sv_password Remover
Reply With Quote #8

Quote:
Originally Posted by BesTKiLLeR View Post
Check this, it sets sv_password cvar to "" every second.
PHP Code:
#include <amxmodx>

#define PLUGIN "Anti sv_password Changer"
#define VERSION "1.0"
#define AUTHOR "BesT"
#define TASK_ID 19459

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
set_task(1.0"EverySecond"TASK_ID__"b")
}

public 
EverySecond() {
    
server_cmd("sv_password ^"^"")

It will create a alot of logs and will hang web console.

And same thing can be done with taskschedular in amxx.cfg

amx_task 60 "amx_cvar sv_password" "sr"

Just a thing confuses me, how can I use it: (Set password value?)

amx_task 60 "amx_cvar sv_password """ "sr" (I mean "" in "").

Well your idea is right, but what if other methods can be used? Like: client_disconnected (but its less reliable), any other idea like this? Or password remove on client_connect, every time client connect, other method can be tried that?

Ofc, if there will be no any other idea or suggestion, then I would have to go with it and will go with it.

PHP Code:
#include <amxmodx>

#define PLUGIN "Anti sv_password Changer"
#define VERSION "1.0"
#define AUTHOR "BesT"
#define TASK_ID 19459

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
set_task(60.0"RemovePass"TASK_ID__"b")
}

public 
RemovePass() {
    
server_cmd("sv_password ^"^"")


Last edited by Alber9091; 07-08-2019 at 10:10.
Alber9091 is offline
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 07-08-2019 , 09:42   Re: sv_password Remover
Reply With Quote #9

Quote:
Originally Posted by thEsp View Post
You don't need amxmisc header, so remove it.
No such plugin is active !! Yes, although miscstats is.
Alber9091 is offline
Alber9091
Veteran Member
Join Date: Jun 2014
Location: Karachi, Pakistan
Old 07-08-2019 , 10:09   Re: sv_password Remover
Reply With Quote #10

Or some check method can be used? Like this?
But According to Arkshine this plugin is poorly coded and don't even compile.

PHP Code:
#include <amxmodx>
#include <amxmisc>

public plugin_init()
{
    
register_plugin("anti sv_password""1.0""mix97mix")
    
check()
}

public 
check()
{
    new 
current[64]
    
get_pcvar_string(get_cvar_pointer("sv_password"), current63)
    
    if(
strlen(current) > && !equali(current,""))
        
set_cvar_string("sv_password","")
        
    
set_task(60.0,"check")

Alber9091 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:07.


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