summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game-server/commandhandler.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/game-server/commandhandler.cpp b/src/game-server/commandhandler.cpp
index 8430a6ac..bd69023c 100644
--- a/src/game-server/commandhandler.cpp
+++ b/src/game-server/commandhandler.cpp
@@ -51,9 +51,14 @@ static std::string getArgument(std::string &args)
std::string::size_type pos = args.find(' ');
if (pos != std::string::npos)
{
- argument = args.substr(0, pos-1);
+ argument = args.substr(0, pos);
args = args.substr(pos+1);
}
+ else
+ {
+ argument = args.substr(0);
+ args = "";
+ }
return argument;
}
@@ -688,10 +693,10 @@ void CommandHandler::handleCommand(Character *player,
// check character permissions
// finer tuning for checking per command can be done
// in the handle function for that command
- //if (player->getAccountLevel() >= AL_GM)
- //{
- // return;
- //}
+ if (player->getAccountLevel() < AL_GM)
+ {
+ return;
+ }
// get command type, and arguments
// remove first character (the @)