Spring Cleaning, Part Ichi (1)
Various minor things done to project files Updated sample extension project file and updated makefile to the new unified version (more changes likely on the way) Updated regex project file and makefile --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401971
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
Groups
|
||||
{
|
||||
/**
|
||||
* Allowed properties for a group:
|
||||
*
|
||||
* "flags" - Flag string.
|
||||
* "immunity" - Immunity level number, or a group name.
|
||||
* If the group name is a number, prepend it with an
|
||||
* '@' symbol similar to admins_simple.ini. Users
|
||||
* will only inherit the level number if it's higher
|
||||
* than their current value.
|
||||
*/
|
||||
"Default"
|
||||
{
|
||||
"immunity" "1"
|
||||
}
|
||||
|
||||
"Full Admins"
|
||||
{
|
||||
/**
|
||||
* You can override commands and command groups here.
|
||||
* Specify a command name or group and either "allow" or "deny"
|
||||
* Examples:
|
||||
* ":CSDM" "allow"
|
||||
* "csdm_enable" "deny"
|
||||
*/
|
||||
Overrides
|
||||
{
|
||||
}
|
||||
"flags" "abcdefghiz"
|
||||
|
||||
/* Largish number for lots of in-between values. */
|
||||
"immunity" "99"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* There is no reason to edit this file. Core uses this to map each named
|
||||
* access type to a given ASCII character. The names are all pre-defined.
|
||||
*/
|
||||
Levels
|
||||
{
|
||||
/**
|
||||
* These are the default role flag mappings.
|
||||
* You can assign new letters for custom purposes, however you should
|
||||
* not change the default names, as SourceMod hardcodes these.
|
||||
*/
|
||||
Flags
|
||||
{
|
||||
"reservation" "a" //Reserved slots
|
||||
"generic" "b" //Generic admin, required for admins
|
||||
"kick" "c" //Kick other players
|
||||
"ban" "d" //Banning other players
|
||||
"unban" "e" //Removing bans
|
||||
"slay" "f" //Slaying other players
|
||||
"changemap" "g" //Changing the map
|
||||
"cvars" "h" //Changing cvars
|
||||
"config" "i" //Changing configs
|
||||
"chat" "j" //Special chat privileges
|
||||
"vote" "k" //Voting
|
||||
"password" "l" //Password the server
|
||||
"rcon" "m" //Remote console
|
||||
"cheats" "n" //Change sv_cheats and related commands
|
||||
|
||||
/**
|
||||
* Custom flags can be used by plugins, but they can also be used to
|
||||
* for you to expand on the previous groups, using Overrides.
|
||||
*/
|
||||
|
||||
"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 target anyone regardless of immunity,
|
||||
* however, they themselves are not automatically immune.
|
||||
*/
|
||||
"root" "z"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
Overrides
|
||||
{
|
||||
/**
|
||||
* By default, commands are registered with three pieces of information:
|
||||
* 1)Command Name (for example, "csdm_enable")
|
||||
* 2)Command Group Name (for example, "CSDM")
|
||||
* 3)Command Level (for example, "changemap")
|
||||
*
|
||||
* 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:
|
||||
* Examples:
|
||||
* "@CSDM" "b" // Override the CSDM group to 'b' flag
|
||||
* "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
|
||||
* any setting that csdm_enable previously had.
|
||||
*
|
||||
* You can make a command completely public by using an empty flag string.
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* List config files here (relative to moddir) to have them added to the exec config menu list
|
||||
* Left side is the filename, right side is the text to be added to the menu
|
||||
*/
|
||||
Configs
|
||||
{
|
||||
"cfg/server.cfg" "Standard Server Setup"
|
||||
"cfg/sourcemod/sm_warmode_on.cfg" "War Mode On"
|
||||
"cfg/sourcemod/sm_warmode_off.cfg" "War Mode Off"
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* The default sorting is designed to look familiar to Mani's admin menu.
|
||||
* You may re-order items here for your own menu. Any items not explicitly
|
||||
* sorted will be sorted by their final translated phrases for each given client.
|
||||
*/
|
||||
|
||||
"Menu"
|
||||
{
|
||||
"PlayerCommands"
|
||||
{
|
||||
"item" "sm_slay"
|
||||
"item" "sm_slap"
|
||||
"item" "sm_kick"
|
||||
"item" "sm_ban"
|
||||
"item" "sm_gag"
|
||||
"item" "sm_burn"
|
||||
"item" "sm_beacon"
|
||||
"item" "sm_freeze"
|
||||
"item" "sm_timebomb"
|
||||
"item" "sm_firebomb"
|
||||
"item" "sm_freezebomb"
|
||||
}
|
||||
|
||||
"ServerCommands"
|
||||
{
|
||||
"item" "sm_map"
|
||||
"item" "sm_execcfg"
|
||||
"item" "sm_reloadadmins"
|
||||
}
|
||||
|
||||
"VotingCommands"
|
||||
{
|
||||
"item" "sm_cancelvote"
|
||||
"item" "sm_votemap"
|
||||
"item" "sm_votekick"
|
||||
"item" "sm_voteban"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
|
||||
/**
|
||||
* USE THIS SECTION TO DECLARE DETAILED ADMIN PROPERTIES.
|
||||
*
|
||||
* Each admin should have its own "Admin" section, followed by a name.
|
||||
* The name does not have to be unique.
|
||||
*
|
||||
* Available properties: (Anything else is filtered as custom)
|
||||
* "auth" - REQUIRED - Auth method to use. Built-in methods are:
|
||||
* "steam" - Steam based authentication
|
||||
* "name" - Name based authentication
|
||||
* "ip" - IP based authentication
|
||||
* Anything else is treated as custom.
|
||||
* Note: Only one auth method is allowed per entry.
|
||||
*
|
||||
* "identity" - REQUIRED - Identification string, for example, a steamid or name.
|
||||
* Note: Only one identity is allowed per entry.
|
||||
*
|
||||
* "password" - Optional password to require.
|
||||
* "group" - Adds one group to the user's group table.
|
||||
* "flags" - Adds one or more flags to the user's permissions.
|
||||
* "immunity" - Sets the user's immunity level (0 = no immunity).
|
||||
* Immunity can be any value. Admins with higher
|
||||
* values cannot be targetted. See sm_immunity_mode
|
||||
* to tweak the rules. Default value is 0.
|
||||
*
|
||||
* Example:
|
||||
"BAILOPAN"
|
||||
{
|
||||
"auth" "steam"
|
||||
"identity" "STEAM_0:1:16"
|
||||
"flags" "abcdef"
|
||||
}
|
||||
*
|
||||
*/
|
||||
Admins
|
||||
{
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
//
|
||||
// READ THIS CAREFULLY! SEE BOTTOM FOR EXAMPLES
|
||||
//
|
||||
// For each admin, you need three settings:
|
||||
// "identity" "permissions" "password"
|
||||
//
|
||||
// For the Identity, you can use a SteamID or Name. To use an IP address, prepend a ! character.
|
||||
// For the Permissions, you can use a flag string and an optional password.
|
||||
//
|
||||
// PERMISSIONS:
|
||||
// Flag definitions are in "admin_levels.cfg"
|
||||
// You can combine flags into a string like this:
|
||||
// "abcdefgh"
|
||||
//
|
||||
// If you want to specify a group instead of a flag, use an @ symbol. Example:
|
||||
// "@Full Admins"
|
||||
//
|
||||
// You can also specify immunity values. Two examples:
|
||||
// "83:abcdefg" //Immunity is 83, flags are abcefgh
|
||||
// "6:@Full Admins" //Immunity is 6, group is "Full Admins"
|
||||
//
|
||||
// Immunity values can be any number. An admin cannot target an admin with
|
||||
// a higher access value (see sm_immunity_mode to tweak the rules). Default
|
||||
// immunity value is 0 (no immunity).
|
||||
//
|
||||
// PASSWORDS:
|
||||
// Passwords are generally not needed unless you have name-based authentication.
|
||||
// In this case, admins must type this in their console:
|
||||
//
|
||||
// setinfo "KEY" "PASSWORD"
|
||||
//
|
||||
// Where KEY is the "PassInfoVar" setting in your core.cfg file, and "PASSWORD"
|
||||
// is their password. With name based authentication, this must be done before
|
||||
// changing names or connecting. Otherwise, SourceMod will automatically detect
|
||||
// the password being set.
|
||||
//
|
||||
////////////////////////////////
|
||||
// Examples: (do not put // in front of real lines, as // means 'comment')
|
||||
//
|
||||
// "STEAM_0:1:16" "bce" //kick, ban, slay for this steam ID, no immunity
|
||||
// "!127.0.0.1" "99:z" //all permissions for this ip, immunity value is 99
|
||||
// "BAILOPAN" "abc" "Gab3n" //name BAILOPAN, password "Gab3n": gets reservation, kick, ban
|
||||
//
|
||||
////////////////////////////////
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
//This file re-enables a server from "war mode" by unlocking plugin loading
|
||||
//and refreshing the plugins list.
|
||||
sm plugins load_unlock
|
||||
sm plugins refresh
|
||||
@@ -0,0 +1,9 @@
|
||||
//This file unloads all plugins, re-loads a few "safe" ones, and then prevents
|
||||
//any more plugins from being loaded.
|
||||
sm plugins unload_all
|
||||
sm plugins load basebans.smx
|
||||
sm plugins load basecommands.smx
|
||||
sm plugins load admin-flatfile.smx
|
||||
sm plugins load adminhelp.smx
|
||||
sm plugins load adminmenu.smx
|
||||
sm plugins load_lock
|
||||
@@ -0,0 +1,109 @@
|
||||
// SourceMod Configuration File
|
||||
// This file is automatically executed by SourceMod every mapchange.
|
||||
|
||||
|
||||
// Specifies how admin activity should be relayed to users. Add up the values
|
||||
// below to get the functionality you want.
|
||||
// 1: Show admin activity to non-admins anonymously.
|
||||
// 2: If 1 is specified, admin names will be shown.
|
||||
// 4: Show admin activity to admins anonymously.
|
||||
// 8: If 4 is specified, admin names will be shown.
|
||||
// 16: Always show admin names to root users.
|
||||
// --
|
||||
// Default: 13 (1+4+8)
|
||||
sm_show_activity 13
|
||||
|
||||
// Specifies whether menu sounds are enabled for menus created by SourceMod.
|
||||
// Menu sounds can be further configured in addons/sourcemod/configs/core.cfg.
|
||||
// --
|
||||
// Default: 1
|
||||
sm_menu_sounds 1
|
||||
|
||||
// Specifies how long of a delay, in seconds, should be used in between votes
|
||||
// that are "public" or can be spammed. Whether or not this delay is obeyed
|
||||
// is dependent on the menu/command.
|
||||
// --
|
||||
// Default: 30
|
||||
sm_vote_delay 30
|
||||
|
||||
// Default datetime formatting rules when displaying to clients.
|
||||
// For full options, see: http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html
|
||||
// --
|
||||
// Default: %m/%d/%Y - %H:%M:%S
|
||||
// 12 hour format: %m/%d/%Y - %I:%M:%S %p
|
||||
sm_datetime_format "%m/%d/%Y - %H:%M:%S"
|
||||
|
||||
// Sets how SourceMod should check immunity levels when administrators target
|
||||
// each other.
|
||||
// 0: Ignore immunity levels (except for specific group immunities).
|
||||
// 1: Protect from admins of lower access only.
|
||||
// 2: Protect from admins of equal to or lower access.
|
||||
// 3: Same as 2, except admins with no immunity can affect each other.
|
||||
// --
|
||||
// Default: 1
|
||||
sm_immunity_mode 1
|
||||
|
||||
// Sets how many seconds SourceMod should adjust time values for incorrect
|
||||
// server clocks. This can be positive or negative and will affect every
|
||||
// system time in SourceMod, including logging stamps.
|
||||
// --
|
||||
// Default: 0
|
||||
sm_time_adjustment 0
|
||||
|
||||
// Specifies the amount of time that is allowed between chat messages. This
|
||||
// includes the say and say_team commands. If a client sends a message faster
|
||||
// than this time, they receive a flood token. When the client has accumulated
|
||||
// 3 or more tokens, a warning message is shown instead of the chat message.
|
||||
// --
|
||||
// Requires: antiflood.smx
|
||||
// Default: 0.75
|
||||
sm_flood_time 0.75
|
||||
|
||||
// Specifies how the reserved slots plugin operates. Valid values are:
|
||||
// 0 : Public slots are used in preference to reserved slots. Reserved slots are freed before public slots.
|
||||
// 1 : If someone with reserve access joins into a reserved slot, the player with the highest latency and
|
||||
// no reserved slot access (spectator players are selected first) is kicked to make room. Thus, the reserved
|
||||
// slots always remains free. The only situation where the reserved slot(s) can become properly occupied is
|
||||
// if the server is full with reserve slot access clients.
|
||||
// --
|
||||
// Requires: reservedslots.smx
|
||||
// Default: 0
|
||||
sm_reserve_type 0
|
||||
|
||||
// Specifies the number of reserved player slots. Users with the reservation
|
||||
// admin flag set will be able to join the server when there are no public slots
|
||||
// remaining. If someone does not have this flag, they will be kicked.
|
||||
// (Public slots are defined as: maxplayers - number of reserved slots)
|
||||
// --
|
||||
// Requires: reservedslots.smx
|
||||
// Default: 0
|
||||
sm_reserved_slots 0
|
||||
|
||||
// Specifies whether or not reserved slots will be hidden (subtracted from max
|
||||
// slot count). Valid values are 0 (visible) or 1 (hidden).
|
||||
// --
|
||||
// Requires: reservedslots.smx
|
||||
// Default: 0
|
||||
sm_hide_slots 0
|
||||
|
||||
// Specifies whether or not non-admins can send messages to admins using
|
||||
// say_team @<message>. Valid values are 0 (disabled) or 1 (enabled)
|
||||
// --
|
||||
// Requires: basechat.smx
|
||||
// Default: 1
|
||||
sm_chat_mode 1
|
||||
|
||||
// Specifies whether or not "timeleft" will automaticly be triggered every
|
||||
// x seconds. Valid values are 0 (disabled) to 1800 seconds.
|
||||
// --
|
||||
// Requires: basetriggers.smx
|
||||
// Default: 0
|
||||
sm_timeleft_interval 0
|
||||
|
||||
// Specifies whether or not chat triggers are broadcast to the server or just
|
||||
// the player who requested the info trigger. Valid values are 0 (Disabled) or
|
||||
// 1 (Enabled)
|
||||
// --
|
||||
// Requires: basetriggers.smx
|
||||
// Default: 1
|
||||
sm_trigger_show 1
|
||||
@@ -0,0 +1,91 @@
|
||||
/**
|
||||
* This file is used to set various options that are important to SourceMod's core.
|
||||
* If this file is missing or an option in this file is missing, then the default values will be used.
|
||||
*/
|
||||
"Core"
|
||||
{
|
||||
/**
|
||||
* Relative path to SourceMod's base directory. This is relative to the game/mod directory.
|
||||
* Only change this if you have installed SourceMod in a non-default location.
|
||||
*
|
||||
* The default value is "addons/sourcemod"
|
||||
*/
|
||||
"BasePath" "addons/sourcemod"
|
||||
|
||||
/**
|
||||
* This option determines if SourceMod logging is enabled.
|
||||
*
|
||||
* "on" - Logging is enabled (default)
|
||||
* "off" - Logging is disabled
|
||||
*/
|
||||
"Logging" "on"
|
||||
|
||||
/**
|
||||
* This option determines how SourceMod logging should be handled.
|
||||
*
|
||||
* "daily" - New log file is created for each day (default)
|
||||
* "map" - New log file is created for each map change
|
||||
* "game" - Use game's log files
|
||||
*/
|
||||
"LogMode" "daily"
|
||||
|
||||
/**
|
||||
* Language that multilingual enabled plugins and extensions will use to print messages.
|
||||
* Only languages listed in languages.cfg are valid.
|
||||
*
|
||||
* The default value is "en"
|
||||
*/
|
||||
"ServerLang" "en"
|
||||
|
||||
/**
|
||||
* String to use as the public chat trigger. Set an empty string to disable.
|
||||
*/
|
||||
"PublicChatTrigger" "!"
|
||||
|
||||
/**
|
||||
* String to use as the silent chat trigger. Set an empty string to disable.
|
||||
*/
|
||||
"SilentChatTrigger" "/"
|
||||
|
||||
/**
|
||||
* If a say command is a silent chat trigger, and is used by an admin,
|
||||
* but it does not evaluate to an actual command, it will be displayed
|
||||
* publicly. This setting allows you to suppress accidental typings.
|
||||
*
|
||||
* The default value is "no". A value of "yes" will supress.
|
||||
*/
|
||||
"SilentFailSuppress" "no"
|
||||
|
||||
/**
|
||||
* Password setinfo key that clients must set. You must change this in order for
|
||||
* passwords to work, for security reasons.
|
||||
*/
|
||||
"PassInfoVar" "_password"
|
||||
|
||||
/**
|
||||
* Specifies the sound that gets played when an item is selected from a menu.
|
||||
*/
|
||||
"MenuItemSound" "buttons/button14.wav"
|
||||
|
||||
/**
|
||||
* Specifies the sound that gets played when an "Exit" button is selected
|
||||
* from a menu.
|
||||
*/
|
||||
"MenuExitSound" "buttons/combine_button7.wav"
|
||||
|
||||
/**
|
||||
* Specifies the sound that gets played when an "Exit Back" button is selected
|
||||
* from a menu. This is the special "Back" button that is intended to roll back
|
||||
* to a previous menu.
|
||||
*/
|
||||
"MenuExitBackSound" "buttons/combine_button7.wav"
|
||||
|
||||
/**
|
||||
* Enables or disables whether SourceMod reads a client's cl_language cvar to set
|
||||
* their language for server-side phrase translation.
|
||||
*
|
||||
* "on" - Translate using the client's language (default)
|
||||
* "off" - Translate using default server's language
|
||||
*/
|
||||
"AllowClLanguageVar" "On"
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
"Databases"
|
||||
{
|
||||
"driver_default" "mysql"
|
||||
|
||||
"default"
|
||||
{
|
||||
"driver" "default"
|
||||
"host" "localhost"
|
||||
"database" "sourcemod"
|
||||
"user" "root"
|
||||
"pass" ""
|
||||
//"timeout" "0"
|
||||
//"port" "0"
|
||||
}
|
||||
|
||||
"storage-local"
|
||||
{
|
||||
"driver" "sqlite"
|
||||
"database" "sourcemod-local"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
"Languages"
|
||||
{
|
||||
"en" "English"
|
||||
"es" "Español"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
/**
|
||||
* Use this file to configure map lists.
|
||||
*
|
||||
* Each section is a map list that plugins can use. For example, the Admin Menu
|
||||
* requests an "admin menu" map list, and you can control which maps appear via
|
||||
* this file.
|
||||
*
|
||||
* Each section must have a property that explains where to read the maps from.
|
||||
* There are two properties:
|
||||
*
|
||||
* target - Redirect the request to another section.
|
||||
* file - Read a file of map names, in mapcycle.txt format.
|
||||
*
|
||||
* There is one section by default, called "mapcyclefile" - it is mapped to the
|
||||
* mapcycle.txt file, or whatever the contents of your mapcyclefile cvar is.
|
||||
*
|
||||
* If a plugin requests a map list file which doesn't exist, or is empty, SourceMod
|
||||
* tries the "default" section, and then the "mapcyclefile" section.
|
||||
*/
|
||||
"MapLists"
|
||||
{
|
||||
/**
|
||||
* Default requests go right to the mapcyclefile.
|
||||
*/
|
||||
"default"
|
||||
{
|
||||
"target" "mapcyclefile"
|
||||
}
|
||||
|
||||
/* Admin menu, map menu */
|
||||
"sm_map menu"
|
||||
{
|
||||
"file" "addons/sourcemod/configs/adminmenu_maplist.ini"
|
||||
}
|
||||
|
||||
/* Admin menu, map voting menu */
|
||||
"sm_votemap menu"
|
||||
{
|
||||
"file" "addons/sourcemod/configs/adminmenu_maplist.ini"
|
||||
}
|
||||
|
||||
/* For the "randomcycle" plugin */
|
||||
"randomcycle"
|
||||
{
|
||||
"target" "default"
|
||||
}
|
||||
|
||||
/* For the "mapchooser" plugin */
|
||||
"mapchooser"
|
||||
{
|
||||
"target" "default"
|
||||
}
|
||||
|
||||
/* For the "randomcycle" plugin */
|
||||
"rockthevote"
|
||||
{
|
||||
"target" "default"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
"Metamod Plugin"
|
||||
{
|
||||
"alias" "sourcemod"
|
||||
"file" "addons/sourcemod/bin/sourcemod_mm"
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* Each sub-section of "Plugins" should have a title which specifies a plugin filename.
|
||||
* Filenames have a wildcard of *. Appending .smx is not required.
|
||||
* If the filename has no explicit path, it will be patched to any sub-path in the plugins folder.
|
||||
*
|
||||
* Available properties for plugins are:
|
||||
* "pause" - Whether or not the plugin should load paused - "yes" or "no" (default)
|
||||
* "lifetime" - Lifetime of the plugin. Options:
|
||||
* "mapsync" - Plugins should be reloaded on mapchange if changed (default)
|
||||
* "global" - Plugin will never be unloaded or updated
|
||||
* "blockload" - Plugin will always be blocked from loading. Implicit (automatic) loads
|
||||
* produce no error, but explicit (manual) loads will show an error message.
|
||||
* (Options are one of "yes" or "no")
|
||||
*
|
||||
* You can also have an "Options" section declaring options to pass onto the JIT:
|
||||
* "debug" - Whether or not to load the plugin in debug mode
|
||||
* "profile" - Bit flags for profiling level. Add flags together to reach a value.
|
||||
* WARNING: Profiler is _ALPHA_ software! Use it at your own risk for
|
||||
* development cycles only (not production setups).
|
||||
* See the wiki article "SourceMod Profiler" for more information.
|
||||
* 1 - Profile natives
|
||||
* 2 - Profile callbacks
|
||||
* 4 - Profile internal plugin function calls
|
||||
*/
|
||||
|
||||
"Plugins"
|
||||
{
|
||||
"*"
|
||||
{
|
||||
"pause" "no"
|
||||
"lifetime" "mapsync"
|
||||
|
||||
"Options"
|
||||
{
|
||||
"debug" "no"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
|
||||
CREATE TABLE sm_admins (
|
||||
id int(10) unsigned NOT NULL auto_increment,
|
||||
authtype enum('steam','name','ip') NOT NULL,
|
||||
identity varchar(65) NOT NULL,
|
||||
password varchar(65),
|
||||
flags varchar(30) NOT NULL,
|
||||
name varchar(65) NOT NULL,
|
||||
immunity int(10) unsigned NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE sm_groups (
|
||||
id int(10) unsigned NOT NULL auto_increment,
|
||||
flags varchar(30) NOT NULL,
|
||||
name varchar(120) NOT NULL,
|
||||
immunity_level int(1) unsigned NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE sm_group_immunity (
|
||||
group_id int(10) unsigned NOT NULL,
|
||||
other_id int(10) unsigned NOT NULL,
|
||||
PRIMARY KEY (group_id, other_id)
|
||||
);
|
||||
|
||||
CREATE TABLE sm_group_overrides (
|
||||
group_id int(10) unsigned NOT NULL,
|
||||
type enum('command','group') NOT NULL,
|
||||
name varchar(32) NOT NULL,
|
||||
access enum('allow','deny') NOT NULL,
|
||||
PRIMARY KEY (group_id, type, name)
|
||||
);
|
||||
|
||||
CREATE TABLE sm_overrides (
|
||||
type enum('command','group') NOT NULL,
|
||||
name varchar(32) NOT NULL,
|
||||
flags varchar(30) NOT NULL,
|
||||
PRIMARY KEY (type,name)
|
||||
);
|
||||
|
||||
CREATE TABLE sm_admins_groups (
|
||||
admin_id int(10) unsigned NOT NULL,
|
||||
group_id int(10) unsigned NOT NULL,
|
||||
inherit_order int(10) NOT NULL,
|
||||
PRIMARY KEY (admin_id, group_id)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS sm_config (
|
||||
cfg_key varchar(32) NOT NULL,
|
||||
cfg_value varchar(255) NOT NULL,
|
||||
PRIMARY KEY (cfg_key)
|
||||
);
|
||||
|
||||
INSERT INTO sm_config (cfg_key, cfg_value) VALUES ('admin_version', '1.0.0.1409') ON DUPLICATE KEY UPDATE cfg_value = '1.0.0.1409';
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
ALTER TABLE sm_admins ADD immunity INT UNSIGNED NOT NULL;
|
||||
|
||||
ALTER TABLE sm_groups ADD immunity_level INT UNSIGNED NOT NULL;
|
||||
UPDATE sm_groups SET immunity_level = 2 WHERE immunity = 'default';
|
||||
UPDATE sm_groups SET immunity_level = 1 WHERE immunity = 'global';
|
||||
ALTER TABLE sm_groups DROP immunity;
|
||||
|
||||
CREATE TABLE sm_config (
|
||||
cfg_key varchar(32) NOT NULL,
|
||||
cfg_value varchar(255) NOT NULL,
|
||||
PRIMARY KEY (cfg_key)
|
||||
);
|
||||
INSERT INTO sm_config (cfg_key, cfg_value) VALUES ('admin_version', '1.0.0.1409') ON DUPLICATE KEY UPDATE cfg_value = '1.0.0.1409';
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,54 @@
|
||||
|
||||
CREATE TABLE sm_admins (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
authtype varchar(16) NOT NULL CHECK(authtype IN ('steam', 'ip', 'name')),
|
||||
identity varchar(65) NOT NULL,
|
||||
password varchar(65),
|
||||
flags varchar(30) NOT NULL,
|
||||
name varchar(65) NOT NULL,
|
||||
immunity INTEGER NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE sm_groups (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
flags varchar(30) NOT NULL,
|
||||
name varchar(120) NOT NULL,
|
||||
immunity_level INTEGER NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE sm_group_immunity (
|
||||
group_id INTEGER NOT NULL,
|
||||
other_id INTEGER NOT NULL,
|
||||
PRIMARY KEY (group_id, other_id)
|
||||
);
|
||||
|
||||
CREATE TABLE sm_group_overrides (
|
||||
group_id INTEGER NOT NULL,
|
||||
type varchar(16) NOT NULL CHECK (type IN ('command', 'group')),
|
||||
name varchar(32) NOT NULL,
|
||||
access varchar(16) NOT NULL CHECK (access IN ('allow', 'deny')),
|
||||
PRIMARY KEY (group_id, type, name)
|
||||
);
|
||||
|
||||
CREATE TABLE sm_overrides (
|
||||
type varchar(16) NOT NULL CHECK (type IN ('command', 'group')),
|
||||
name varchar(32) NOT NULL,
|
||||
flags varchar(30) NOT NULL,
|
||||
PRIMARY KEY (type,name)
|
||||
);
|
||||
|
||||
CREATE TABLE sm_admins_groups (
|
||||
admin_id INTEGER NOT NULL,
|
||||
group_id INTEGER NOT NULL,
|
||||
inherit_order int(10) NOT NULL,
|
||||
PRIMARY KEY (admin_id, group_id)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS sm_config (
|
||||
cfg_key varchar(32) NOT NULL,
|
||||
cfg_value varchar(255) NOT NULL,
|
||||
PRIMARY KEY (cfg_key)
|
||||
);
|
||||
|
||||
REPLACE INTO sm_config (cfg_key, cfg_value) VALUES ('admin_version', '1.0.0.1409');
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
ALTER TABLE sm_admins ADD immunity INTEGER DEFAULT 0 NOT NULL;
|
||||
|
||||
CREATE TABLE _sm_groups_temp (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
flags varchar(30) NOT NULL,
|
||||
name varchar(120) NOT NULL,
|
||||
immunity_level INTEGER DEFAULT 0 NOT NULL
|
||||
);
|
||||
INSERT INTO _sm_groups_temp (id, flags, name) SELECT id, flags, name FROM sm_groups;
|
||||
UPDATE _sm_groups_temp SET immunity_level = 2 WHERE id IN (SELECT g.id FROM sm_groups g WHERE g.immunity = 'global');
|
||||
UPDATE _sm_groups_temp SET immunity_level = 1 WHERE id IN (SELECT g.id FROM sm_groups g WHERE g.immunity = 'default');
|
||||
DROP TABLE sm_groups;
|
||||
ALTER TABLE _sm_groups_temp RENAME TO sm_groups;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS sm_config (
|
||||
cfg_key varchar(32) NOT NULL,
|
||||
cfg_value varchar(255) NOT NULL,
|
||||
PRIMARY KEY (cfg_key)
|
||||
);
|
||||
|
||||
REPLACE INTO sm_config (cfg_key, cfg_value) VALUES ('admin_version', '1.0.0.1409');
|
||||
|
||||
Reference in New Issue
Block a user