Raised This Month: $ Target: $400
 0% 

Sourcemod Admin Database


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
whitemorn
Junior Member
Join Date: Aug 2012
Old 08-23-2012 , 21:37   Sourcemod Admin Database
Reply With Quote #1

Once you have the admin database setup. Is there something you need to set so they admins check against the database? Once I remove the admins from the admins.cfg or admins_simple.ini the admins just loose their rights. I'm assuming I don't need to keep the admin info in the files otherwise I don't see the point of the admin database.

Thanks for replying.
whitemorn is offline
PresidentEvil
AlliedModders Donor
Join Date: Jun 2012
Old 08-23-2012 , 22:56   Re: Sourcemod Admin Database
Reply With Quote #2

the whole point of sourcemod is so you can control your admins from online (via database) and not have to worry about messing with the cfg files in your server, sourcemods uses a database to update your admins.cfg everytime the map changes
__________________
PresidentEvil is offline
whitemorn
Junior Member
Join Date: Aug 2012
Old 08-24-2012 , 12:20   Re: Sourcemod Admin Database
Reply With Quote #3

Well that makes more sense, I did not gather that is how it worked from the wiki page http://wiki.alliedmods.net/SQL_Admins_%28SourceMod%29

Regardless, that is not happening on map reloads or server restarts. I put 2 users into the database and expected to see them show up in the admins.cfg but they did not. The database tables are setup and populated

I do have the following loaded:
sql-admin-manager.smx
admin-sql-threaded.smx

And from 'sm plugins list' I do see:
SQL Admin Manager
SQL Admins (Prefetch)

I'm not seeing any errors in the log, so I gotta be missing something. Any ideas?
whitemorn is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 08-24-2012 , 12:29   Re: Sourcemod Admin Database
Reply With Quote #4

Quote:
Originally Posted by PresidentEvil View Post
the whole point of sourcemod is so you can control your admins from online (via database) and not have to worry about messing with the cfg files in your server, sourcemods uses a database to update your admins.cfg everytime the map changes
You're confusing SourceMod with SourceBans.

Quote:
Originally Posted by whitemorn View Post
Well that makes more sense, I did not gather that is how it worked from the wiki page http://wiki.alliedmods.net/SQL_Admins_%28SourceMod%29

Regardless, that is not happening on map reloads or server restarts. I put 2 users into the database and expected to see them show up in the admins.cfg but they did not. The database tables are setup and populated

I do have the following loaded:
sql-admin-manager.smx
admin-sql-threaded.smx

And from 'sm plugins list' I do see:
SQL Admin Manager
SQL Admins (Prefetch)

I'm not seeing any errors in the log, so I gotta be missing something. Any ideas?
You're checking the logs in addons/sourcemod/logs/errors_<date>.log?
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 08-24-2012 at 12:30.
Powerlord is offline
whitemorn
Junior Member
Join Date: Aug 2012
Old 08-24-2012 , 12:40   Re: Sourcemod Admin Database
Reply With Quote #5

I'm not talking about sourcebans, havent even looked at the plugin yet. I just want the users I have from the database to update to admin.cfg on map reloads.

There is no error_ files for today when I was testing this. The log file from switch maps shows no information on a database interaction.

Here is the log file from this morning when I was changing maps to see if this works.:

tf/addons/sourcemod/logs:

L 08/24/2012 - 07:23:00: SourceMod log file session started (file "L20120824.log") (Version "1.4.5-dev")
L 08/24/2012 - 07:23:00: -------- Mapchange to cp_dustbowl --------
L 08/24/2012 - 07:23:00: [simple-chatprocessor.smx] [SCP] Recognized mod [Team Fortress 2].
L 08/24/2012 - 07:23:00: [simple-chatprocessor.smx] [SCP] Loading translation file [scp.tf.phrases].
L 08/24/2012 - 07:25:16: [basecommands.smx] "[SDPY]Whitemorn<2><STEAM_0:1:XXX><>" changed map to "cp_coldfront"
L 08/24/2012 - 07:25:19: [SM] Changed map to "cp_coldfront"
L 08/24/2012 - 07:25:19: -------- Mapchange to cp_coldfront --------
L 08/24/2012 - 07:58:11: [mapchooser.smx] Voting for next map has started.
L 08/24/2012 - 08:513: [SM] Changed map to "ctf_2fort"
L 08/24/2012 - 08:514: -------- Mapchange to ctf_2fort --------
L 08/24/2012 - 090:58: [mapchooser.smx] Voting for next map has started.
L 08/24/2012 - 12:19:41: [basecommands.smx] "Console<0><Console><Console>" refreshed the admin cache.


Not sure if its worth adding but I'm running this on Centos 6 with a local database.

Last edited by whitemorn; 08-24-2012 at 12:41.
whitemorn is offline
PresidentEvil
AlliedModders Donor
Join Date: Jun 2012
Old 08-24-2012 , 13:01   Re: Sourcemod Admin Database
Reply With Quote #6

Quote:
Originally Posted by Powerlord View Post
You're confusing SourceMod with SourceBans.



You're checking the logs in addons/sourcemod/logs/errors_<date>.log?
lol srry i meant to say sourcebans, plz ignore what said before


whitemorn go ahead and copy paste your admin.cfg and other files here so we can take a look at it
__________________

Last edited by PresidentEvil; 08-24-2012 at 13:04.
PresidentEvil is offline
whitemorn
Junior Member
Join Date: Aug 2012
Old 08-24-2012 , 15:58   Re: Sourcemod Admin Database
Reply With Quote #7

Database.cfg

"Databases"
{
"driver_default" "mysql"

// When specifying "host", you may use an IP address, a hostname, or a socket file path

"default"
{
"driver" "default"
"host" "127.0.0.1"
"database" "sourcemod"
"user" "username"
"pass" "****"
//"timeout" "0"
//"port" "3306"
}

"storage-local"
{
"driver" "sqlite"
"database" "sourcemod-local"
}

"clientprefs"
{
"driver" "default"
"host" "127.0.0.1"
"database" "sourcemod"
"user" "username"
"pass" "****"
//"timeout" "0"
//"port" "3306"
}
}


admin.cfg

Admins
{
"Whitemorn"
{
"auth" "steam"
"identity" "STEAM_0:1:14778869"
"flags" "z"
}
}


The reset of the admins are in:

database: sourcemod
table: sm_admins

Table is setup as: (example record)
id | authtype | identity | password | flags | name | immunity
1 | steam | STEAM_0:1:14778869 | NULL | z | whitemorn | 99
whitemorn is offline
PresidentEvil
AlliedModders Donor
Join Date: Jun 2012
Old 08-24-2012 , 16:37   Re: Sourcemod Admin Database
Reply With Quote #8

as far as I know the only way to add/edit/remove admins via database is with sourcebans, with basic sm admin you have to add their steamid and other info to the admin.cfg manually
__________________
PresidentEvil is offline
whitemorn
Junior Member
Join Date: Aug 2012
Old 08-24-2012 , 17:35   Re: Sourcemod Admin Database
Reply With Quote #9

Ok thanks for looking.

I still dont understand what the point of http://wiki.alliedmods.net/SQL_Admins_%28SourceMod%29 sourcemod admin database is for then. Seems to have been a waste of time getting that running.
whitemorn is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 08-24-2012 , 20:57   Re: Sourcemod Admin Database
Reply With Quote #10

The SQL Admins plugins work fine, they will not modify your local admin files.
Use sm_who to see status of admins in-game, and sm_dump_admcache to dump a file with the full contents of the cache (since you're using prefetch this'll be fully populated on load).
__________________
asherkin 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 15:17.


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