From 9a30dbac89d7aea0f222f8f70f3fc131082c61ab Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Tue, 20 Apr 2010 22:37:54 +0400 Subject: [PATCH] [9768] Fixed my last sec. fix problem :/ Also make $/# in consistence in new command help texts. --- sql/mangos.sql | 8 ++++---- sql/updates/9768_01_mangos_command.sql | 7 +++++++ sql/updates/Makefile.am | 2 ++ src/game/Chat.h | 2 +- src/mangosd/CliRunnable.cpp | 2 +- src/shared/revision_nr.h | 2 +- src/shared/revision_sql.h | 2 +- 7 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 sql/updates/9768_01_mangos_command.sql diff --git a/sql/mangos.sql b/sql/mangos.sql index b250a0554..5a2f8f838 100644 --- a/sql/mangos.sql +++ b/sql/mangos.sql @@ -24,7 +24,7 @@ CREATE TABLE `db_version` ( `version` varchar(120) default NULL, `creature_ai_version` varchar(120) default NULL, `cache_id` int(10) default '0', - `required_9767_02_mangos_command` bit(1) default NULL + `required_9768_01_mangos_command` bit(1) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes'; -- @@ -536,9 +536,9 @@ INSERT INTO `command` VALUES ('cast self',3,'Syntax: .cast self #spellid [triggered]\r\nCast #spellid by target at target itself. If \'trigered\' or part provided then spell casted with triggered flag.'), ('cast target',3,'Syntax: .cast target #spellid [triggered]\r\n Selected target will cast #spellid to his victim. If \'trigered\' or part provided then spell casted with triggered flag.'), ('character customize',2,'Syntax: .character customize [$name]\r\n\r\nMark selected in game or by $name in command character for customize at next login.'), -('character deleted delete', 4, 'Syntax: .character deleted delete $guid|$name\r\n\r\nCompletely deletes the selected characters.\r\nIf $name is supplied, only characters with that string in their name will be deleted, if $guid is supplied, only the character with that GUID will be deleted.'), -('character deleted list', 3, 'Syntax: .character deleted list [$guid|$name]\r\n\r\nShows a list with all deleted characters.\r\nIf $name is supplied, only characters with that string in their name will be selected, if $guid is supplied, only the character with that GUID will be selected.'), -('character deleted old', 4, 'Syntax: .character deleted old [$keepDays]\r\n\r\nCompletely deletes all characters with deleted time longer $keepDays. If $keepDays not provided the used value from mangosd.conf option \'CharDelete.KeepDays\'. If referenced config option disabled (use 0 value) then command can\'t be used without $keepDays.'), +('character deleted delete', 4, 'Syntax: .character deleted delete #guid|$name\r\n\r\nCompletely deletes the selected characters.\r\nIf $name is supplied, only characters with that string in their name will be deleted, if #guid is supplied, only the character with that GUID will be deleted.'), +('character deleted list', 3, 'Syntax: .character deleted list [#guid|$name]\r\n\r\nShows a list with all deleted characters.\r\nIf $name is supplied, only characters with that string in their name will be selected, if #guid is supplied, only the character with that GUID will be selected.'), +('character deleted old', 4, 'Syntax: .character deleted old [#keepDays]\r\n\r\nCompletely deletes all characters with deleted time longer #keepDays. If #keepDays not provided the used value from mangosd.conf option \'CharDelete.KeepDays\'. If referenced config option disabled (use 0 value) then command can\'t be used without #keepDays.'), ('character deleted restore', 3, 'Syntax: .character deleted restore #guid|$name [$newname] [#new account]\r\n\r\nRestores deleted characters.\r\nIf $name is supplied, only characters with that string in their name will be restored, if $guid is supplied, only the character with that GUID will be restored.\r\nIf $newname is set, the character will be restored with that name instead of the original one. If #newaccount is set, the character will be restored to specific account character list. This works only with one character!'), ('character erase',4,'Syntax: .character erase $name\r\n\r\nDelete character $name. Character finally deleted in case any deleting options.'), ('character level',3,'Syntax: .character level [$playername] [#level]\r\n\r\nSet the level of character with $playername (or the selected if not name provided) by #numberoflevels Or +1 if no #numberoflevels provided). If #numberoflevels is omitted, the level will be increase by 1. If #numberoflevels is 0, the same level will be restarted. If no character is selected and name not provided, increase your level. Command can be used for offline character. All stats and dependent values recalculated. At level decrease talents can be reset if need. Also at level decrease equipped items with greater level requirement can be lost.'), diff --git a/sql/updates/9768_01_mangos_command.sql b/sql/updates/9768_01_mangos_command.sql new file mode 100644 index 000000000..91528862e --- /dev/null +++ b/sql/updates/9768_01_mangos_command.sql @@ -0,0 +1,7 @@ +ALTER TABLE db_version CHANGE COLUMN required_9767_02_mangos_command required_9768_01_mangos_command bit; + +DELETE FROM command WHERE name IN('character deleted list', 'character deleted delete', 'character deleted old'); +INSERT INTO command (name, security, help) VALUES +('character deleted delete', 4, 'Syntax: .character deleted delete #guid|$name\r\n\r\nCompletely deletes the selected characters.\r\nIf $name is supplied, only characters with that string in their name will be deleted, if #guid is supplied, only the character with that GUID will be deleted.'), +('character deleted list', 3, 'Syntax: .character deleted list [#guid|$name]\r\n\r\nShows a list with all deleted characters.\r\nIf $name is supplied, only characters with that string in their name will be selected, if #guid is supplied, only the character with that GUID will be selected.'), +('character deleted old', 4, 'Syntax: .character deleted old [#keepDays]\r\n\r\nCompletely deletes all characters with deleted time longer #keepDays. If #keepDays not provided the used value from mangosd.conf option \'CharDelete.KeepDays\'. If referenced config option disabled (use 0 value) then command can\'t be used without #keepDays.'); diff --git a/sql/updates/Makefile.am b/sql/updates/Makefile.am index d4df90e03..ed39da324 100644 --- a/sql/updates/Makefile.am +++ b/sql/updates/Makefile.am @@ -131,6 +131,7 @@ pkgdata_DATA = \ 9767_01_mangos_mangos_string.sql \ 9767_02_mangos_command.sql \ 9767_03_characters_characters.sql \ + 9768_01_mangos_command.sql \ README ## Additional files to include when running 'make dist' @@ -242,4 +243,5 @@ EXTRA_DIST = \ 9767_01_mangos_mangos_string.sql \ 9767_02_mangos_command.sql \ 9767_03_characters_characters.sql \ + 9768_01_mangos_command.sql \ README diff --git a/src/game/Chat.h b/src/game/Chat.h index b5a1b2f76..1317bd814 100644 --- a/src/game/Chat.h +++ b/src/game/Chat.h @@ -564,7 +564,7 @@ class ChatHandler typedef std::list DeletedInfoList; bool GetDeletedCharacterInfoList(DeletedInfoList& foundList, std::string searchString = ""); - std::string GenerateDeletedCharacterGUIDsWhereStr(DeletedInfoList::const_iterator& itr, DeletedInfoList::const_iterator& itr_end); + std::string GenerateDeletedCharacterGUIDsWhereStr(DeletedInfoList::const_iterator& itr, DeletedInfoList::const_iterator const& itr_end); void HandleCharacterDeletedListHelper(DeletedInfoList const& foundList); void HandleCharacterDeletedRestoreHelper(DeletedInfo const& delInfo); diff --git a/src/mangosd/CliRunnable.cpp b/src/mangosd/CliRunnable.cpp index 3db8bcba1..31cb6ca5f 100644 --- a/src/mangosd/CliRunnable.cpp +++ b/src/mangosd/CliRunnable.cpp @@ -174,7 +174,7 @@ bool ChatHandler::GetDeletedCharacterInfoList(DeletedInfoList& foundList, std::s * @param itr_end a reference to an deleted info list iterator end() * @return returns generated where list string in form: 'guid IN (gui1, guid2, ...)' */ -std::string ChatHandler::GenerateDeletedCharacterGUIDsWhereStr(DeletedInfoList::const_iterator& itr, DeletedInfoList::const_iterator const const& itr_end) +std::string ChatHandler::GenerateDeletedCharacterGUIDsWhereStr(DeletedInfoList::const_iterator& itr, DeletedInfoList::const_iterator const& itr_end) { std::ostringstream wherestr; wherestr << "guid IN ('"; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index af9df3ecc..f6ecf279e 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "9767" + #define REVISION_NR "9768" #endif // __REVISION_NR_H__ diff --git a/src/shared/revision_sql.h b/src/shared/revision_sql.h index 9e92499d6..21f5ab1ca 100644 --- a/src/shared/revision_sql.h +++ b/src/shared/revision_sql.h @@ -1,6 +1,6 @@ #ifndef __REVISION_SQL_H__ #define __REVISION_SQL_H__ #define REVISION_DB_CHARACTERS "required_9767_03_characters_characters" - #define REVISION_DB_MANGOS "required_9767_02_mangos_command" + #define REVISION_DB_MANGOS "required_9768_01_mangos_command" #define REVISION_DB_REALMD "required_9748_01_realmd_realmlist" #endif // __REVISION_SQL_H__