diff options
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | src/game-server/command.cpp | 7 |
2 files changed, 13 insertions, 7 deletions
@@ -1,3 +1,8 @@ +2008-05-29 Roderic Morris <roderic@ccs.neu.edu> + + * src/game-server/command.cpp: Fixed execution of commands even if the + user has insufficient rights. + 2008-05-23 David Athay <ko2fan@gmail.com> * src/chat-server/guildmanager.cpp, @@ -8,10 +13,10 @@ * src/game-server/being.hpp, src/game-server/collisiondetection.cpp, src/game-server/collisiondetection.hpp, src/scripting/lua:cpp, - data/scripts/libtmw.lua: Implemented script bindings for getting beings - in a circular map area and damaging beings. - * data/test.lua: Scripted an NPC which damages all monsters and characters - which come close to it. + data/scripts/libtmw.lua: Implemented script bindings for getting + beings in a circular map area and damaging beings. + * data/test.lua: Scripted an NPC which damages all monsters and + characters which come close to it. 2008-05-22 Roderic Morris <roderic@ccs.neu.edu> diff --git a/src/game-server/command.cpp b/src/game-server/command.cpp index 836be6ad..4c9ae116 100644 --- a/src/game-server/command.cpp +++ b/src/game-server/command.cpp @@ -204,7 +204,7 @@ static void spawn(Character *from, MonsterClass *specy, int nb) { MapComposite *map = from->getMap(); Point const &pos = from->getPosition(); - + for (int i = 0; i < nb; ++i) { Being *monster = new Monster(specy); @@ -315,6 +315,7 @@ void runCommand(Character *ch, std::string const &text) if (c->level > ch->getAccountLevel()) { say(ch, "You have insufficient rights to perform the " + s + " command"); + return; } intptr_t args[4]; @@ -395,7 +396,7 @@ void runCommand(Character *ch, std::string const &text) say(ch, "Map " + arg + " was not found"); return; } - break; + break; case 'n': args[i] = atoi(arg.c_str()); @@ -417,7 +418,7 @@ void runCommand(Character *ch, std::string const &text) case 's': args[i] = (intptr_t)new std::string(arg); break; - + } pos = pos2; } |