Raised This Month: $154 Target: $400
 38% 

SM Addadmin


Post New Thread Reply   
 
Thread Tools Display Modes
Author
mateo10
Veteran Member
Join Date: Jan 2006
Plugin ID:
85
Plugin Version:
1.0
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    21 
    Plugin Description:
    Adds an admin to the admins_simple.ini file
    Old 07-12-2007 , 12:16   SM Addadmin
    Reply With Quote #1

    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.
    Attached Files
    File Type: sp Get Plugin or Get Source (addadmin.sp - 15845 views - 1.2 KB)

    Last edited by mateo10; 10-23-2007 at 12:17.
    mateo10 is offline
    1695
    Senior Member
    Join Date: Jan 2006
    Old 07-13-2007 , 04:24   Re: SM Addadmin
    Reply With Quote #2

    great ! Is the plugin stable ? with no conflicts ? ^^
    1695 is offline
    Shaman
    Senior Member
    Join Date: Dec 2006
    Location: Istanbul, Turkey
    Old 07-13-2007 , 04:39   Re: SM Addadmin
    Reply With Quote #3

    This directly adds the admin to "admins_simple.ini". No checks for existance so conflicts may happen.
    __________________
    Shaman is offline
    Send a message via ICQ to Shaman Send a message via AIM to Shaman Send a message via MSN to Shaman Send a message via Yahoo to Shaman
    mateo10
    Veteran Member
    Join Date: Jan 2006
    Old 07-13-2007 , 13:10   Re: SM Addadmin
    Reply With Quote #4

    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.
    mateo10 is offline
    Yogi Beer
    Junior Member
    Join Date: Jul 2007
    Old 07-13-2007 , 13:59   Re: SM Addadmin
    Reply With Quote #5

    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...
    Yogi Beer is offline
    mateo10
    Veteran Member
    Join Date: Jan 2006
    Old 07-14-2007 , 08:58   Re: SM Addadmin
    Reply With Quote #6

    Just change
    Code:
    BuildPath(Path_SM, szFile, sizeof(szFile), "configs/admins_simple.ini");
    to
    Code:
    BuildPath(Path_SM, szFile, sizeof(szFile), "configs/<filename>.ini");
    mateo10 is offline
    FlyingMongoose
    Veteran Member
    Join Date: Mar 2004
    Old 07-14-2007 , 09:54   Re: SM Addadmin
    Reply With Quote #7

    using admins_simple.ini does limit you in some functionality though.
    __________________
    Please do NOT PM for support.

    Only ask for support in plugin threads.

    TunedChaos.com - Precision Tuned Game Servers
    FlyingMongoose is offline
    pRED*
    Join Date: Dec 2006
    Old 07-14-2007 , 20:02   Re: SM Addadmin
    Reply With Quote #8

    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
    pRED* is offline
    Yogi Beer
    Junior Member
    Join Date: Jul 2007
    Old 07-15-2007 , 13:52   Re: SM Addadmin
    Reply With Quote #9

    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
    Yogi Beer is offline
    pRED*
    Join Date: Dec 2006
    Old 07-15-2007 , 20:19   Re: SM Addadmin
    Reply With Quote #10

    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.
    pRED* is offline
    Reply


    Thread Tools
    Display Modes

    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 15:38.


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