summaryrefslogtreecommitdiffstats
path: root/src/Bindings
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-05-13 21:33:26 +0200
committerMattes D <github@xoft.cz>2015-05-13 21:33:26 +0200
commit06506da0b19aeeaf0c6b1b774285ac4f257cbeaa (patch)
tree75a5343d88e0ba4f6885fe7263a0e13bd280f24c /src/Bindings
parentMerge pull request #2008 from mc-server/InfoDumpLinks (diff)
parentFixed chat message manipulation by plugins. (diff)
downloadcuberite-06506da0b19aeeaf0c6b1b774285ac4f257cbeaa.tar
cuberite-06506da0b19aeeaf0c6b1b774285ac4f257cbeaa.tar.gz
cuberite-06506da0b19aeeaf0c6b1b774285ac4f257cbeaa.tar.bz2
cuberite-06506da0b19aeeaf0c6b1b774285ac4f257cbeaa.tar.lz
cuberite-06506da0b19aeeaf0c6b1b774285ac4f257cbeaa.tar.xz
cuberite-06506da0b19aeeaf0c6b1b774285ac4f257cbeaa.tar.zst
cuberite-06506da0b19aeeaf0c6b1b774285ac4f257cbeaa.zip
Diffstat (limited to 'src/Bindings')
-rw-r--r--src/Bindings/PluginManager.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Bindings/PluginManager.cpp b/src/Bindings/PluginManager.cpp
index 15bea22bd..db2493955 100644
--- a/src/Bindings/PluginManager.cpp
+++ b/src/Bindings/PluginManager.cpp
@@ -1445,6 +1445,13 @@ cPluginManager::CommandResult cPluginManager::HandleCommand(cPlayer & a_Player,
if (cmd == m_Commands.end())
{
// Command not found
+ // If it started with a slash, ask the plugins if they still want to handle it:
+ if (!a_Command.empty() && (a_Command[0] == '/'))
+ {
+ CommandResult Result = crUnknownCommand;
+ CallHookExecuteCommand(&a_Player, Split, a_Command, Result);
+ return Result;
+ }
return crUnknownCommand;
}