mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[10242] Rewrite internal work chat command system.
* Use single command search function with recursion and reuse it in now more simple and consistent for execute/help/loading * Add intergiry checks for hardcoded part of commands list. Fix some cases base at it. * Fixed diff small problems in past code: - in console single symbol commands rejected (without dot start) - .help not output propertly subcommands list for not found subcommand - some other...
This commit is contained in:
parent
30a0701ca9
commit
a121f7a3e5
5 changed files with 379 additions and 229 deletions
|
|
@ -169,7 +169,7 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data )
|
|||
if(msg.empty())
|
||||
break;
|
||||
|
||||
if (ChatHandler(this).ParseCommands(msg.c_str()) > 0)
|
||||
if (ChatHandler(this).ParseCommands(msg.c_str()))
|
||||
break;
|
||||
|
||||
if (!processChatmessageFurtherAfterSecurityChecks(msg, lang))
|
||||
|
|
@ -236,7 +236,7 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data )
|
|||
if(msg.empty())
|
||||
break;
|
||||
|
||||
if (ChatHandler(this).ParseCommands(msg.c_str()) > 0)
|
||||
if (ChatHandler(this).ParseCommands(msg.c_str()))
|
||||
break;
|
||||
|
||||
if (!processChatmessageFurtherAfterSecurityChecks(msg, lang))
|
||||
|
|
@ -270,7 +270,7 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data )
|
|||
if(msg.empty())
|
||||
break;
|
||||
|
||||
if (ChatHandler(this).ParseCommands(msg.c_str()) > 0)
|
||||
if (ChatHandler(this).ParseCommands(msg.c_str()))
|
||||
break;
|
||||
|
||||
if (!processChatmessageFurtherAfterSecurityChecks(msg, lang))
|
||||
|
|
@ -292,7 +292,7 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data )
|
|||
if(msg.empty())
|
||||
break;
|
||||
|
||||
if (ChatHandler(this).ParseCommands(msg.c_str()) > 0)
|
||||
if (ChatHandler(this).ParseCommands(msg.c_str()))
|
||||
break;
|
||||
|
||||
if (!processChatmessageFurtherAfterSecurityChecks(msg, lang))
|
||||
|
|
@ -314,7 +314,7 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data )
|
|||
if(msg.empty())
|
||||
break;
|
||||
|
||||
if (ChatHandler(this).ParseCommands(msg.c_str()) > 0)
|
||||
if (ChatHandler(this).ParseCommands(msg.c_str()))
|
||||
break;
|
||||
|
||||
if (!processChatmessageFurtherAfterSecurityChecks(msg, lang))
|
||||
|
|
@ -344,7 +344,7 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data )
|
|||
if(msg.empty())
|
||||
break;
|
||||
|
||||
if (ChatHandler(this).ParseCommands(msg.c_str()) > 0)
|
||||
if (ChatHandler(this).ParseCommands(msg.c_str()))
|
||||
break;
|
||||
|
||||
if (!processChatmessageFurtherAfterSecurityChecks(msg, lang))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue