/*
* 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/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/state.h"
#include "scripting/script.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)(Character*, std::string&) ;
};
static void handleHelp(Character*, std::string&);
static void handleReport(Character*, std::string&);
static void handleWhere(Character*, std::string&);
static void handleRights(Character*, std::string&);
static void handleWarp(Character*, std::string&);
static void handleCharWarp(Character*, std::string&);
static void handleGoto(Character*, std::string&);
static void handleRecall(Character*, std::string&);
static void handleBan(Character*, std::string&);
static void handleItem(Character*, std::string&);
static void handleDrop(Character*, std::string&);
static void handleMoney(Character*, std::string&);
static void handleSpawn(Character*, std::string&);
static void handleAttribute(Character*, std::string&);
static void handleReload(Character*, std::string&);
static void handleGivePermission(Character*, std::string&);
static void handleTakePermission(Character*, std::string&);
static void handleAnnounce(Character*, std::string&);
static void handleHistory(Character*, std::string&);
static void handleMute(Character*, std::string&);
static void handleDie(Character*, std::string&);
static void handleKill(Character*, std::string&);
static void handleKick(Character*, std::string&);
static void handleLog(Character*, std::string&);
static void handleLogsay(Character*, std::string&);
static void handleKillMonsters(Character*, std::string&);
static void handleCraft(Character*, std::string&);
static void handleGetPos(Character*, 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", "