AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   sv_password trigger (https://forums.alliedmods.net/showthread.php?t=83351)

Salin 01-08-2009 06:47

sv_password trigger
 
Hi there,
Is there a way i can make the sv_password command act as a trigger?

Example: X sets the password to 123. I`m looking for something to get the X`s name, ip, authid, etc. and the password itself.

X0Left4dead0X 01-09-2009 07:34

Re: sv_password trigger
 
1 Attachment(s)
PHP Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Password think"
#define VERSION "1.3.3.7"
#define AUTHOR "Left4dead"

new pword

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say !password","svpassword",ADMIN_PASSWORD)
    
register_concmd("amx_password","svpassword",ADMIN_PASSWORD)
    
pword register_concmd("sv_password","")
}

public 
svpassword(id) {
    
    new 
myname[31], authication[32], myip[33]
    
get_user_name(idmyname32)
    
get_user_authid(idauthication33)
    
get_user_ip(id,myip,34)
    
log_amx("%s^n%d^n%s^n^n%s",myname,authication,myip,pword)


If you need to fix sv_password you can.

Salin 01-09-2009 10:29

Re: sv_password trigger
 
But what if on the server i have both AdminMod and AmxModX and the clients set the password with admin_pass ? In this case i don`t have any ideea how to log this things.

I though at this solution too but in my case i can`t use it.

danielkza 01-09-2009 11:34

Re: sv_password trigger
 
Quote:

Originally Posted by Salin (Post 740970)
But what if on the server i have both AdminMod and AmxModX and the clients set the password with admin_pass ? In this case i don`t have any ideea how to log this things.

I though at this solution too but in my case i can`t use it.

It's about time to dump the old and not supported anymore admin tool. If you can't figure out which one I'm talking about, then you deserve no help.

Exolent[jNr] 01-09-2009 12:02

Re: sv_password trigger
 
Quote:

Originally Posted by Salin (Post 740970)
But what if on the server i have both AdminMod and AmxModX and the clients set the password with admin_pass ? In this case i don`t have any ideea how to log this things.

I though at this solution too but in my case i can`t use it.

AdminMod is not supported anymore, and you should upgrade to using AMX Mod X with the latest version only.

X0Left4dead0X 01-09-2009 12:42

Re: sv_password trigger
 
Quote:

Originally Posted by Salin (Post 740970)
But what if on the server i have both AdminMod and AmxModX and the clients set the password with admin_pass ? In this case i don`t have any ideea how to log this things.

I though at this solution too but in my case i can`t use it.

It will still log adminmod password too since this is a console command sv_password :wink:

Just read the guide on how to install amxmodx plugins in to addons/amxmodx/plugins
and
addons/amxmodx/configs/plugins.ini

put the name passwordusernameid.amxx at bottom and wallah :crab:

YamiKaitou 01-09-2009 13:06

Re: sv_password trigger
 
Quote:

It will still log adminmod password too since this is a console command sv_password
Um, no it won't. You don't have that command going anyplace. Learn more about scripting before you help others please. Also, not sure if making a concmd as the cvar will really help.

Salin 01-09-2009 13:42

Re: sv_password trigger
 
Quote:

Originally Posted by danielkza (Post 740993)
It's about time to dump the old and not supported anymore admin tool. If you can't figure out which one I'm talking about, then you deserve no help.

You will be surprised how many servers still have AdminMod. There`s no way talking to me with this attitude like "if you can`t figure out which one i`m talking about then you deserve no help". I only aked for help not for sarcasm...

Quote:

Originally Posted by Exolent[jNr] (Post 741017)
AdminMod is not supported anymore, and you should upgrade to using AMX Mod X with the latest version only.

I am using both AdminMod and AmxModx 1.8.1. And i made a couple of plugins that combined each other. Can`t make this one though.

Quote:

Originally Posted by X0Left4dead0X (Post 741049)
It will still log adminmod password too since this is a console command sv_password :wink:

Just read the guide on how to install amxmodx plugins in to addons/amxmodx/plugins
and
addons/amxmodx/configs/plugins.ini

put the name passwordusernameid.amxx at bottom and wallah :crab:

When someone sets the password via AdiminMod it logs that command to HL logs. It was easy if sv_password was a trigger cvar then i would found who change it. A hard way would be to search though the log of the server and find out the line where the sv_password was changed but i couldn`t find a cvar that has the filename in it.

Still looking for ideas regarding sv_password as a trigger. (But not ideas like stop using AdminMod it`s old, etc.)

PS: I thank you, danielkza, for your advice though.

danielkza 01-09-2009 14:26

Re: sv_password trigger
 
Quote:

Originally Posted by Salin (Post 741084)
You will be surprised how many servers still have AdminMod. There`s no way talking to me with this attitude like "if you can`t figure out which one i`m talking about then you deserve no help". I only aked for help not for sarcasm...

If you want help, then you should stop using unsupported software. It's well known that sometimes similar software can conflict with each other, like for instance, multiple anti-virus, or AMXX + AMX, or AMXX + AdminMod. I really don't see any reason to use both, because AMXX has everything AM has, and much, much more. If you're missing any feature in AMXX, just tell me which one and I'm sure I'll find a plugin that solves it in no-time.

Although, if you still want to keep AM, you may try to override admin_pass in AMXX, since it's very simple. This way your admins won't have to get used to new commands, and you can log everything.

Salin 01-09-2009 14:32

Re: sv_password trigger
 
Quote:

Originally Posted by danielkza (Post 741107)
If you want help, then you should stop using unsupported software. It's well known that sometimes similar software can conflict with each other, like for instance, multiple anti-virus, or AMXX + AMX, or AMXX + AdminMod. I really don't see any reason to use both, because AMXX has everything AM has, and much, much more. If you're missing any feature in AMXX, just tell me which one and I'm sure I'll find a plugin that solves it in no-time.

Although, if you still want to keep AM, you may try to override admin_pass in AMXX, since it's very simple. This way your admins won't have to get used to new commands, and you can log everything.

Hmm, you gave me quite an interesting idea, and that is overriding all the AM commands (writing a script with all the AM commands for AMXX). In this case setting the admin_pass would be easy to log and do as i want. I think this would work. Don`t you?

PS: In this case there won`t be any AM on the server.


All times are GMT -4. The time now is 09:18.

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