AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   SM Addadmin (https://forums.alliedmods.net/showthread.php?t=57829)

mateo10 07-12-2007 12:16

SM Addadmin
 
2 Attachment(s)
SM Addadmin

Commands
  • sm_addadmin <SteamID|Name|IP> <Flags> <Password> (it is not necessary to add a password)

Have fun!

Updated. The security risk is (I hope), removed.

1695 07-13-2007 04:24

Re: SM Addadmin
 
great ! Is the plugin stable ? with no conflicts ? ^^

Shaman 07-13-2007 04:39

Re: SM Addadmin
 
This directly adds the admin to "admins_simple.ini". No checks for existance so conflicts may happen.

mateo10 07-13-2007 13:10

Re: SM Addadmin
 
I'm trying to add a new command, sm_removeadmin <SteamID|Name|IP>, but I don't know how to delete a line from a file.

Yogi Beer 07-13-2007 13:59

Re: SM Addadmin
 
I use the normal admin file... is it hard to change to this file instead of the simple admin? I might just be an idiot for not using the simple which would be mybad...

mateo10 07-14-2007 08:58

Re: SM Addadmin
 
Just change
Code:
BuildPath(Path_SM, szFile, sizeof(szFile), "configs/admins_simple.ini");
to
Code:
BuildPath(Path_SM, szFile, sizeof(szFile), "configs/<filename>.ini");

FlyingMongoose 07-14-2007 09:54

Re: SM Addadmin
 
using admins_simple.ini does limit you in some functionality though.

pRED* 07-14-2007 20:02

Re: SM Addadmin
 
You can't remove lines from a file..

Best thing to do is open the file for reading, open another file for writing (say called admins_simple2.txt) then read a line from one and write it into the other. Once you get to the line you want to delete, skip the writing step.

Once your finished close both files, delete admins_simple.txt and rename admins_simple2.txt to admins_simple.txt

Yogi Beer 07-15-2007 13:52

Re: SM Addadmin
 
that seems like a bit of work just for removing stuff... wont removing be added to sourcemod? I wont use this plugin unless it can do the advanced admin configs... and I'm not in a stage to code this as I'm a n00b and working on first plugin doing something alot easier imo. :-D

pRED* 07-15-2007 20:19

Re: SM Addadmin
 
Well while I'm attempting to be helpfull.. I'm about 99% sure that everything you need to process the advanced admin file is in textparse.inc... Don't know much about it though.


All times are GMT -4. The time now is 16:42.

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