tested and fixed a few issues in the flat file reader
fixed the admin_levels.cfg file --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40452
This commit is contained in:
parent
8c8b240617
commit
06fa51700f
@ -11,43 +11,51 @@ Levels
|
|||||||
*/
|
*/
|
||||||
Flags
|
Flags
|
||||||
{
|
{
|
||||||
"reservation" "a"
|
"reservation" "a" //Reserved slots
|
||||||
"kick" "b"
|
"generic" "b" //Generic admin, required for admins
|
||||||
"ban" "c"
|
"kick" "c" //Kick other players
|
||||||
"unban" "d"
|
"ban" "d" //Banning other players
|
||||||
"slay" "e"
|
"unban" "e" //Removing bans
|
||||||
"changemap" "f"
|
"slay" "f" //Slaying other players
|
||||||
"cvars" "g"
|
"changemap" "g" //Changing the map
|
||||||
"config" "h"
|
"cvars" "h" //Changing cvars
|
||||||
"chat" "i"
|
"config" "i" //Changing configs
|
||||||
"vote" "j"
|
"chat" "j" //Special chat privileges
|
||||||
"password" "k"
|
"vote" "k" //Voting
|
||||||
"rcon" "l"
|
"password" "l" //Password the server
|
||||||
"cheats" "m"
|
"rcon" "m" //Remote console
|
||||||
"custom1" "n"
|
"cheats" "n" //Change sv_cheats and related commands
|
||||||
"custom2" "o"
|
|
||||||
"custom3" "p"
|
|
||||||
"custom4" "q"
|
|
||||||
"custom5" "r"
|
|
||||||
"custom6" "s"
|
|
||||||
|
|
||||||
//Custom flags START
|
/**
|
||||||
//Custom flags END
|
* Custom flags can be used by plugins, but they can also be used to
|
||||||
|
* for you to expand on the previous groups, using Overrides.
|
||||||
|
*/
|
||||||
|
|
||||||
//Note - root is a magic access flag that grants all permissions.
|
"custom1" "o"
|
||||||
|
"custom2" "p"
|
||||||
|
"custom3" "q"
|
||||||
|
"custom4" "r"
|
||||||
|
"custom5" "s"
|
||||||
|
"custom6" "t"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Root is a magic access flag that grants all permissions.
|
||||||
|
* This should only be given to trusted administrators.
|
||||||
|
* Root users can only be targetted by other root users.
|
||||||
|
*/
|
||||||
"root" "z"
|
"root" "z"
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* By default, commands are registered with three pieces of information:
|
* By default, commands are registered with three pieces of information:
|
||||||
* 1)Command Name (for example, "csdm_enable")
|
* 1)Command Name (for example, "csdm_enable")
|
||||||
* 2)Command Group Name (for example, "CSDM")
|
* 2)Command Group Name (for example, "CSDM")
|
||||||
* 3)Command Level (for example, "changemap")
|
* 3)Command Level (for example, "changemap")
|
||||||
* You can override the default flags assigned to individual commands or command groups in this way.
|
* You can override the default flags assigned to individual commands or command groups in this way.
|
||||||
* To override a group, use the "@" character before the name. Example:
|
* To override a group, use the "@" character before the name. Example:
|
||||||
* Examples:
|
* Examples:
|
||||||
* "@CSDM" "i" // Override the CSDM group
|
* "@CSDM" "b" // Override the CSDM group to 'b' flag
|
||||||
* "csdm_enable" "j" // Override the csdm_enable command
|
* "csdm_enable" "bgi" // Override the csdm_enable command to 'bgi' flags
|
||||||
* Note that for overrides, order is important. In the above example, csdm_enable overwrites
|
* Note that for overrides, order is important. In the above example, csdm_enable overwrites
|
||||||
* any setting that csdm_enable previously had.
|
* any setting that csdm_enable previously had.
|
||||||
*/
|
*/
|
||||||
|
@ -35,24 +35,25 @@ LoadDefaultLetters()
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_FlagLetters['a'-'a'] = Admin_Reservation;
|
g_FlagLetters['a'-'a'] = Admin_Reservation;
|
||||||
g_FlagLetters['b'-'a'] = Admin_Kick;
|
g_FlagLetters['b'-'a'] = Admin_Generic;
|
||||||
g_FlagLetters['c'-'a'] = Admin_Ban;
|
g_FlagLetters['c'-'a'] = Admin_Kick;
|
||||||
g_FlagLetters['d'-'a'] = Admin_Unban;
|
g_FlagLetters['d'-'a'] = Admin_Ban;
|
||||||
g_FlagLetters['e'-'a'] = Admin_Slay;
|
g_FlagLetters['e'-'a'] = Admin_Unban;
|
||||||
g_FlagLetters['f'-'a'] = Admin_Changemap;
|
g_FlagLetters['f'-'a'] = Admin_Slay;
|
||||||
g_FlagLetters['g'-'a'] = Admin_Convars;
|
g_FlagLetters['g'-'a'] = Admin_Changemap;
|
||||||
g_FlagLetters['h'-'a'] = Admin_Config;
|
g_FlagLetters['h'-'a'] = Admin_Convars;
|
||||||
g_FlagLetters['i'-'a'] = Admin_Chat;
|
g_FlagLetters['i'-'a'] = Admin_Config;
|
||||||
g_FlagLetters['j'-'a'] = Admin_Vote;
|
g_FlagLetters['j'-'a'] = Admin_Chat;
|
||||||
g_FlagLetters['k'-'a'] = Admin_Password;
|
g_FlagLetters['k'-'a'] = Admin_Vote;
|
||||||
g_FlagLetters['l'-'a'] = Admin_RCON;
|
g_FlagLetters['l'-'a'] = Admin_Password;
|
||||||
g_FlagLetters['m'-'a'] = Admin_Cheats;
|
g_FlagLetters['m'-'a'] = Admin_RCON;
|
||||||
g_FlagLetters['n'-'a'] = Admin_Custom1;
|
g_FlagLetters['n'-'a'] = Admin_Cheats;
|
||||||
g_FlagLetters['o'-'a'] = Admin_Custom2;
|
g_FlagLetters['o'-'a'] = Admin_Custom1;
|
||||||
g_FlagLetters['p'-'a'] = Admin_Custom3;
|
g_FlagLetters['p'-'a'] = Admin_Custom2;
|
||||||
g_FlagLetters['q'-'a'] = Admin_Custom4;
|
g_FlagLetters['q'-'a'] = Admin_Custom3;
|
||||||
g_FlagLetters['r'-'a'] = Admin_Custom5;
|
g_FlagLetters['r'-'a'] = Admin_Custom4;
|
||||||
g_FlagLetters['s'-'a'] = Admin_Custom6;
|
g_FlagLetters['s'-'a'] = Admin_Custom5;
|
||||||
|
g_FlagLetters['t'-'a'] = Admin_Custom6;
|
||||||
g_FlagLetters['z'-'a'] = Admin_Root;
|
g_FlagLetters['z'-'a'] = Admin_Root;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,6 +108,8 @@ public SMCResult:ReadLevels_KeyValue(Handle:smc, const String:key[], const Strin
|
|||||||
flag = Admin_Reservation;
|
flag = Admin_Reservation;
|
||||||
} else if (StrEqual(key, "kick")) {
|
} else if (StrEqual(key, "kick")) {
|
||||||
flag = Admin_Kick;
|
flag = Admin_Kick;
|
||||||
|
} else if (StrEqual(key, "generic")) {
|
||||||
|
flag = Admin_Generic;
|
||||||
} else if (StrEqual(key, "ban")) {
|
} else if (StrEqual(key, "ban")) {
|
||||||
flag = Admin_Ban;
|
flag = Admin_Ban;
|
||||||
} else if (StrEqual(key, "unban")) {
|
} else if (StrEqual(key, "unban")) {
|
||||||
|
@ -158,7 +158,7 @@ ReadUsers()
|
|||||||
{
|
{
|
||||||
InitializeUserParser();
|
InitializeUserParser();
|
||||||
|
|
||||||
BuildPath(Path_SM, g_Filename, sizeof(g_Filename), "configs/admims.cfg");
|
BuildPath(Path_SM, g_Filename, sizeof(g_Filename), "configs/admins.cfg");
|
||||||
|
|
||||||
/* Set states */
|
/* Set states */
|
||||||
InitGlobalStates();
|
InitGlobalStates();
|
||||||
|
Loading…
Reference in New Issue
Block a user