Raised This Month: $51 Target: $400
 12% 

How are the admin files processed?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Remy Lebeau
Senior Member
Join Date: Dec 2009
Location: Sydney, Australia
Old 09-30-2013 , 21:12   How are the admin files processed?
Reply With Quote #1

I've just installed sourcebans, and I'm trying to work out how exactly it interacts with sourcemod in terms of setting up admins.

I used to use admin_simple.ini, and as far as I can tell all of the old content is still in there, however sourcebans seems to be overwriting admin_groups and admins.cfg.

I'm wondering how sourcemod works. Does it process BOTH admins.cfg and admin_simple.ini ? So if there's an old entry in the simple file (which sourcebans does not overwrite), and I remove it from sourcebans (thereby affecting admins.cfg), will sourcemod still grant access because of the entry in admins_simple?
Remy Lebeau is offline
Maxximou5
AlliedModders Donor
Join Date: Feb 2013
Old 09-30-2013 , 21:45   Re: How are the admin files processed?
Reply With Quote #2

First off, learn to post in the correct section next time, please. -> Sourcebans
Secondly, use the search function because this question has already been answered.
To be more specific, do not use admin_simple, just use sourcebans.
Finally, have a nice day.

Last edited by Maxximou5; 09-30-2013 at 21:46.
Maxximou5 is offline
Remy Lebeau
Senior Member
Join Date: Dec 2009
Location: Sydney, Australia
Old 09-30-2013 , 22:02   Re: How are the admin files processed?
Reply With Quote #3

Thank you for your reply. The thread you linked me to was quite helpful, however it did not answer my question. I posted in this section on purpose.

While the context of my question is my installation of sourcebans, my specific question was related to sourcemod. I will repeat it (clarifying and extending):

Does sourcemod process BOTH admins.cfg and admin_simple.ini (and if so, in what order)? So if there's an entry in the simple file, which does not have a corresponding entry in admins.cfg, will sourcemod still grant access because of the entry in admins_simple? If there is an entry in both, will it result in an error or will one overwrite the other?


ps. I tried hard to be civil, but looking at my join date I feel I've been here long enough to not need the "post in right place / use search" pep talk - I did what I did purposefully. Even this thead https://forums.alliedmods.net/showth...ple+admins.cfg (which I found by searching) doesn't answer the specific question about conflicts between the two, save to suggest that one might happen. I could have necro'd, but then I might have gotten the pep talk about necroing threads.

edit: I recognise that in one sense my question is answered by "do not use admin_simple, just use sourcebans.", however I prefer to know the intricacies of systems rather than just blanketing over what I don't know.

Last edited by Remy Lebeau; 09-30-2013 at 22:04.
Remy Lebeau is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 10-01-2013 , 03:11   Re: How are the admin files processed?
Reply With Quote #4

admin_simple is loaded after admins.cfg.

The following will happen if an entry exists in both:
  • Flags will be added to, none will get unset.
  • Immunity will be overwritten. (This might be worth changing, we should probably only increase it.)
  • They will be added to a named group if they aren't already in it.
  • The password will be overwritten. (If configured.)
__________________
asherkin is offline
Geek_Loco
SourceMod Donor
Join Date: May 2009
Old 10-01-2013 , 14:28   Re: How are the admin files processed?
Reply With Quote #5

I believe that SourceBans ignores and doesn't touch admins_simple.

As a side note, I consider admins_simple as my main file for SourceMod and use SourceBans only for admins that have ban rights and higher. So, all admins are in admins_simple, only the ones with ban rights get duplicated in SourceBans. I use admins _simple extensively because I can comment the crap out of the entries. I made sections in the file to suite my visual style, which makes it easier for me to find what I am looking for.

I also know another group that controls all admins and donators through SourceBans. It's easier for them because it is all one location on the web, no need to FTP to the server to edit files individually.

Hopefully I didn't go too far off track.
Geek_Loco is offline
Maxximou5
AlliedModders Donor
Join Date: Feb 2013
Old 10-01-2013 , 16:10   Re: How are the admin files processed?
Reply With Quote #6

Quote:
Originally Posted by Remy Lebeau View Post
Does sourcemod process BOTH admins.cfg and admin_simple.ini (and if so, in what order)? So if there's an entry in the simple file, which does not have a corresponding entry in admins.cfg, will sourcemod still grant access because of the entry in admins_simple? If there is an entry in both, will it result in an error or will one overwrite the other?
As asherkin mentioned
Quote:
Originally Posted by asherkin View Post
admin_simple is loaded after admins.cfg.
which we could infer that if sourcebans is loaded after, the .cfgs are then checked by sourcebans. As in the link I posted initially, sourcebans rehashes the admin files for the admins.cfg, which would be another passover for that file.
  • scan admins.cfg -> scan admins_simple.cfg -> rescan admins.cfg (sourcebans) -> end
  • any redundent admin would have the writes given in admins.cfg, if different groups are applied, conflicts may occur. I would suggest trying them and using sm_who to find out what is the true access rights.
Quote:
Originally Posted by Remy Lebeau View Post
ps. I tried hard to be civil, but looking at my join date I feel I've been here long enough to not need the "post in right place / use search" pep talk - I did what I did purposefully. Even this thead https://forums.alliedmods.net/showth...ple+admins.cfg (which I found by searching) doesn't answer the specific question about conflicts between the two, save to suggest that one might happen. I could have necro'd, but then I might have gotten the pep talk about necroing threads.

edit: I recognise that in one sense my question is answered by "do not use admin_simple, just use sourcebans.", however I prefer to know the intricacies of systems rather than just blanketing over what I don't know.
Everyone gets the "post in the right place" pep talk, especially myself should I do so. I believe this belongs in sourcebans; thus, I said what I said. As well, join date does not mean anything, people still can be ignorant of the fact. I have a much older account as well and learn new things still. Just to mention, inductive reasoning at it's finest, I gave you the tools and if you still needed help, I would, or as others would, as they did. Do not take anything personally.
Maxximou5 is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 10-01-2013 , 20:37   Re: How are the admin files processed?
Reply With Quote #7

Quote:
Originally Posted by Maxximou5 View Post
sourcebans rehashes the admin files for the admins.cfg, which would be another passover for that file.
The rehash reloads both files.
__________________
asherkin is offline
Remy Lebeau
Senior Member
Join Date: Dec 2009
Location: Sydney, Australia
Old 10-02-2013 , 22:59   Re: How are the admin files processed?
Reply With Quote #8

Thanks for the detailed information, all the posts were helpful!

@Greek Loco - that's interesting to hear how you manage it. I'd already migrated all of our donators into SB (I did a mass migration through a direct database insertion), however knowing a bit more details about it I might just revert to how you've done it (since we also use comments to manage it).
Remy Lebeau is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 10-03-2013 , 01:40   Re: How are the admin files processed?
Reply With Quote #9

As described in the topic Maxximou5 linked to, SourceBans does not read, check, scan or rehash the .cfg files, it only (optionally) writes them for backup purposes. sm_rehash and sm_reloadadmins only tell all admin plugins to reload the admins, in which case admin-flatfile.smx would read the .cfg files and SourceBans would fetch from MySQL.

Just to clarify some of the later posts which talk about SourceBans doing things it does not do.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.

Last edited by DJ Tsunami; 10-03-2013 at 01:42.
DJ Tsunami is offline
Maxximou5
AlliedModders Donor
Join Date: Feb 2013
Old 10-03-2013 , 01:52   Re: How are the admin files processed?
Reply With Quote #10

Thanks for clearing that up Tsunami.
Because... KNOWLEDGE IT POWER!
Maxximou5 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 11:21.


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