|
|
|
@ -4,27 +4,31 @@ bool MultiSend::HandleCommand(const char* command, int32_t type)
@@ -4,27 +4,31 @@ bool MultiSend::HandleCommand(const char* command, int32_t type)
|
|
|
|
|
{ |
|
|
|
|
std::string arg; |
|
|
|
|
const char* com = command + GetArg(command, &arg); |
|
|
|
|
if ((_stricmp(arg.c_str(), "/ms")) |
|
|
|
|
if ((_strnicmp(command, "/ms", 3)) |
|
|
|
|
&& (_stricmp(arg.c_str(), "/multisend"))) |
|
|
|
|
{ |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (strlen(com) < 2) return true; |
|
|
|
|
com++; |
|
|
|
|
com += GetArg(com, &arg); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ((_stricmp(arg.c_str(), "/ms") == 0) |
|
|
|
|
|| (_stricmp(arg.c_str(), "/multisend")) == 0) |
|
|
|
|
{ |
|
|
|
|
com++; |
|
|
|
|
com += GetArg(com, &arg); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if ((_stricmp(arg.c_str(), "send") == 0) |
|
|
|
|
|| (_stricmp(command, "/mss") == 0)) |
|
|
|
|
|| (_stricmp(arg.c_str(), "/mss") == 0)) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
if (strlen(com) < 2) return true; |
|
|
|
|
SendCommand(0xFFFF0000, com + 1); |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if ((_stricmp(arg.c_str(), "sendto") == 0) |
|
|
|
|
|| (_stricmp(command, "/mst") == 0)) |
|
|
|
|
else if ((_stricmp(arg.c_str(), "sendto") == 0) |
|
|
|
|
|| (_stricmp(arg.c_str(), "/mst") == 0)) |
|
|
|
|
{ |
|
|
|
|
if (strlen(com) < 2) |
|
|
|
|
{ |
|
|
|
@ -52,10 +56,11 @@ bool MultiSend::HandleCommand(const char* command, int32_t type)
@@ -52,10 +56,11 @@ bool MultiSend::HandleCommand(const char* command, int32_t type)
|
|
|
|
|
|
|
|
|
|
InterlockedExchange(&(MMF_Pointer->Name.ProcessID), 0); |
|
|
|
|
m_AshitaCore->GetChatManager()->Write("MultiSend: Character not found."); |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if ((_stricmp(arg.c_str(), "sendgroup") == 0) |
|
|
|
|
|| (_stricmp(command, "/msg") == 0)) |
|
|
|
|
else if ((_stricmp(arg.c_str(), "sendgroup") == 0) |
|
|
|
|
|| (_stricmp(arg.c_str(), "/msg") == 0)) |
|
|
|
|
{ |
|
|
|
|
if (strlen(com) < 3) |
|
|
|
|
{ |
|
|
|
@ -78,7 +83,7 @@ bool MultiSend::HandleCommand(const char* command, int32_t type)
@@ -78,7 +83,7 @@ bool MultiSend::HandleCommand(const char* command, int32_t type)
|
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (_stricmp(arg.c_str(), "followme") == 0) |
|
|
|
|
else if (_stricmp(arg.c_str(), "followme") == 0) |
|
|
|
|
{ |
|
|
|
|
if (strlen(com) < 2) return true; |
|
|
|
|
com++; |
|
|
|
@ -120,7 +125,7 @@ bool MultiSend::HandleCommand(const char* command, int32_t type)
@@ -120,7 +125,7 @@ bool MultiSend::HandleCommand(const char* command, int32_t type)
|
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (_stricmp(arg.c_str(), "follow") == 0) |
|
|
|
|
else if (_stricmp(arg.c_str(), "follow") == 0) |
|
|
|
|
{ |
|
|
|
|
if (strlen(com) < 2) return true; |
|
|
|
|
com++; |
|
|
|
@ -146,7 +151,7 @@ bool MultiSend::HandleCommand(const char* command, int32_t type)
@@ -146,7 +151,7 @@ bool MultiSend::HandleCommand(const char* command, int32_t type)
|
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (_stricmp(arg.c_str(), "ignoreself") == 0) |
|
|
|
|
else if (_stricmp(arg.c_str(), "ignoreself") == 0) |
|
|
|
|
{ |
|
|
|
|
if (strlen(com) < 2) return true; |
|
|
|
|
com++; |
|
|
|
@ -171,7 +176,7 @@ bool MultiSend::HandleCommand(const char* command, int32_t type)
@@ -171,7 +176,7 @@ bool MultiSend::HandleCommand(const char* command, int32_t type)
|
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (_stricmp(arg.c_str(), "debug") == 0) |
|
|
|
|
else if (_stricmp(arg.c_str(), "debug") == 0) |
|
|
|
|
{ |
|
|
|
|
if (strlen(com) < 2) return true; |
|
|
|
|
com++; |
|
|
|
@ -197,13 +202,13 @@ bool MultiSend::HandleCommand(const char* command, int32_t type)
@@ -197,13 +202,13 @@ bool MultiSend::HandleCommand(const char* command, int32_t type)
|
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (_stricmp(arg.c_str(), "reload") == 0) |
|
|
|
|
else if (_stricmp(arg.c_str(), "reload") == 0) |
|
|
|
|
{ |
|
|
|
|
LoadGroups(); |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (_stricmp(arg.c_str(), "help") == 0) |
|
|
|
|
else if (_stricmp(arg.c_str(), "help") == 0) |
|
|
|
|
{ |
|
|
|
|
m_AshitaCore->GetChatManager()->Write("Multisend Command Listing"); |
|
|
|
|
m_AshitaCore->GetChatManager()->Write("/ms send [command] - Sends [command] to all characters with multisend loaded."); |
|
|
|
@ -216,8 +221,8 @@ bool MultiSend::HandleCommand(const char* command, int32_t type)
@@ -216,8 +221,8 @@ bool MultiSend::HandleCommand(const char* command, int32_t type)
|
|
|
|
|
m_AshitaCore->GetChatManager()->Write("/ms debug on/off - When enabled, debug prints will be visible."); |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
|
|
return (_strnicmp(command, "/ms ", 4) == 0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
uint32_t MultiSend::GetArg(const char* text, std::string* buffer) |
|
|
|
|