mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[8965] Implement quit command for close RA connection.
World only in RA comandline.
This commit is contained in:
parent
b6cd243cef
commit
a2bb655501
12 changed files with 37 additions and 6 deletions
|
|
@ -24,7 +24,7 @@ CREATE TABLE `db_version` (
|
||||||
`version` varchar(120) default NULL,
|
`version` varchar(120) default NULL,
|
||||||
`creature_ai_version` varchar(120) default NULL,
|
`creature_ai_version` varchar(120) default NULL,
|
||||||
`cache_id` int(10) default '0',
|
`cache_id` int(10) default '0',
|
||||||
`required_8950_01_mangos_spell_proc_event` bit(1) default NULL
|
`required_8965_02_mangos_command` bit(1) default NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
|
||||||
|
|
||||||
--
|
--
|
||||||
|
|
@ -705,6 +705,7 @@ INSERT INTO `command` VALUES
|
||||||
('quest add',3,'Syntax: .quest add #quest_id\r\n\r\nAdd to character quest log quest #quest_id. Quest started from item can\'t be added by this command but correct .additem call provided in command output.'),
|
('quest add',3,'Syntax: .quest add #quest_id\r\n\r\nAdd to character quest log quest #quest_id. Quest started from item can\'t be added by this command but correct .additem call provided in command output.'),
|
||||||
('quest complete',3,'Syntax: .quest complete #questid\r\nMark all quest objectives as completed for target character active quest. After this target character can go and get quest reward.'),
|
('quest complete',3,'Syntax: .quest complete #questid\r\nMark all quest objectives as completed for target character active quest. After this target character can go and get quest reward.'),
|
||||||
('quest remove',3,'Syntax: .quest remove #quest_id\r\n\r\nSet quest #quest_id state to not completed and not active (and remove from active quest list) for selected player.'),
|
('quest remove',3,'Syntax: .quest remove #quest_id\r\n\r\nSet quest #quest_id state to not completed and not active (and remove from active quest list) for selected player.'),
|
||||||
|
('quit',4,'Syntax: quit\r\n\r\nClose RA connection. Command must be typed fully (quit).'),
|
||||||
('recall',1,'Syntax: .recall [$playername]\r\n\r\nTeleport $playername or selected player to the place where he has been before last use of a teleportation command. If no $playername is entered and no player is selected, it will teleport you.'),
|
('recall',1,'Syntax: .recall [$playername]\r\n\r\nTeleport $playername or selected player to the place where he has been before last use of a teleportation command. If no $playername is entered and no player is selected, it will teleport you.'),
|
||||||
('reload all',3,'Syntax: .reload all\r\n\r\nReload all tables with reload support added and that can be _safe_ reloaded.'),
|
('reload all',3,'Syntax: .reload all\r\n\r\nReload all tables with reload support added and that can be _safe_ reloaded.'),
|
||||||
('reload all_area',3,'Syntax: .reload all_area\r\n\r\nReload all `areatrigger_*` tables if reload support added for this table and this table can be _safe_ reloaded.'),
|
('reload all_area',3,'Syntax: .reload all_area\r\n\r\nReload all `areatrigger_*` tables if reload support added for this table and this table can be _safe_ reloaded.'),
|
||||||
|
|
@ -3555,6 +3556,7 @@ INSERT INTO `mangos_string` VALUES
|
||||||
(1012,'===========================================================================',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
(1012,'===========================================================================',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
(1013,'|%15s| %20s | %15s |%4d| %9d |',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
(1013,'|%15s| %20s | %15s |%4d| %9d |',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
(1014,'No online players.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
(1014,'No online players.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
|
(1015,'Used not fully typed quit command, need type it fully (quit), or command used not in RA command line.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
(1100,'Account %s (Id: %u) have up to %u expansion allowed now.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
(1100,'Account %s (Id: %u) have up to %u expansion allowed now.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
(1101,'Message of the day changed to:\r\n%s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
(1101,'Message of the day changed to:\r\n%s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
(1102,'Message sent to %s: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
(1102,'Message sent to %s: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
|
|
|
||||||
6
sql/updates/8965_01_mangos_mangos_string.sql
Normal file
6
sql/updates/8965_01_mangos_mangos_string.sql
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
ALTER TABLE db_version CHANGE COLUMN required_8950_01_mangos_spell_proc_event required_8965_01_mangos_mangos_string bit;
|
||||||
|
|
||||||
|
DELETE FROM mangos_string WHERE entry in (1015);
|
||||||
|
|
||||||
|
INSERT INTO mangos_string VALUES
|
||||||
|
(1015,'Used not fully typed quit command, need type it fully (quit), or command used not in RA command line.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||||
6
sql/updates/8965_02_mangos_command.sql
Normal file
6
sql/updates/8965_02_mangos_command.sql
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
ALTER TABLE db_version CHANGE COLUMN required_8965_01_mangos_mangos_string required_8965_02_mangos_command bit;
|
||||||
|
|
||||||
|
DELETE FROM command where name IN ('quit');
|
||||||
|
|
||||||
|
INSERT INTO `command` VALUES
|
||||||
|
('quit',4,'Syntax: quit\r\n\r\nClose RA connection. Command must be typed fully (quit).');
|
||||||
|
|
@ -198,6 +198,8 @@ pkgdata_DATA = \
|
||||||
8943_01_mangos_spell_chain.sql \
|
8943_01_mangos_spell_chain.sql \
|
||||||
8946_01_mangos_spell_proc_event.sql \
|
8946_01_mangos_spell_proc_event.sql \
|
||||||
8950_01_mangos_spell_proc_event.sql \
|
8950_01_mangos_spell_proc_event.sql \
|
||||||
|
8965_01_mangos_mangos_string.sql \
|
||||||
|
8965_02_mangos_command.sql \
|
||||||
README
|
README
|
||||||
|
|
||||||
## Additional files to include when running 'make dist'
|
## Additional files to include when running 'make dist'
|
||||||
|
|
@ -376,4 +378,6 @@ EXTRA_DIST = \
|
||||||
8943_01_mangos_spell_chain.sql \
|
8943_01_mangos_spell_chain.sql \
|
||||||
8946_01_mangos_spell_proc_event.sql \
|
8946_01_mangos_spell_proc_event.sql \
|
||||||
8950_01_mangos_spell_proc_event.sql \
|
8950_01_mangos_spell_proc_event.sql \
|
||||||
|
8965_01_mangos_mangos_string.sql \
|
||||||
|
8965_02_mangos_command.sql \
|
||||||
README
|
README
|
||||||
|
|
|
||||||
|
|
@ -667,6 +667,7 @@ ChatCommand * ChatHandler::getCommandTable()
|
||||||
{ "flusharenapoints",SEC_ADMINISTRATOR, false, &ChatHandler::HandleFlushArenaPointsCommand, "", NULL },
|
{ "flusharenapoints",SEC_ADMINISTRATOR, false, &ChatHandler::HandleFlushArenaPointsCommand, "", NULL },
|
||||||
{ "repairitems", SEC_GAMEMASTER, true, &ChatHandler::HandleRepairitemsCommand, "", NULL },
|
{ "repairitems", SEC_GAMEMASTER, true, &ChatHandler::HandleRepairitemsCommand, "", NULL },
|
||||||
{ "waterwalk", SEC_GAMEMASTER, false, &ChatHandler::HandleWaterwalkCommand, "", NULL },
|
{ "waterwalk", SEC_GAMEMASTER, false, &ChatHandler::HandleWaterwalkCommand, "", NULL },
|
||||||
|
{ "quit", SEC_CONSOLE, true, &ChatHandler::HandleQuitCommand, "", NULL },
|
||||||
|
|
||||||
{ NULL, 0, false, NULL, "", NULL }
|
{ NULL, 0, false, NULL, "", NULL }
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -498,6 +498,7 @@ class ChatHandler
|
||||||
bool HandleFlushArenaPointsCommand(const char *args);
|
bool HandleFlushArenaPointsCommand(const char *args);
|
||||||
bool HandleRepairitemsCommand(const char* args);
|
bool HandleRepairitemsCommand(const char* args);
|
||||||
bool HandleWaterwalkCommand(const char* args);
|
bool HandleWaterwalkCommand(const char* args);
|
||||||
|
bool HandleQuitCommand(const char* args);
|
||||||
|
|
||||||
//! Development Commands
|
//! Development Commands
|
||||||
bool HandleSaveAllCommand(const char* args);
|
bool HandleSaveAllCommand(const char* args);
|
||||||
|
|
|
||||||
|
|
@ -780,7 +780,8 @@ enum MangosStrings
|
||||||
LANG_ACCOUNT_LIST_BAR = 1012,
|
LANG_ACCOUNT_LIST_BAR = 1012,
|
||||||
LANG_ACCOUNT_LIST_LINE = 1013,
|
LANG_ACCOUNT_LIST_LINE = 1013,
|
||||||
LANG_ACCOUNT_LIST_EMPTY = 1014,
|
LANG_ACCOUNT_LIST_EMPTY = 1014,
|
||||||
// Room for more level 4 1015-1099 not used
|
LANG_QUIT_WRONG_USE_ERROR = 1015,
|
||||||
|
// Room for more level 4 1016-1099 not used
|
||||||
|
|
||||||
// Level 3 (continue)
|
// Level 3 (continue)
|
||||||
LANG_ACCOUNT_SETADDON = 1100,
|
LANG_ACCOUNT_SETADDON = 1100,
|
||||||
|
|
|
||||||
|
|
@ -238,7 +238,6 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
|
||||||
ReadMovementInfo(recv_data, &movementInfo);
|
ReadMovementInfo(recv_data, &movementInfo);
|
||||||
/*----------------*/
|
/*----------------*/
|
||||||
|
|
||||||
recv_data.rpos(recv_data.wpos()); // prevent warnings spam
|
|
||||||
if (!MaNGOS::IsValidMapCoord(movementInfo.x, movementInfo.y, movementInfo.z, movementInfo.o))
|
if (!MaNGOS::IsValidMapCoord(movementInfo.x, movementInfo.y, movementInfo.z, movementInfo.o))
|
||||||
{
|
{
|
||||||
recv_data.rpos(recv_data.wpos()); // prevent warnings spam
|
recv_data.rpos(recv_data.wpos()); // prevent warnings spam
|
||||||
|
|
|
||||||
|
|
@ -152,6 +152,14 @@ bool ChatHandler::HandleCharacterDeleteCommand(const char* args)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Close RA connection
|
||||||
|
bool ChatHandler::HandleQuitCommand(const char* /*args*/)
|
||||||
|
{
|
||||||
|
// processed in RASocket
|
||||||
|
SendSysMessage(LANG_QUIT_WRONG_USE_ERROR);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/// Exit the realm
|
/// Exit the realm
|
||||||
bool ChatHandler::HandleServerExitCommand(const char* /*args*/)
|
bool ChatHandler::HandleServerExitCommand(const char* /*args*/)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -225,6 +225,9 @@ void RASocket::OnRead()
|
||||||
if (strlen(buff))
|
if (strlen(buff))
|
||||||
{
|
{
|
||||||
sLog.outRALog("Got '%s' cmd.\n",buff);
|
sLog.outRALog("Got '%s' cmd.\n",buff);
|
||||||
|
if (strncmp(buff,"quit",4)==0)
|
||||||
|
SetCloseAndDelete();
|
||||||
|
else
|
||||||
sWorld.QueueCliCommand(&RASocket::zprint, buff);
|
sWorld.QueueCliCommand(&RASocket::zprint, buff);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8964"
|
#define REVISION_NR "8965"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#ifndef __REVISION_SQL_H__
|
#ifndef __REVISION_SQL_H__
|
||||||
#define __REVISION_SQL_H__
|
#define __REVISION_SQL_H__
|
||||||
#define REVISION_DB_CHARACTERS "required_8874_01_characters_character_skills"
|
#define REVISION_DB_CHARACTERS "required_8874_01_characters_character_skills"
|
||||||
#define REVISION_DB_MANGOS "required_8950_01_mangos_spell_proc_event"
|
#define REVISION_DB_MANGOS "required_8965_02_mangos_command"
|
||||||
#define REVISION_DB_REALMD "required_8728_01_realmd_account"
|
#define REVISION_DB_REALMD "required_8728_01_realmd_account"
|
||||||
#endif // __REVISION_SQL_H__
|
#endif // __REVISION_SQL_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue