summaryrefslogtreecommitdiff
path: root/src/utils/stringutils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/stringutils.cpp')
-rw-r--r--src/utils/stringutils.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp
index 8e657bb93..224c2a8e8 100644
--- a/src/utils/stringutils.cpp
+++ b/src/utils/stringutils.cpp
@@ -721,3 +721,9 @@ bool isDigit(const std::string &str)
}
return true;
}
+
+void secureChatCommand(std::string &str)
+{
+ if (str[0] == '/' || str[0] == '@' || str[0] == '#')
+ str = "_" + str;
+}