summaryrefslogtreecommitdiffstats
path: root/src/crsm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/crsm.cpp')
-rw-r--r--src/crsm.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/crsm.cpp b/src/crsm.cpp
index 298c1e6..d7a2b7f 100644
--- a/src/crsm.cpp
+++ b/src/crsm.cpp
@@ -156,10 +156,9 @@ void CRSM::readServerOutput()
else if(!isMeMessage)
{
QString msg = userexp.cap(5).trimmed();
- QRegExp commandExp("^\\" + Config.CRSM.CommandSign + "([^ ]+\\s+(.*)\\s*)?$");
- if(commandExp.exactMatch(msg))
+ if(msg.length() > Config.CRSM.CommandSign.length() && msg.left(Config.CRSM.CommandSign.length()) == Config.CRSM.CommandSign)
{
- QString command = commandExp.cap(1).trimmed();
+ QString command = msg.mid(Config.CRSM.CommandSign.length());
if(!cmd(command, info))
{
respond(info, "Unbekannter Befehl: \"" + command + "\"!\n");