Fixed some bugs within the squirrel plugin system.
Implemented feature request www.mc-server.org/support/index.php?do=details&task_id=53 git-svn-id: http://mc-server.googlecode.com/svn/trunk@655 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include "cSquirrelCommandBinder.h"
|
||||
#include "../iniFile/iniFile.h"
|
||||
#include "tolua++.h"
|
||||
#include "cPlayer.h"
|
||||
|
||||
#include "squirrelbindings/SquirrelBindings.h"
|
||||
#include "squirrelbindings/SquirrelFunctions.h"
|
||||
@@ -206,6 +207,14 @@ bool cPluginManager::CallHook(PluginHook a_Hook, unsigned int a_NumArgs, ...)
|
||||
return true;
|
||||
}
|
||||
|
||||
//Check if it was a standard command (starts with a slash)
|
||||
if(Message[0] == '/')
|
||||
{
|
||||
Player->SendMessage("Unknown Command");
|
||||
LOGINFO("Player \"%s\" issued command: %s", Player->GetName().c_str(), Message);
|
||||
return true; //Cancel sending
|
||||
}
|
||||
|
||||
if (Plugins == m_Hooks.end())
|
||||
{
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user