/*
* The Mana Server
* Copyright (C) 2008-2010 The Mana World Development Team
*
* This file is part of The Mana Server.
*
* The Mana Server is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* any later version.
*
* The Mana Server is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with The Mana Server. If not, see .
*/
#include
#include "game-server/commandhandler.h"
#include "game-server/accountconnection.h"
#include "game-server/character.h"
#include "game-server/effect.h"
#include "game-server/gamehandler.h"
#include "game-server/inventory.h"
#include "game-server/item.h"
#include "game-server/itemmanager.h"
#include "game-server/mapcomposite.h"
#include "game-server/mapmanager.h"
#include "game-server/monster.h"
#include "game-server/monstermanager.h"
#include "game-server/specialmanager.h"
#include "game-server/state.h"
#include "scripting/scriptmanager.h"
#include "common/configuration.h"
#include "common/permissionmanager.h"
#include "common/transaction.h"
#include "utils/string.h"
struct CmdRef
{
const char *cmd;
const char *usage;
const char *help;
void (*func)(Entity*, std::string&) ;
};
static void handleHelp(Entity*, std::string&);
static void handleReport(Entity*, std::string&);
static void handleWhere(Entity*, std::string&);
static void handleRights(Entity*, std::string&);
static void handleWarp(Entity*, std::string&);
static void handleCharWarp(Entity*, std::string&);
static void handleGoto(Entity*, std::string&);
static void handleRecall(Entity*, std::string&);
static void handleBan(Entity*, std::string&);
static void handleItem(Entity*, std::string&);
static void handleDrop(Entity*, std::string&);
static void handleMoney(Entity*, std::string&);
static void handleSpawn(Entity*, std::string&);
static void handleAttribute(Entity*, std::string&);
static void handleReload(Entity*, std::string&);
static void handlePermissions(Entity*, std::string&);
static void handleGivePermission(Entity*, std::string&);
static void handleTakePermission(Entity*, std::string&);
static void handleAnnounce(Entity*, std::string&);
static void handleHistory(Entity*, std::string&);
static void handleMute(Entity*, std::string&);
static void handleDie(Entity*, std::string&);
static void handleKill(Entity*, std::string&);
static void handleKick(Entity*, std::string&);
static void handleLog(Entity*, std::string&);
static void handleLogsay(Entity*, std::string&);
static void handleKillMonsters(Entity*, std::string&);
static void handleCraft(Entity*, std::string&);
static void handleGetPos(Entity*, std::string&);
static void handleSkills(Entity*, std::string&);
static void handleEffect(Entity*, std::string&);
static void handleGiveSpecial(Entity*, std::string&);
static void handleTakeSpecial(Entity*, std::string&);
static void handleRechargeSpecial(Entity*, std::string&);
static void handleListSpecials(Entity*, std::string&);
static CmdRef const cmdRef[] =
{
{"help", "[command]" ,
"Lists all available commands or a detailed help for a command", &handleHelp },
{"report", "" ,
"Sends a bug or abuse reports a bug to the server administration", &handleReport},
{"where", "" ,
"Tells you your location in the game world", &handleWhere},
{"rights", "" ,
"Tells you your current permissions", &handleRights},
{"warp", "