summaryrefslogtreecommitdiff
path: root/src/utils/gmfunctions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/gmfunctions.cpp')
-rw-r--r--src/utils/gmfunctions.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/utils/gmfunctions.cpp b/src/utils/gmfunctions.cpp
index 35f68b133..d548cf79d 100644
--- a/src/utils/gmfunctions.cpp
+++ b/src/utils/gmfunctions.cpp
@@ -54,6 +54,14 @@ void runCommand(const std::string &command,
}
}
+void runCommand(const std::string &command)
+{
+ chatHandler->talk(std::string(
+ settings.gmCommandSymbol).append(
+ command),
+ GENERAL_CHANNEL);
+}
+
void runCharCommand(const std::string &command,
const std::string &name,
const std::string &params)
@@ -90,4 +98,25 @@ void runCharCommand(const std::string &command,
}
}
+void runCharCommand(const std::string &command,
+ const std::string &name)
+{
+ if (localPlayer && name == localPlayer->getName())
+ {
+ chatHandler->talk(std::string(
+ settings.gmCommandSymbol).append(
+ command),
+ GENERAL_CHANNEL);
+ }
+ else
+ {
+ chatHandler->talk(std::string(
+ settings.gmCharCommandSymbol).append(
+ command).append(
+ " ").append(
+ name),
+ GENERAL_CHANNEL);
+ }
+}
+
} // namespace Gm