DB/Account: update account_access table
Port From (https://github.com/TrinityCore/TrinityCore/commit/01d098830a64622262226f7915f872e1cfb301f6)
This commit is contained in:
@@ -133,7 +133,7 @@ namespace Framework.Constants
|
||||
CommandAccountPassword = 225,
|
||||
CommandAccountSet = 226,
|
||||
CommandAccountSetAddon = 227,
|
||||
CommandAccountSetGmlevel = 228,
|
||||
CommandAccountSetSecLevel = 228,
|
||||
CommandAccountSetPassword = 229,
|
||||
CommandAchievement = 230,
|
||||
CommandAchievementAdd = 231,
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Framework.Database
|
||||
public override void PreparedStatements()
|
||||
{
|
||||
const string BnetAccountInfo = "ba.id, ba.email, ba.locked, ba.lock_country, ba.last_ip, ba.LoginTicketExpiry, bab.unbandate > UNIX_TIMESTAMP() OR bab.unbandate = bab.bandate, bab.unbandate = bab.bandate";
|
||||
const string BnetGameAccountInfo = "a.id, a.username, ab.unbandate, ab.unbandate = ab.bandate, aa.gmlevel";
|
||||
const string BnetGameAccountInfo = "a.id, a.username, ab.unbandate, ab.unbandate = ab.bandate, aa.SecurityLevel";
|
||||
|
||||
PrepareStatement(LoginStatements.SEL_REALMLIST, "SELECT id, name, address, localAddress, localSubnetMask, port, icon, flag, timezone, allowedSecurityLevel, population, gamebuild, Region, Battlegroup FROM realmlist WHERE flag <> 3 ORDER BY name");
|
||||
PrepareStatement(LoginStatements.DelExpiredIpBans, "DELETE FROM ip_banned WHERE unbandate<>bandate AND unbandate<=UNIX_TIMESTAMP()");
|
||||
@@ -39,10 +39,10 @@ namespace Framework.Database
|
||||
PrepareStatement(LoginStatements.SEL_ACCOUNT_INFO_CONTINUED_SESSION, "SELECT username, sessionkey FROM account WHERE id = ?");
|
||||
PrepareStatement(LoginStatements.SEL_ACCOUNT_ID_BY_NAME, "SELECT id FROM account WHERE username = ?");
|
||||
PrepareStatement(LoginStatements.SEL_ACCOUNT_LIST_BY_NAME, "SELECT id, username FROM account WHERE username = ?");
|
||||
PrepareStatement(LoginStatements.SEL_ACCOUNT_INFO_BY_NAME, "SELECT a.id, a.sessionkey, ba.last_ip, ba.locked, ba.lock_country, a.expansion, a.mutetime, ba.locale, a.recruiter, a.os, ba.id, aa.gmLevel, " +
|
||||
PrepareStatement(LoginStatements.SEL_ACCOUNT_INFO_BY_NAME, "SELECT a.id, a.sessionkey, ba.last_ip, ba.locked, ba.lock_country, a.expansion, a.mutetime, ba.locale, a.recruiter, a.os, ba.id, aa.SecurityLevel, " +
|
||||
"bab.unbandate > UNIX_TIMESTAMP() OR bab.unbandate = bab.bandate, ab.unbandate > UNIX_TIMESTAMP() OR ab.unbandate = ab.bandate, r.id " +
|
||||
"FROM account a LEFT JOIN account r ON a.id = r.recruiter LEFT JOIN battlenet_accounts ba ON a.battlenet_account = ba.id " +
|
||||
"LEFT JOIN account_access aa ON a.id = aa.id AND aa.RealmID IN (-1, ?) LEFT JOIN battlenet_account_bans bab ON ba.id = bab.id LEFT JOIN account_banned ab ON a.id = ab.id AND ab.active = 1 " +
|
||||
"LEFT JOIN account_access aa ON a.id = aa.AccountID AND aa.RealmID IN (-1, ?) LEFT JOIN battlenet_account_bans bab ON ba.id = bab.id LEFT JOIN account_banned ab ON a.id = ab.id AND ab.active = 1 " +
|
||||
"WHERE a.username = ? ORDER BY aa.RealmID DESC LIMIT 1");
|
||||
|
||||
PrepareStatement(LoginStatements.SEL_ACCOUNT_LIST_BY_EMAIL, "SELECT id, username FROM account WHERE email = ?");
|
||||
@@ -73,21 +73,21 @@ namespace Framework.Database
|
||||
PrepareStatement(LoginStatements.UPD_ACCOUNT_ONLINE, "UPDATE account SET online = 1 WHERE id = ?");
|
||||
PrepareStatement(LoginStatements.UPD_UPTIME_PLAYERS, "UPDATE uptime SET uptime = ?, maxplayers = ? WHERE realmid = ? AND starttime = ?");
|
||||
PrepareStatement(LoginStatements.DEL_OLD_LOGS, "DELETE FROM logs WHERE (time + ?) < ? AND realm = ?");
|
||||
PrepareStatement(LoginStatements.DEL_ACCOUNT_ACCESS, "DELETE FROM account_access WHERE id = ?");
|
||||
PrepareStatement(LoginStatements.DEL_ACCOUNT_ACCESS_BY_REALM, "DELETE FROM account_access WHERE id = ? AND (RealmID = ? OR RealmID = -1)");
|
||||
PrepareStatement(LoginStatements.INS_ACCOUNT_ACCESS, "INSERT INTO account_access (id,gmlevel,RealmID) VALUES (?, ?, ?)");
|
||||
PrepareStatement(LoginStatements.DEL_ACCOUNT_ACCESS, "DELETE FROM account_access WHERE AccountID = ?");
|
||||
PrepareStatement(LoginStatements.DEL_ACCOUNT_ACCESS_BY_REALM, "DELETE FROM account_access WHERE AccountID = ? AND (RealmID = ? OR RealmID = -1)");
|
||||
PrepareStatement(LoginStatements.INS_ACCOUNT_ACCESS, "INSERT INTO account_access (AccountID, SecurityLevel, RealmID) VALUES (?, ?, ?)");
|
||||
PrepareStatement(LoginStatements.GET_ACCOUNT_ID_BY_USERNAME, "SELECT id FROM account WHERE username = ?");
|
||||
PrepareStatement(LoginStatements.GET_ACCOUNT_ACCESS_GMLEVEL, "SELECT gmlevel FROM account_access WHERE id = ?");
|
||||
PrepareStatement(LoginStatements.GET_GMLEVEL_BY_REALMID, "SELECT gmlevel FROM account_access WHERE id = ? AND (RealmID = ? OR RealmID = -1)");
|
||||
PrepareStatement(LoginStatements.GET_ACCOUNT_ACCESS_GMLEVEL, "SELECT SecurityLevel FROM account_access WHERE AccountID = ?");
|
||||
PrepareStatement(LoginStatements.GET_GMLEVEL_BY_REALMID, "SELECT SecurityLevel FROM account_access WHERE AccountID = ? AND (RealmID = ? OR RealmID = -1)");
|
||||
PrepareStatement(LoginStatements.GET_USERNAME_BY_ID, "SELECT username FROM account WHERE id = ?");
|
||||
PrepareStatement(LoginStatements.SEL_CHECK_PASSWORD, "SELECT 1 FROM account WHERE id = ? AND sha_pass_hash = ?");
|
||||
PrepareStatement(LoginStatements.SEL_CHECK_PASSWORD_BY_NAME, "SELECT 1 FROM account WHERE username = ? AND sha_pass_hash = ?");
|
||||
PrepareStatement(LoginStatements.SEL_PINFO, "SELECT a.username, aa.gmlevel, a.email, a.reg_mail, a.last_ip, DATE_FORMAT(a.last_login, '%Y-%m-%d %T'), a.mutetime, a.mutereason, a.muteby, a.failed_logins, a.locked, a.OS FROM account a LEFT JOIN account_access aa ON (a.id = aa.id AND (aa.RealmID = ? OR aa.RealmID = -1)) WHERE a.id = ?");
|
||||
PrepareStatement(LoginStatements.SEL_PINFO, "SELECT a.username, aa.SecurityLevel, a.email, a.reg_mail, a.last_ip, DATE_FORMAT(a.last_login, '%Y-%m-%d %T'), a.mutetime, a.mutereason, a.muteby, a.failed_logins, a.locked, a.OS FROM account a LEFT JOIN account_access aa ON (a.id = aa.AccountID AND (aa.RealmID = ? OR aa.RealmID = -1)) WHERE a.id = ?");
|
||||
PrepareStatement(LoginStatements.SEL_PINFO_BANS, "SELECT unbandate, bandate = unbandate, bannedby, banreason FROM account_banned WHERE id = ? AND active ORDER BY bandate ASC LIMIT 1");
|
||||
PrepareStatement(LoginStatements.SEL_GM_ACCOUNTS, "SELECT a.username, aa.gmlevel FROM account a, account_access aa WHERE a.id=aa.id AND aa.gmlevel >= ? AND (aa.realmid = -1 OR aa.realmid = ?)");
|
||||
PrepareStatement(LoginStatements.SEL_ACCOUNT_INFO, "SELECT a.username, a.last_ip, aa.gmlevel, a.expansion FROM account a LEFT JOIN account_access aa ON (a.id = aa.id) WHERE a.id = ?");
|
||||
PrepareStatement(LoginStatements.SEL_ACCOUNT_ACCESS_GMLEVEL_TEST, "SELECT 1 FROM account_access WHERE id = ? AND gmlevel > ?");
|
||||
PrepareStatement(LoginStatements.SEL_ACCOUNT_ACCESS, "SELECT a.id, aa.gmlevel, aa.RealmID FROM account a LEFT JOIN account_access aa ON (a.id = aa.id) WHERE a.username = ?");
|
||||
PrepareStatement(LoginStatements.SEL_GM_ACCOUNTS, "SELECT a.username, aa.SecurityLevel FROM account a, account_access aa WHERE a.id=aa.AccountID AND aa.SecurityLevel >= ? AND (aa.realmid = -1 OR aa.realmid = ?)");
|
||||
PrepareStatement(LoginStatements.SEL_ACCOUNT_INFO, "SELECT a.username, a.last_ip, aa.SecurityLevel, a.expansion FROM account a LEFT JOIN account_access aa ON (a.id = aa.AccountID) WHERE a.id = ?");
|
||||
PrepareStatement(LoginStatements.SEL_ACCOUNT_ACCESS_SECLEVEL_TEST, "SELECT 1 FROM account_access WHERE AccountID = ? AND SecurityLevel > ?");
|
||||
PrepareStatement(LoginStatements.SEL_ACCOUNT_ACCESS, "SELECT a.id, aa.SecurityLevel, aa.RealmID FROM account a LEFT JOIN account_access aa ON (a.id = aa.AccountID) WHERE a.username = ?");
|
||||
PrepareStatement(LoginStatements.SEL_ACCOUNT_WHOIS, "SELECT username, email, last_ip FROM account WHERE id = ?");
|
||||
PrepareStatement(LoginStatements.SEL_LAST_ATTEMPT_IP, "SELECT last_attempt_ip FROM account WHERE id = ?");
|
||||
PrepareStatement(LoginStatements.SEL_LAST_IP, "SELECT last_ip FROM account WHERE id = ?");
|
||||
@@ -103,7 +103,7 @@ namespace Framework.Database
|
||||
PrepareStatement(LoginStatements.INS_CHAR_IP_LOGGING, "INSERT INTO logs_ip_actions (account_id,character_guid,type,ip,systemnote,unixtime,time) VALUES (?, ?, ?, ?, ?, unix_timestamp(NOW()), NOW())");
|
||||
// 0: string, 1: string, 2: string // Complete name: "Login_Insert_Failed_Account_Login_due_password_IP_Logging"
|
||||
PrepareStatement(LoginStatements.INS_FALP_IP_LOGGING, "INSERT INTO logs_ip_actions (account_id,character_guid,type,ip,systemnote,unixtime,time) VALUES (?, 0, 1, ?, ?, unix_timestamp(NOW()), NOW())");
|
||||
PrepareStatement(LoginStatements.SEL_ACCOUNT_ACCESS_BY_ID, "SELECT gmlevel, RealmID FROM account_access WHERE id = ? and (RealmID = ? OR RealmID = -1) ORDER BY gmlevel desc");
|
||||
PrepareStatement(LoginStatements.SEL_ACCOUNT_ACCESS_BY_ID, "SELECT SecurityLevel, RealmID FROM account_access WHERE AccountID = ? and (RealmID = ? OR RealmID = -1) ORDER BY SecurityLevel desc");
|
||||
|
||||
PrepareStatement(LoginStatements.SEL_RBAC_ACCOUNT_PERMISSIONS, "SELECT permissionId, granted FROM rbac_account_permissions WHERE accountId = ? AND (realmId = ? OR realmId = -1) ORDER BY permissionId, realmId");
|
||||
PrepareStatement(LoginStatements.INS_RBAC_ACCOUNT_PERMISSION, "INSERT INTO rbac_account_permissions (accountId, permissionId, granted, realmId) VALUES (?, ?, ?, ?) ON DUPLICATE KEY UPDATE granted = VALUES(granted)");
|
||||
@@ -117,7 +117,7 @@ namespace Framework.Database
|
||||
PrepareStatement(LoginStatements.UpdBnetAuthentication, "UPDATE battlenet_accounts SET LoginTicket = ?, LoginTicketExpiry = ? WHERE id = ?");
|
||||
PrepareStatement(LoginStatements.SelBnetAccountInfo, "SELECT " + BnetAccountInfo + ", " + BnetGameAccountInfo +
|
||||
" FROM battlenet_accounts ba LEFT JOIN battlenet_account_bans bab ON ba.id = bab.id LEFT JOIN account a ON ba.id = a.battlenet_account" +
|
||||
" LEFT JOIN account_banned ab ON a.id = ab.id AND ab.active = 1 LEFT JOIN account_access aa ON a.id = aa.id AND aa.RealmID = -1 WHERE ba.LoginTicket = ? ORDER BY a.id");
|
||||
" LEFT JOIN account_banned ab ON a.id = ab.id AND ab.active = 1 LEFT JOIN account_access aa ON a.id = aa.AccountID AND aa.RealmID = -1 WHERE ba.LoginTicket = ? ORDER BY a.id");
|
||||
PrepareStatement(LoginStatements.UpdBnetLastLoginInfo, "UPDATE battlenet_accounts SET last_ip = ?, last_login = NOW(), locale = ?, failed_logins = 0, os = ? WHERE id = ?");
|
||||
PrepareStatement(LoginStatements.UPD_BNET_GAME_ACCOUNT_LOGIN_INFO, "UPDATE account SET sessionkey = ?, last_ip = ?, last_login = NOW(), locale = ?, failed_logins = 0, os = ? WHERE username = ?");
|
||||
PrepareStatement(LoginStatements.SelBnetCharacterCountsByAccountId, "SELECT rc.acctid, rc.numchars, r.id, r.Region, r.Battlegroup FROM realmcharacters rc INNER JOIN realmlist r ON rc.realmid = r.id WHERE rc.acctid = ?");
|
||||
@@ -234,7 +234,7 @@ namespace Framework.Database
|
||||
SEL_PINFO_BANS,
|
||||
SEL_GM_ACCOUNTS,
|
||||
SEL_ACCOUNT_INFO,
|
||||
SEL_ACCOUNT_ACCESS_GMLEVEL_TEST,
|
||||
SEL_ACCOUNT_ACCESS_SECLEVEL_TEST,
|
||||
SEL_ACCOUNT_ACCESS,
|
||||
SEL_ACCOUNT_RECRUITER,
|
||||
SEL_BANS,
|
||||
|
||||
@@ -34,8 +34,8 @@ namespace Game.Chat
|
||||
return false;
|
||||
|
||||
// GM Level
|
||||
AccountTypes gmLevel = handler.GetSession().GetSecurity();
|
||||
handler.SendSysMessage(CypherStrings.AccountLevel, gmLevel);
|
||||
AccountTypes securityLevel = handler.GetSession().GetSecurity();
|
||||
handler.SendSysMessage(CypherStrings.AccountLevel, securityLevel);
|
||||
|
||||
// Security level required
|
||||
WorldSession session = handler.GetSession();
|
||||
@@ -511,8 +511,8 @@ namespace Game.Chat
|
||||
return true;
|
||||
}
|
||||
|
||||
[Command("gmlevel", RBACPermissions.CommandAccountSetGmlevel, true)]
|
||||
static bool HandleSetGmLevelCommand(StringArguments args, CommandHandler handler)
|
||||
[Command("seclevel", RBACPermissions.CommandAccountSetSecLevel, true)]
|
||||
static bool HandleSetSecLevelCommand(StringArguments args, CommandHandler handler)
|
||||
{
|
||||
if (args.Empty())
|
||||
{
|
||||
@@ -520,10 +520,7 @@ namespace Game.Chat
|
||||
return false;
|
||||
}
|
||||
|
||||
string targetAccountName = "";
|
||||
uint targetAccountId;
|
||||
AccountTypes targetSecurity;
|
||||
uint gm;
|
||||
string accountName = "";
|
||||
|
||||
string arg1 = args.NextString();
|
||||
string arg2 = args.NextString();
|
||||
@@ -542,50 +539,50 @@ namespace Game.Chat
|
||||
|
||||
if (isAccountNameGiven)
|
||||
{
|
||||
targetAccountName = arg1;
|
||||
if (Global.AccountMgr.GetId(targetAccountName) == 0)
|
||||
accountName = arg1;
|
||||
if (Global.AccountMgr.GetId(accountName) == 0)
|
||||
{
|
||||
handler.SendSysMessage(CypherStrings.AccountNotExist, targetAccountName);
|
||||
handler.SendSysMessage(CypherStrings.AccountNotExist, accountName);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Check for invalid specified GM level.
|
||||
if (!uint.TryParse(isAccountNameGiven ? arg2 : arg1, out gm))
|
||||
if (!uint.TryParse(isAccountNameGiven ? arg2 : arg1, out uint securityLevel))
|
||||
return false;
|
||||
|
||||
if (gm > (uint)AccountTypes.Console)
|
||||
if (securityLevel > (uint)AccountTypes.Console)
|
||||
{
|
||||
handler.SendSysMessage(CypherStrings.BadValue);
|
||||
return false;
|
||||
}
|
||||
|
||||
// command.getSession() == NULL only for console
|
||||
targetAccountId = (isAccountNameGiven) ? Global.AccountMgr.GetId(targetAccountName) : handler.GetSelectedPlayer().GetSession().GetAccountId();
|
||||
if (!int.TryParse(isAccountNameGiven ? arg3 : arg2, out int gmRealmID))
|
||||
uint accountId = (isAccountNameGiven) ? Global.AccountMgr.GetId(accountName) : handler.GetSelectedPlayer().GetSession().GetAccountId();
|
||||
if (!int.TryParse(isAccountNameGiven ? arg3 : arg2, out int realmID))
|
||||
return false;
|
||||
|
||||
AccountTypes playerSecurity;
|
||||
if (handler.GetSession() != null)
|
||||
playerSecurity = Global.AccountMgr.GetSecurity(handler.GetSession().GetAccountId(), gmRealmID);
|
||||
playerSecurity = Global.AccountMgr.GetSecurity(handler.GetSession().GetAccountId(), realmID);
|
||||
else
|
||||
playerSecurity = AccountTypes.Console;
|
||||
|
||||
// can set security level only for target with less security and to less security that we have
|
||||
// This is also reject self apply in fact
|
||||
targetSecurity = Global.AccountMgr.GetSecurity(targetAccountId, gmRealmID);
|
||||
if (targetSecurity >= playerSecurity || (AccountTypes)gm >= playerSecurity)
|
||||
AccountTypes targetSecurity = Global.AccountMgr.GetSecurity(accountId, realmID);
|
||||
if (targetSecurity >= playerSecurity || (AccountTypes)securityLevel >= playerSecurity)
|
||||
{
|
||||
handler.SendSysMessage(CypherStrings.YoursSecurityIsLow);
|
||||
return false;
|
||||
}
|
||||
PreparedStatement stmt;
|
||||
// Check and abort if the target gm has a higher rank on one of the realms and the new realm is -1
|
||||
if (gmRealmID == -1 && !Global.AccountMgr.IsConsoleAccount(playerSecurity))
|
||||
if (realmID == -1 && !Global.AccountMgr.IsConsoleAccount(playerSecurity))
|
||||
{
|
||||
stmt = DB.Login.GetPreparedStatement(LoginStatements.SEL_ACCOUNT_ACCESS_GMLEVEL_TEST);
|
||||
stmt.AddValue(0, targetAccountId);
|
||||
stmt.AddValue(1, gm);
|
||||
stmt = DB.Login.GetPreparedStatement(LoginStatements.SEL_ACCOUNT_ACCESS_SECLEVEL_TEST);
|
||||
stmt.AddValue(0, accountId);
|
||||
stmt.AddValue(1, securityLevel);
|
||||
|
||||
SQLResult result = DB.Login.Query(stmt);
|
||||
|
||||
@@ -597,15 +594,15 @@ namespace Game.Chat
|
||||
}
|
||||
|
||||
// Check if provided realmID has a negative value other than -1
|
||||
if (gmRealmID < -1)
|
||||
if (realmID < -1)
|
||||
{
|
||||
handler.SendSysMessage(CypherStrings.InvalidRealmid);
|
||||
return false;
|
||||
}
|
||||
|
||||
RBACData rbac = isAccountNameGiven ? null : handler.GetSelectedPlayer().GetSession().GetRBACData();
|
||||
Global.AccountMgr.UpdateAccountAccess(rbac, targetAccountId, (byte)gm, gmRealmID);
|
||||
handler.SendSysMessage(CypherStrings.YouChangeSecurity, targetAccountName, gm);
|
||||
Global.AccountMgr.UpdateAccountAccess(rbac, accountId, (byte)securityLevel, realmID);
|
||||
handler.SendSysMessage(CypherStrings.YouChangeSecurity, accountName, securityLevel);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -73,10 +73,11 @@ DROP TABLE IF EXISTS `account_access`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `account_access` (
|
||||
`id` int(10) unsigned NOT NULL,
|
||||
`gmlevel` tinyint(3) unsigned NOT NULL,
|
||||
`AccountID` int(10) unsigned NOT NULL,
|
||||
`SecurityLevel` tinyint(3) unsigned NOT NULL,
|
||||
`RealmID` int(11) NOT NULL DEFAULT '-1',
|
||||
PRIMARY KEY (`id`,`RealmID`)
|
||||
`Comment` VARCHAR(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`AccountID`,`RealmID`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
@@ -557,7 +558,8 @@ INSERT INTO `build_info` VALUES
|
||||
(33941,8,3,0,NULL,NULL,'88AF1A36D2770D0A6CA086497096A889',NULL,NULL,NULL),
|
||||
(34220,8,3,0,NULL,NULL,'B5E35B976C6BAF82505700E7D9666A2C',NULL,NULL,NULL),
|
||||
(34601,8,3,0,NULL,NULL,'0D7DF38F725FABA4F009257799A10563',NULL,NULL,NULL),
|
||||
(34769,8,3,0,NULL,NULL,'93F9B9AF6397E3E4EED94D36D16907D2',NULL,NULL,NULL);
|
||||
(34769,8,3,0,NULL,NULL,'93F9B9AF6397E3E4EED94D36D16907D2',NULL,NULL,NULL),
|
||||
(34963,8,3,0,NULL,NULL,'7BA50C879C5D04221423B02AC3603A11','C5658A17E702163447BAAAE46D130A1B',NULL,NULL);
|
||||
/*!40000 ALTER TABLE `build_info` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
@@ -2137,7 +2139,7 @@ CREATE TABLE `realmlist` (
|
||||
`timezone` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`allowedSecurityLevel` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
`population` float unsigned NOT NULL DEFAULT '0',
|
||||
`gamebuild` int(10) unsigned NOT NULL DEFAULT '34769',
|
||||
`gamebuild` int(10) unsigned NOT NULL DEFAULT '34963',
|
||||
`Region` tinyint(3) unsigned NOT NULL DEFAULT '1',
|
||||
`Battlegroup` tinyint(3) unsigned NOT NULL DEFAULT '1',
|
||||
PRIMARY KEY (`id`),
|
||||
@@ -2152,7 +2154,7 @@ CREATE TABLE `realmlist` (
|
||||
LOCK TABLES `realmlist` WRITE;
|
||||
/*!40000 ALTER TABLE `realmlist` DISABLE KEYS */;
|
||||
INSERT INTO `realmlist` VALUES
|
||||
(1,'Trinity','127.0.0.1','127.0.0.1','255.255.255.0',8085,0,0,1,0,0,34769,1,1);
|
||||
(1,'Trinity','127.0.0.1','127.0.0.1','255.255.255.0',8085,0,0,1,0,0,34963,1,1);
|
||||
/*!40000 ALTER TABLE `realmlist` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
@@ -2337,7 +2339,10 @@ INSERT INTO `updates` VALUES
|
||||
('2020_05_19_00_auth.sql','12D9F26538F63546B74793499E8A71BD885E8E5F','ARCHIVED','2020-05-19 12:00:00',0),
|
||||
('2020_06_04_00_auth.sql','BA797B558196B1A07F8FF66E5288AD04659CF6AC','ARCHIVED','2020-06-04 09:57:07',0),
|
||||
('2020_06_17_00_auth.sql','8BAB0BF5C90EBDE68685A9FB772EA90DD214E6D6','ARCHIVED','2020-06-17 09:56:25',0),
|
||||
('2020_06_17_01_auth.sql','8FBF37B875B5C0E8A609FFB1A2C02F2920A3D3F4','ARCHIVED','2020-06-17 17:04:56',0);
|
||||
('2020_06_17_01_auth.sql','8FBF37B875B5C0E8A609FFB1A2C02F2920A3D3F4','ARCHIVED','2020-06-17 17:04:56',0),
|
||||
('2020_06_20_00_auth.sql','85345FAF20B91DA7B157AE1E17DF5B6446C2E109','ARCHIVED','2020-06-11 10:48:00',0),
|
||||
('2020_07_02_00_auth.sql','08D0F9D70AE625285172B3E02A3DAFE17D88E118','RELEASED','2020-07-02 10:29:25',0),
|
||||
('2020_07_03_00_auth.sql','ED7175E51F248ADC5EF60E7CEA9627CC3191ED4C','RELEASED','2020-07-03 20:09:39',0);
|
||||
/*!40000 ALTER TABLE `updates` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
ALTER TABLE `account_access`
|
||||
CHANGE COLUMN `id` `AccountID` INT(10) UNSIGNED NOT NULL,
|
||||
CHANGE COLUMN `gmlevel` `SecurityLevel` TINYINT(3) UNSIGNED NOT NULL,
|
||||
ADD COLUMN `Comment` VARCHAR(255) DEFAULT NULL AFTER `RealmID`;
|
||||
|
||||
UPDATE `rbac_permissions` SET `name` = 'Command: account set seclevel' WHERE `id` = 228;
|
||||
@@ -0,0 +1,19 @@
|
||||
DELETE FROM `command` WHERE `name` IN ('account set gmlevel','account set seclevel');
|
||||
INSERT INTO `command` (`name`,`permission`,`help`) VALUES
|
||||
('account set gmlevel', 228, 'Syntax: .account set gmlevel [$accountName] #level [#realmID]
|
||||
|
||||
Set the security level for targeted player (can\'t be used at self) or for account $accountName to a level of #level on the realm #realmID.
|
||||
|
||||
#level may range from 0 to 3.
|
||||
|
||||
#realmID - Default: -1 for all realms.
|
||||
|
||||
Note: this command will be removed soon. Use \'account set seclevel\' instead.'),
|
||||
|
||||
('account set seclevel', 228, 'Syntax: .account set seclevel [$accountName] #level [#realmID]
|
||||
|
||||
Set the security level for targeted player (can\'t be used at self) or for account $accountName to a level of #level on the realm #realmID.
|
||||
|
||||
#level may range from 0 to 3.
|
||||
|
||||
#realmID - Default: -1 for all realms.');
|
||||
Reference in New Issue
Block a user