Browse Source

1.03 - added /mss(/ms send) /mst(/ms sendto) and /msg(/ms sendgroup) aliases

master
Lolwutt 3 years ago
parent
commit
1589d89009
3 changed files with 24 additions and 19 deletions
  1. BIN
      release/plugins/MultiSend.dll
  2. +23
    -18
      src/MultiSend/Commands.cpp
  3. +1
    -1
      src/MultiSend/Main.cpp

BIN
release/plugins/MultiSend.dll View File


+ 23
- 18
src/MultiSend/Commands.cpp View File

@ -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)
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)
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)
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)
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)
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)
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)
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)


+ 1
- 1
src/MultiSend/Main.cpp View File

@ -116,7 +116,7 @@ __declspec(dllexport) void __stdcall CreatePluginInfo(plugininfo_t* lpBuffer)
strcpy_s(g_PluginInfo->Author, sizeof(g_PluginInfo->Author), "Thorny");
g_PluginInfo->InterfaceVersion = ASHITA_INTERFACE_VERSION;
g_PluginInfo->PluginVersion = 1.02f;
g_PluginInfo->PluginVersion = 1.03f;
g_PluginInfo->Priority = 0;
}


Loading…
Cancel
Save