Add SOAP-implementation (based on Benjys patch and adapted for latest core by xk1)
--HG-- branch : trunk
This commit is contained in:
@@ -2445,19 +2445,19 @@ void World::UpdateSessions(uint32 diff)
|
||||
void World::ProcessCliCommands()
|
||||
{
|
||||
CliCommandHolder::Print* zprint = NULL;
|
||||
|
||||
void* callbackArg = NULL;
|
||||
CliCommandHolder* command;
|
||||
while (cliCmdQueue.next(command))
|
||||
{
|
||||
sLog.outDebug("CLI command under processing...");
|
||||
zprint = command->m_print;
|
||||
CliHandler(zprint).ParseCommands(command->m_command);
|
||||
callbackArg = command->m_callbackArg;
|
||||
CliHandler handler(callbackArg, zprint);
|
||||
handler.ParseCommands(command->m_command);
|
||||
if(command->m_commandFinished)
|
||||
command->m_commandFinished(callbackArg, !handler.HasSentErrorMessage());
|
||||
delete command;
|
||||
}
|
||||
|
||||
// print the console message here so it looks right
|
||||
if (zprint)
|
||||
zprint("TC> ");
|
||||
}
|
||||
|
||||
void World::SendRNDBroadcast()
|
||||
|
||||
@@ -464,19 +464,23 @@ enum WorldStates
|
||||
/// Storage class for commands issued for delayed execution
|
||||
struct CliCommandHolder
|
||||
{
|
||||
typedef void Print(const char*);
|
||||
|
||||
typedef void Print(void*, const char*);
|
||||
typedef void CommandFinished(void*, bool success);
|
||||
|
||||
void* m_callbackArg;
|
||||
char *m_command;
|
||||
Print* m_print;
|
||||
|
||||
CliCommandHolder(const char *command, Print* zprint)
|
||||
: m_print(zprint)
|
||||
CommandFinished* m_commandFinished;
|
||||
|
||||
CliCommandHolder(void* callbackArg, const char *command, Print* zprint, CommandFinished* commandFinished)
|
||||
: m_callbackArg(callbackArg), m_print(zprint), m_commandFinished(commandFinished)
|
||||
{
|
||||
size_t len = strlen(command)+1;
|
||||
m_command = new char[len];
|
||||
memcpy(m_command, command, len);
|
||||
}
|
||||
|
||||
|
||||
~CliCommandHolder() { delete[] m_command; }
|
||||
};
|
||||
|
||||
@@ -657,7 +661,7 @@ class World
|
||||
static int32 GetVisibilityNotifyPeriodInBGArenas() { return m_visibility_notify_periodInBGArenas; }
|
||||
|
||||
void ProcessCliCommands();
|
||||
void QueueCliCommand(CliCommandHolder::Print* zprintf, char const* input) { cliCmdQueue.add(new CliCommandHolder(input, zprintf)); }
|
||||
void QueueCliCommand(CliCommandHolder* commandHolder) { cliCmdQueue.add(commandHolder); }
|
||||
|
||||
void UpdateResultQueue();
|
||||
void InitResultQueue();
|
||||
|
||||
Reference in New Issue
Block a user