diff options
author | Brian <runningnak3d@gmail.com> | 2010-01-29 14:19:43 -0700 |
---|---|---|
committer | Brian <runningnak3d@gmail.com> | 2010-01-29 14:19:43 -0700 |
commit | d140d676999a96cb756665d86309c58c00b4e102 (patch) | |
tree | 1d3fcdd26f93d779667e45071443e62b6bf5074b | |
parent | 038c1ad776747e7d5af0f1b07c065f6df49c0881 (diff) |
* Changed the default security levels for some commands
* Deleted no longer used loadscripts command
* Updated security levels in the command table to match defaults in the core
--HG--
branch : trunk
-rw-r--r-- | sql/updates/7245_world_command.sql | 8 | ||||
-rw-r--r-- | sql/world.sql | 21 | ||||
-rw-r--r-- | src/game/Chat.cpp | 14 |
3 files changed, 25 insertions, 18 deletions
diff --git a/sql/updates/7245_world_command.sql b/sql/updates/7245_world_command.sql new file mode 100644 index 00000000000..7fc9a2ed371 --- /dev/null +++ b/sql/updates/7245_world_command.sql @@ -0,0 +1,8 @@ +-- delete unused command loadscripts +DELETE FROM `command` WHERE `name` = 'loadscripts'; +-- Change the default scurity level for some commands +UPDATE `command` SET `security`=2 WHERE `name` IN ('playall','npc setlink','reload creature_linked_respawn'); -- DB devs command +UPDATE `command` SET `security`=1 WHERE `name` IN ('freeze','listfreeze','unfreeze'); -- Players can be anoying when talking a mod +UPDATE `command` SET `security`=1 WHERE `name` IN ('gmannounce','gmnameannounce','gmnotify'); -- even mods needs to notify things when a higher range staft is not online +UPDATE `command` SET `security`=1 WHERE `name` IN ('ticket assign','ticket close','ticket comment','ticket unassign'); -- Dirty work for slaves +UPDATE `command` SET `security`=1 WHERE `name`='account addon'; -- Server admins uses addon to close northrend diff --git a/sql/world.sql b/sql/world.sql index dcabbf225de..e05af2e70d1 100644 --- a/sql/world.sql +++ b/sql/world.sql @@ -316,7 +316,7 @@ LOCK TABLES `command` WRITE; /*!40000 ALTER TABLE `command` DISABLE KEYS */; INSERT INTO `command` VALUES ('account','0','Syntax: .account\r\n\r\nDisplay the access level of your account.'), -('account addon','3','Syntax: .account addon #addon\nSet expansion addon level allowed. Addon values: 0 - normal, 1 - tbc, 2 - wotlk.'), +('account addon','1','Syntax: .account addon #addon\nSet expansion addon level allowed. Addon values: 0 - normal, 1 - tbc, 2 - wotlk.'), ('account create','4','Syntax: .account create $account $password\r\n\r\nCreate account and set password to it.'), ('account delete','4','Syntax: .account delete $account\r\n\r\nDelete account with all characters.'), ('account lock','0','Syntax: .account lock [on|off]\r\n\r\nAllow login from account only from current used IP or remove this requirement.'), @@ -377,16 +377,16 @@ INSERT INTO `command` VALUES ('event stop','2','Syntax: .event stop #event_id\r\nStop event #event_id. Set start time for event to time in past that make current moment is event stop time (change not saved in DB).'), ('explorecheat','3','Syntax: .explorecheat #flag\r\n\r\nReveal or hide all maps for the selected player. If no player is selected, hide or reveal maps to you.\r\n\r\nUse a #flag of value 1 to reveal, use a #flag value of 0 to hide all maps.'), ('flusharenapoints','3','Syntax: .flusharenapoints\r\n\r\nUse it to distribute arena points based on arena team ratings, and start a new week.'), -('freeze','2','Syntax: .freeze (#player)\r\n\"Freezes\" #player and disables his chat. When using this without #name it will freeze your target.'), +('freeze','1','Syntax: .freeze (#player)\r\n\"Freezes\" #player and disables his chat. When using this without #name it will freeze your target.'), ('gm','1','Syntax: .gm [on/off]\r\n\r\nEnable or Disable in game GM MODE or show current state of on/off not provided.'), ('gm chat','1','Syntax: .gm chat [on/off]\r\n\r\nEnable or disable chat GM MODE (show gm badge in messages) or show current state of on/off not provided.'), ('gm fly','3','Syntax: .gm fly [on/off]\r\nEnable/disable gm fly mode.'), ('gm ingame','0','Syntax: .gm ingame\r\n\r\nDisplay a list of available in game Game Masters.'), ('gm list','3','Syntax: .gm list\r\n\r\nDisplay a list of all Game Masters accounts and security levels.'), ('gm visible','1','Syntax: .gm visible on/off\r\n\r\nOutput current visibility state or make GM visible(on) and invisible(off) for other players.'), -('gmannounce','4','Syntax: .gmannounce $announcement\r\nSend an announcement to online Gamemasters.'), -('gmnameannounce','2','Syntax: .gmnameannounce $announcement.\r\nSend an announcement to all online GM\'s, displaying the name of the sender.'), -('gmnotify','2','Syntax: .gmnotify $notification\r\nDisplays a notification on the screen of all online GM\'s.'), +('gmannounce','1','Syntax: .gmannounce $announcement\r\nSend an announcement to online Gamemasters.'), +('gmnameannounce','1','Syntax: .gmnameannounce $announcement.\r\nSend an announcement to all online GM\'s, displaying the name of the sender.'), +('gmnotify','1','Syntax: .gmnotify $notification\r\nDisplays a notification on the screen of all online GM\'s.'), ('go','1','Syntax: .go $subcommand\nType .go to see the list of possible subcommands or .help go $subcommand to see info on subcommands'), ('go creature','1','Syntax: .go creature #creature_guid\r\nTeleport your character to creature with guid #creature_guid.\r\n.gocreature #creature_name\r\nTeleport your character to creature with this name.\r\n.gocreature id #creature_id\r\nTeleport your character to a creature that was spawned from the template with this entry.\r\n*If* more than one creature is found, then you are teleported to the first that is found inside the database.'), ('go graveyard','1','Syntax: .go graveyard #graveyardId\r\n Teleport to graveyard with the graveyardId specified.'), @@ -452,7 +452,6 @@ INSERT INTO `command` VALUES ('list object','3','Syntax: .list object #gameobject_id [#max_count]\r\n\r\nOutput gameobjects with gameobject id #gameobject_id found in world. Output gameobject guids and coordinates sorted by distance from character. Will be output maximum #max_count gameobject. If #max_count not provided use 10 as default value.'), ('listfreeze','1','Syntax: .listfreeze\r\n\r\nSearch and output all frozen players.'), ('loadpath','3','Syntax: .loadpath $pathid\nLoad path changes ingame - IMPORTANT: must be applied first for new paths before .path load #pathid '), -('loadscripts','3','Syntax: .loadscripts $scriptlibraryname\r\n\r\nUnload current and load the script library $scriptlibraryname or reload current if $scriptlibraryname omitted, in case you changed it while the server was running.'), ('lookup','3','Syntax: .lookup $subcommand\nType .lookup to see the list of possible subcommands or .help lookup $subcommand to see info on subcommands'), ('lookup area','1','Syntax: .lookup area $namepart\r\n\r\nLooks up an area by $namepart, and returns all matches with their area ID\'s.'), ('lookup creature','3','Syntax: .lookup creature $namepart\r\n\r\nLooks up a creature by $namepart, and returns all matches with their creature ID\'s.'), @@ -664,14 +663,14 @@ INSERT INTO `command` VALUES ('tele group','1','Syntax: .tele group#location\r\n\r\nTeleport a selected player and his group members to a given location.'), ('tele name','1','Syntax: .tele name [#playername] #location\r\n\r\nTeleport the given character to a given location. Character can be offline.'), ('ticket','1','Syntax: .ticket $subcommand\nType .ticket to see the list of possible subcommands or .help ticket $subcommand to see info on subcommands'), -('ticket assign','3','Usage: .ticket assign $ticketid $gmname.\r\nAssigns the specified ticket to the specified Game Master.'), -('ticket close','2','Usage: .ticket close $ticketid.\r\nCloses the specified ticket. Does not delete permanently.'), +('ticket assign','1','Usage: .ticket assign $ticketid $gmname.\r\nAssigns the specified ticket to the specified Game Master.'), +('ticket close','1','Usage: .ticket close $ticketid.\r\nCloses the specified ticket. Does not delete permanently.'), ('ticket closedlist','1','Displays a list of closed GM tickets.'), -('ticket comment','2','Usage: .ticket comment $ticketid $comment.\r\nAllows the adding or modifying of a comment to the specified ticket.'), +('ticket comment','1','Usage: .ticket comment $ticketid $comment.\r\nAllows the adding or modifying of a comment to the specified ticket.'), ('ticket delete','3','Usage: .ticket delete $ticketid.\r\nDeletes the specified ticket permanently. Ticket must be closed first.'), ('ticket list','1','Displays a list of open GM tickets.'), ('ticket onlinelist','1','Displays a list of open GM tickets whose owner is online.'), -('ticket unassign','3','Usage: .ticket unassign $ticketid.\r\nUnassigns the specified ticket from the current assigned Game Master.'), +('ticket unassign','1','Usage: .ticket unassign $ticketid.\r\nUnassigns the specified ticket from the current assigned Game Master.'), ('ticket viewid','1','Usage: .ticket viewid $ticketid.\r\nReturns details about specified ticket. Ticket must be open and not deleted.'), ('ticket viewname','1','Usage: .ticket viewname $creatorname. \r\nReturns details about specified ticket. Ticket must be open and not deleted.'), ('titles add',2,'Syntax: .titles add #title\r\nAdd title #title (id or shift-link) to known titles list for selected player.'), @@ -684,7 +683,7 @@ INSERT INTO `command` VALUES ('unban character','3','Syntax: .unban character $Name\r\nUnban accounts for character name pattern.'), ('unban ip','3','Syntax : .unban ip $Ip\r\nUnban accounts for IP pattern.'), ('unbindsight','3','Syntax: .unbindsight\r\n\r\nRemoves bound vision. Cannot be used while currently possessing a target.'), -('unfreeze','2','Syntax: .unfreeze (#player)\r\n\"Unfreezes\" #player and enables his chat again. When using this without #name it will unfreeze your target.'), +('unfreeze','1','Syntax: .unfreeze (#player)\r\n\"Unfreezes\" #player and enables his chat again. When using this without #name it will unfreeze your target.'), ('unlearn','3','Syntax: .unlearn #spell [all]\r\n\r\nUnlearn for selected player a spell #spell. If \'all\' provided then all ranks unlearned.'), ('unmute','1','Syntax: .unmute [$playerName]\r\n\r\nRestore chat messaging for any character from account of character $playerName (or selected). Character can be ofline.'), ('unpossess','3','Syntax: .unpossess\r\n\r\nIf you are possessed, unpossesses yourself; otherwise unpossesses current possessed target.'), diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp index f5e85b467b3..abc047d7ecb 100644 --- a/src/game/Chat.cpp +++ b/src/game/Chat.cpp @@ -75,7 +75,7 @@ ChatCommand * ChatHandler::getCommandTable() static ChatCommand accountCommandTable[] = { - { "addon", SEC_PLAYER, false, &ChatHandler::HandleAccountAddonCommand, "", NULL }, + { "addon", SEC_MODERATOR, false, &ChatHandler::HandleAccountAddonCommand, "", NULL }, { "create", SEC_CONSOLE, true, &ChatHandler::HandleAccountCreateCommand, "", NULL }, { "delete", SEC_CONSOLE, true, &ChatHandler::HandleAccountDeleteCommand, "", NULL }, { "onlinelist", SEC_CONSOLE, true, &ChatHandler::HandleAccountOnlineListCommand, "", NULL }, @@ -384,7 +384,7 @@ ChatCommand * ChatHandler::getCommandTable() { "tame", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcTameCommand, "", NULL }, { "setdeathstate", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSetDeathStateCommand, "", NULL }, { "addformation", SEC_MODERATOR, false, &ChatHandler::HandleNpcAddFormationCommand, "", NULL }, - { "setlink", SEC_MODERATOR, false, &ChatHandler::HandleNpcSetLinkCommand, "", NULL }, + { "setlink", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSetLinkCommand, "", NULL }, //{ TODO: fix or remove this commands { "addweapon", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcAddWeaponCommand, "", NULL }, @@ -447,7 +447,7 @@ ChatCommand * ChatHandler::getCommandTable() { "creature_ai_summons", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadEventAISummonsCommand, "", NULL }, { "creature_ai_texts", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadEventAITextsCommand, "", NULL }, { "creature_involvedrelation", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadCreatureQuestInvRelationsCommand,"",NULL }, - { "creature_linked_respawn", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadCreatureLinkedRespawnCommand, "", NULL }, + { "creature_linked_respawn", SEC_GAMEMASTER, true, &ChatHandler::HandleReloadCreatureLinkedRespawnCommand, "", NULL }, { "creature_loot_template", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadLootTemplatesCreatureCommand, "", NULL }, { "creature_questrelation", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadCreatureQuestRelationsCommand, "", NULL }, //{ "db_script_string", SEC_ADMINISTRATOR, true, &ChatHandler::HandleReloadDbScriptStringCommand, "", NULL }, @@ -736,15 +736,15 @@ ChatCommand * ChatHandler::getCommandTable() { "repairitems", SEC_GAMEMASTER, true, &ChatHandler::HandleRepairitemsCommand, "", NULL }, { "waterwalk", SEC_GAMEMASTER, false, &ChatHandler::HandleWaterwalkCommand, "", NULL }, - { "freeze", SEC_ADMINISTRATOR, false, &ChatHandler::HandleFreezeCommand, "", NULL }, - { "unfreeze", SEC_ADMINISTRATOR, false, &ChatHandler::HandleUnFreezeCommand, "", NULL }, - { "listfreeze", SEC_ADMINISTRATOR, false, &ChatHandler::HandleListFreezeCommand, "", NULL }, + { "freeze", SEC_MODERATOR, false, &ChatHandler::HandleFreezeCommand, "", NULL }, + { "unfreeze", SEC_MODERATOR, false, &ChatHandler::HandleUnFreezeCommand, "", NULL }, + { "listfreeze", SEC_MODERATOR, false, &ChatHandler::HandleListFreezeCommand, "", NULL }, { "possess", SEC_ADMINISTRATOR, false, &ChatHandler::HandlePossessCommand, "", NULL }, { "unpossess", SEC_ADMINISTRATOR, false, &ChatHandler::HandleUnPossessCommand, "", NULL }, { "bindsight", SEC_ADMINISTRATOR, false, &ChatHandler::HandleBindSightCommand, "", NULL }, { "unbindsight", SEC_ADMINISTRATOR, false, &ChatHandler::HandleUnbindSightCommand, "", NULL }, - { "playall", SEC_ADMINISTRATOR, false, &ChatHandler::HandlePlayAllCommand, "", NULL }, + { "playall", SEC_GAMEMASTER, false, &ChatHandler::HandlePlayAllCommand, "", NULL }, { NULL, 0, false, NULL, "", NULL } }; |