AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   sv_password Remover (https://forums.alliedmods.net/showthread.php?t=317326)

Alber9091 07-07-2019 16:41

sv_password Remover
 
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].

fysiks 07-08-2019 01:08

Re: sv_password Remover
 
Just don't set the value.

iceeedr 07-08-2019 01:58

Re: sv_password Remover
 
https://forums.alliedmods.net/showpo...12&postcount=8

Mordekay 07-08-2019 02:11

Re: sv_password Remover
 
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.

Alber9091 07-08-2019 04:53

Re: sv_password Remover
 
Quote:

Originally Posted by fysiks (Post 2658233)
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 (Post 2658241)

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 (Post 2658243)
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.

BesTKiLLeR 07-08-2019 09:09

Re: sv_password Remover
 
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 ^"^"")



thEsp 07-08-2019 09:13

Re: sv_password Remover
 
You don't need amxmisc header, so remove it.

Alber9091 07-08-2019 09:37

Re: sv_password Remover
 
Quote:

Originally Posted by BesTKiLLeR (Post 2658290)
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 ^"^"")



Alber9091 07-08-2019 09:42

Re: sv_password Remover
 
Quote:

Originally Posted by thEsp (Post 2658291)
You don't need amxmisc header, so remove it.

No such plugin is active !! Yes, although miscstats is.

Alber9091 07-08-2019 10:09

Re: sv_password Remover
 
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")




All times are GMT -4. The time now is 00:48.

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