Major change to how commands are loaded

This commit is contained in:
Uleat 2015-12-07 19:28:13 -05:00
parent 1c0192dce3
commit 6f1ad1fbc1
8 changed files with 396 additions and 414 deletions

View File

@ -1,5 +1,20 @@
EQEMu Changelog (Started on Sept 24, 2003 15:50)
-------------------------------------------------------
== 12/07/2016 ==
Uleat: Command aliases are no longer handled through the command_add() function.
- To add a command alias, edit the database table `command_settings` - here, you will find three columns: `command`, `access` and `aliases`
- Adding command aliases require that the command contain an entry in `command_settings`.`command`
- Only 'real' commands go inside of the command_init() function in command.cpp .. if you wish to add aliases, you must enter them into the database
- 'Real' commands are loaded first .. then any access/alias data is loaded and applied afterwards
- Duplicate aliases will be ignored .. only the first encountered occurrence will be honored - if it does not conflict with an existing command name
- Aliases should not contain whitespace and should be '|' (pipe) delimited
- The restriction on the number of aliases has been removed .. though each alias will still be limited to the access level of the parent command
- If you need need more name space for aliases, simply edit the `command_settings` table and increase the size of the `aliases` column
- The old `commands` table has been renamed to `commands_old` for reference
- All of the current 'standard' commands have been added to the new `command_settings` table
- YOU WILL NEED TO VERIFY/IMPORT OLD ACCESS VALUES AS THIS CHANGE REVERTS ALL COMMAND ACCESS VALUES TO THEIR PEQDB DEFAULTS
== 11/30/2015 ==
Uleat: Changed criteria for a few bots scripts from count to null/not null in hopes of fixing special case failures

View File

@ -1325,19 +1325,28 @@ int32 SharedDatabase::DeleteStalePlayerCorpses() {
return results.RowsAffected();
}
bool SharedDatabase::GetCommandSettings(std::map<std::string,uint8> &commands) {
bool SharedDatabase::GetCommandSettings(std::map<std::string, std::pair<uint8, std::vector<std::string>>> &command_settings)
{
command_settings.clear();
const std::string query = "SELECT command, access FROM commands";
std::string query = "SELECT `command`, `access`, `aliases` FROM `command_settings`";
auto results = QueryDatabase(query);
if (!results.Success()) {
if (!results.Success())
return false;
for (auto row = results.begin(); row != results.end(); ++row) {
command_settings[row[0]].first = atoi(row[1]);
if (row[2][0] == 0)
continue;
std::vector<std::string> aliases = SplitString(row[2], '|');
for (std::vector<std::string>::iterator iter = aliases.begin(); iter != aliases.end(); ++iter) {
if (iter->empty())
continue;
command_settings[row[0]].second.push_back(*iter);
}
}
commands.clear();
for (auto row = results.begin(); row != results.end(); ++row)
commands[row[0]]=atoi(row[1]);
return true;
}

View File

@ -51,7 +51,7 @@ class SharedDatabase : public Database
int32 DeleteStalePlayerCorpses();
void LoadCharacterInspectMessage(uint32 character_id, InspectMessage_Struct* message);
void SaveCharacterInspectMessage(uint32 character_id, const InspectMessage_Struct* message);
bool GetCommandSettings(std::map<std::string, uint8> &commands);
bool GetCommandSettings(std::map<std::string, std::pair<uint8, std::vector<std::string>>> &command_settings);
uint32 GetTotalTimeEntitledOnAccount(uint32 AccountID);
/*

View File

@ -30,7 +30,7 @@
Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
*/
#define CURRENT_BINARY_DATABASE_VERSION 9090
#define CURRENT_BINARY_DATABASE_VERSION 9091
#ifdef BOTS
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9000
#else

View File

@ -344,6 +344,7 @@
9088|2015_11_01_perl_event_export_settings.sql|SHOW TABLES LIKE 'perl_event_export_settings'|empty|
9089|2015_11_02_ai_idle_no_spell_recast_default_changes.sql|SELECT * FROM `rule_values` WHERE `rule_name` LIKE '%Spells:AI_IdleNoSpellMinRecast%' AND `rule_value` = '500'|not_empty|
9090|2015_12_01_spell_scribe_restriction_rule.sql|SELECT `rule_name` FROM `rule_values` WHERE `rule_name` LIKE 'Character:RestrictSpellScribing'|empty|
9091|2015_12_07_command_settings.sql|SHOW TABLES LIKE 'command_settings'|empty|
# Upgrade conditions:
# This won't be needed after this system is implemented, but it is used database that are not

File diff suppressed because one or more lines are too long

View File

@ -73,9 +73,7 @@ extern TaskManager *taskmanager;
void CatchSignal(int sig_num);
//struct cl_struct *commandlist; // the actual linked list of commands
int commandcount; // how many commands we have
int commandcount; // how many commands we have
// this is the pointer to the dispatch function, updated once
// init has been performed to point at the real function
@ -90,7 +88,6 @@ std::map<std::string, CommandRecord *> commandlist;
//All allocated CommandRecords get put in here so they get deleted on shutdown
LinkedList<CommandRecord *> cleanup_commandlist;
/*
* command_notavail
* This is the default dispatch function when commands aren't loaded.
@ -139,31 +136,15 @@ Access Levels:
* Parameters:
* none
*
* When adding a command, if it's the first time that function pointer is
* used it is a new command. If that function pointer is used for another
* command, the command is added as an alias; description and access level
* are not used and can be nullptr.
* When adding a new command, only hard-code 'real' commands -
* all command aliases are added later through a database call
*
*/
int command_init(void) {
if
(
#ifdef PACKET_PROFILER
command_add("packetprofile", "- Dump packet profile for target or self.", 250, command_packetprofile) ||
#endif
#ifdef EQPROFILE
command_add("profiledump", "- Dump profiling info to logs", 250, command_profiledump) ||
command_add("profilereset", "- Reset profiling info", 250, command_profilereset) ||
#endif
#ifdef BOTS
command_add("bot", "- Type \"#bot help\" to the see the list of available commands for bots.", 0, command_bot) ||
#endif
int command_init(void)
{
if (
command_add("acceptrules", "[acceptrules] - Accept the EQEmu Agreement", 0, command_acceptrules) ||
command_add("advnpc", "analog for advnpcspawn [maketype|makegroup|addgroupentry|addgroupspawn][removegroupspawn|movespawn|editgroupbox|cleargroupbox]", 150, command_advnpcspawn) ||
command_add("advnpcspawn", "[maketype|makegroup|addgroupentry|addgroupspawn][removegroupspawn|movespawn|editgroupbox|cleargroupbox]", 150, command_advnpcspawn) ||
command_add("aggro", "(range) [-v] - Display aggro information for all mobs 'range' distance from your target. -v is verbose faction info.", 80, command_aggro) ||
command_add("aggrozone", "[aggro] - Aggro every mob in the zone with X aggro. Default is 0. Not recommend if you're not invulnerable.", 100, command_aggrozone) ||
@ -172,27 +153,27 @@ int command_init(void) {
command_add("apply_shared_memory", "[shared_memory_name] - Tells every zone and world to apply a specific shared memory segment by name.", 250, command_apply_shared_memory) ||
command_add("attack", "[targetname] - Make your NPC target attack targetname", 150, command_attack) ||
command_add("augmentitem", "Force augments an item. Must have the augment item window open.", 250, command_augmentitem) ||
command_add("aug", nullptr, 250, command_augmentitem) ||
command_add("ban", "[name] [reason]- Ban by character name", 150, command_ban) ||
command_add("beard", "- Change the beard of your target", 80, command_beard) ||
command_add("beardcolor", "- Change the beard color of your target", 80, command_beardcolor) ||
command_add("bestz", "- Ask map for a good Z coord for your x,y coords.", 0, command_bestz) ||
command_add("bind", "- Sets your targets bind spot to their current location", 200, command_bind) ||
#ifdef BOTS
command_add("bot", "- Type \"#bot help\" to the see the list of available commands for bots.", 0, command_bot) ||
#endif
command_add("camerashake", "Shakes the camera on everyone's screen globally.", 80, command_camerashake) ||
command_add("cast", nullptr,0, command_castspell) ||
command_add("castspell", "[spellid] - Cast a spell", 50, command_castspell) ||
command_add("chat", "[channel num] [message] - Send a channel message to all zones", 200, command_chat) ||
command_add("checklos", "- Check for line of sight to your target", 50, command_checklos) ||
command_add("clearinvsnapshots", "[use rule] - Clear inventory snapshot history (true - elapsed entries, false - all entries)", 200, command_clearinvsnapshots) ||
command_add("close_shop", nullptr, 100, command_merchantcloseshop) ||
command_add("connectworld", nullptr,0, command_connectworldserver) ||
command_add("connectworldserver", "- Make zone attempt to connect to worldserver", 200, command_connectworldserver) ||
command_add("corpse", "- Manipulate corpses, use with no arguments for help", 50, command_corpse) ||
command_add("crashtest", "- Crash the zoneserver", 255, command_crashtest) ||
command_add("cvs", "- Summary of client versions currently online.", 200, command_cvs) ||
command_add("crashtest", "- Crash the zoneserver", 255, command_crashtest) ||
command_add("cvs", "- Summary of client versions currently online.", 200, command_cvs) ||
command_add("damage", "[amount] - Damage your target", 100, command_damage) ||
command_add("date", "[yyyy] [mm] [dd] [HH] [MM] - Set EQ time", 90, command_date) ||
command_add("dbspawn", nullptr,10, command_npctypespawn) ||
command_add("dbspawn2", "[spawngroup] [respawn] [variance] - Spawn an NPC from a predefined row in the spawn2 table", 100, command_dbspawn2) ||
command_add("delacct", "[accountname] - Delete an account", 150, command_delacct) ||
command_add("deletegraveyard", "[zone name] - Deletes the graveyard for the specified zone.", 200, command_deletegraveyard) ||
@ -210,8 +191,6 @@ int command_init(void) {
command_add("enablerecipe", "[recipe_id] - Enables a recipe using the recipe id.", 80, command_enablerecipe) ||
command_add("equipitem", "[slotid(0-21)] - Equip the item on your cursor into the specified slot", 50, command_equipitem) ||
command_add("face", "- Change the face of your target", 80, command_face) ||
command_add("fi", nullptr,10, command_itemsearch) ||
command_add("finditem", nullptr,10, command_itemsearch) ||
command_add("findnpctype", "[search criteria] - Search database NPC types", 100, command_findnpctype) ||
command_add("findspell", "[searchstring] - Search for a spell", 50, command_findspell) ||
command_add("findzone", "[search criteria] - Search database zones", 100, command_findzone) ||
@ -220,22 +199,17 @@ int command_init(void) {
command_add("flagedit", "- Edit zone flags on your target", 100, command_flagedit) ||
command_add("flags", "- displays the flags of you or your target", 0, command_flags) ||
command_add("flymode", "[0/1/2] - Set your or your player target's flymode to off/on/levitate", 50, command_flymode) ||
command_add("fn", nullptr, 100, command_findnpctype) ||
command_add("fov", "- Check wether you're behind or in your target's field of view", 80, command_fov) ||
command_add("freeze", "- Freeze your target", 80, command_freeze) ||
command_add("fs", nullptr, 50, command_findspell) ||
command_add("fz", nullptr, 100, command_findzone) ||
command_add("gassign", "[id] - Assign targetted NPC to predefined wandering grid id", 100, command_gassign) ||
command_add("gender", "[0/1/2] - Change your or your target's gender to male/female/neuter", 50, command_gender) ||
command_add("getplayerburiedcorpsecount", "- Get the target's total number of buried player corpses.", 100, command_getplayerburiedcorpsecount) ||
command_add("getvariable", "[varname] - Get the value of a variable from the database", 200, command_getvariable) ||
command_add("gi", nullptr,200, command_giveitem) ||
command_add("ginfo", "- get group info on target.", 20, command_ginfo) ||
command_add("giveitem", "[itemid] [charges] - Summon an item onto your target's cursor. Charges are optional.", 200, command_giveitem) ||
command_add("givemoney", "[pp] [gp] [sp] [cp] - Gives specified amount of money to the target player.", 200, command_givemoney) ||
command_add("globalview", "Lists all qglobals in cache if you were to do a quest with this target.", 80, command_globalview) ||
command_add("gm", "- Turn player target's or your GM flag on or off", 80, command_gm) ||
command_add("gmhideme", nullptr,0, command_hideme) ||
command_add("gmspeed", "[on/off] - Turn GM speed hack on/off for you or your player target", 100, command_gmspeed) ||
command_add("goto", "[x] [y] [z] - Teleport to the provided coordinates or to your target", 10, command_goto) ||
command_add("grid", "[add/delete] [grid_num] [wandertype] [pausetype] - Create/delete a wandering grid", 170, command_grid) ||
@ -243,7 +217,6 @@ int command_init(void) {
command_add("guildapprove", "[guildapproveid] - Approve a guild with specified ID (guild creator receives the id)", 0, command_guildapprove) ||
command_add("guildcreate", "[guildname] - Creates an approval setup for guild name specified", 0, command_guildcreate) ||
command_add("guildlist", "[guildapproveid] - Lists character names who have approved the guild specified by the approve id", 0, command_guildlist) ||
command_add("guilds", nullptr,0, command_guild) ||
command_add("hair", "- Change the hair style of your target", 80, command_hair) ||
command_add("haircolor", "- Change the hair color of your target", 80, command_haircolor) ||
command_add("haste", "[percentage] - Set your haste percentage", 100, command_haste) ||
@ -254,7 +227,6 @@ int command_init(void) {
command_add("heritage", "- Change the heritage of your target (Drakkin Only)", 80, command_heritage) ||
command_add("heromodel", "[hero model] [slot] - Full set of Hero's Forge Armor appearance. If slot is set, sends exact model just to slot.", 200, command_heromodel) ||
command_add("hideme", "[on/off] - Hide yourself from spawn lists.", 80, command_hideme) ||
command_add("hm", "[hero model] [slot] - Full set of Hero's Forge Armor appearance. If slot is set, sends exact model just to slot.)", 200, command_heromodel) ||
command_add("hotfix", "[hotfix_name] - Reloads shared memory into a hotfix, equiv to load_shared_memory followed by apply_shared_memory", 250, command_hotfix) ||
command_add("hp", "- Refresh your HP bar from the server.", 0, command_hp) ||
command_add("incstat", "- Increases or Decreases a client's stats permanently.", 200, command_incstat) ||
@ -262,8 +234,7 @@ int command_init(void) {
command_add("interrogateinv", "- use [help] argument for available options", 0, command_interrogateinv) ||
command_add("interrupt", "[message id] [color] - Interrupt your casting. Arguments are optional.", 50, command_interrupt) ||
command_add("invsnapshot", "- Takes an inventory snapshot of your current target", 80, command_invsnapshot) ||
command_add("invul", nullptr,0, command_invul) ||
command_add("invulnerable", "[on/off] - Turn player target's or your invulnerable flag on or off", 80, command_invul) ||
command_add("invul", "[on/off] - Turn player target's or your invulnerable flag on or off", 80, command_invul) ||
command_add("ipban", "[IP address] - Ban IP by character name", 200, command_ipban) ||
command_add("iplookup", "[charname] - Look up IP address of charname", 200, command_iplookup) ||
command_add("iteminfo", "- Get information about the item on your cursor", 10, command_iteminfo) ||
@ -279,10 +250,9 @@ int command_init(void) {
command_add("lock", "- Lock the worldserver", 150, command_lock) ||
command_add("logs", "Manage anything to do with logs", 250, command_logs) ||
command_add("logtest", "Performs log performance testing.", 250, command_logtest) ||
command_add("los", nullptr,0, command_checklos) ||
command_add("makepet", "[level] [class] [race] [texture] - Make a pet", 50, command_makepet) ||
command_add("mana", "- Fill your or your target's mana", 50, command_mana) ||
command_add("maxskills", "Maxes skills for you.", 200, command_max_all_skills) ||
command_add("maxskills", "Maxes skills for you.", 200, command_max_all_skills) ||
command_add("memspell", "[slotid] [spellid] - Memorize spellid in the specified slot", 50, command_memspell) ||
command_add("merchant_close_shop", "Closes a merchant shop", 100, command_merchantcloseshop) ||
command_add("merchant_open_shop", "Opens a merchants shop", 100, command_merchantopenshop) ||
@ -291,7 +261,7 @@ int command_init(void) {
command_add("movechar", "[charname] [zonename] - Move charname to zonename", 50, command_movechar) ||
command_add("myskills", "- Show details about your current skill levels", 0, command_myskills) ||
command_add("mysqltest", "Akkadius MySQL Bench Test", 250, command_mysqltest) ||
command_add("mysql", "Mysql CLI, see 'help' for options.", 250, command_mysql) ||
command_add("mysql", "Mysql CLI, see 'help' for options.", 250, command_mysql) ||
command_add("mystats", "- Show details about you or your pet", 50, command_mystats) ||
command_add("name", "[newname] - Rename your player target", 150, command_name) ||
command_add("netstats", "- Gets the network stats for a stream.", 200, command_netstats) ||
@ -302,8 +272,6 @@ int command_init(void) {
command_add("npcsay", "[message] - Make your NPC target say a message.", 150, command_npcsay) ||
command_add("npcshout", "[message] - Make your NPC target shout a message.", 150, command_npcshout) ||
command_add("npcspawn", "[create/add/update/remove/delete] - Manipulate spawn DB", 170, command_npcspawn) ||
command_add("npcspecialatk", nullptr,0, command_npcspecialattk) ||
command_add("npcspecialattack", nullptr,0, command_npcspecialattk) ||
command_add("npcspecialattk", "[flagchar] [perm] - Set NPC special attack flags. Flags are E(nrage) F(lurry) R(ampage) S(ummon).", 80, command_npcspecialattk) ||
command_add("npcstats", "- Show stats about target NPC", 80, command_npcstats) ||
command_add("npctype_cache", "[id] or all - Clears the npc type cache for either the id or all npcs.", 250, command_npctype_cache) ||
@ -313,7 +281,11 @@ int command_init(void) {
command_add("object", "List|Add|Edit|Move|Rotate|Copy|Save|Undo|Delete - Manipulate static and tradeskill objects within the zone", 100, command_object) ||
command_add("oocmute", "[1/0] - Mutes OOC chat", 200, command_oocmute) ||
command_add("opcode", "- opcode management", 250, command_opcode) ||
command_add("open_shop", nullptr, 100, command_merchantopenshop) ||
#ifdef PACKET_PROFILER
command_add("packetprofile", "- Dump packet profile for target or self.", 250, command_packetprofile) ||
#endif
command_add("path", "- view and edit pathing", 200, command_path) ||
command_add("peekinv", "[worn/inv/cursor/trib/bank/trade/world/all] - Print out contents of your player target's inventory", 100, command_peekinv) ||
command_add("peqzone", "[zonename] - Go to specified zone, if you have > 75% health", 0, command_peqzone) ||
@ -323,9 +295,15 @@ int command_init(void) {
command_add("petitioninfo", "[petition number] - Get info about a petition", 20, command_petitioninfo) ||
command_add("pf", "- Display additional mob coordinate and wandering data", 0, command_pf) ||
command_add("picklock", "Analog for ldon pick lock for the newer clients since we still don't have it working.", 0, command_picklock) ||
#ifdef EQPROFILE
command_add("profiledump", "- Dump profiling info to logs", 250, command_profiledump) ||
command_add("profilereset", "- Reset profiling info", 250, command_profilereset) ||
#endif
command_add("pvp", "[on/off] - Set your or your player target's PVP status", 100, command_pvp) ||
command_add("qglobal", "[on/off/view] - Toggles qglobal functionality on an NPC", 100, command_qglobal) ||
command_add("questerrors", "Shows quest errors.", 100, command_questerrors) ||
command_add("questerrors", "Shows quest errors.", 100, command_questerrors) ||
command_add("race", "[racenum] - Change your or your target's race. Use racenum 0 to return to normal", 50, command_race) ||
command_add("raidloot", "LEADER|GROUPLEADER|SELECTED|ALL - Sets your raid loot settings if you have permission to do so.", 0, command_raidloot) ||
command_add("randomfeatures", "- Temporarily randomizes the Facial Features of your target", 80, command_randomfeatures) ||
@ -333,41 +311,32 @@ int command_init(void) {
command_add("reloadaa", "Reloads AA data", 200, command_reloadaa) ||
command_add("reloadallrules", "Executes a reload of all rules.", 80, command_reloadallrules) ||
command_add("reloademote", "Reloads NPC Emotes", 80, command_reloademote) ||
command_add("reloadlevelmods", nullptr,255, command_reloadlevelmods) ||
command_add("reloadlevelmods", nullptr, 255, command_reloadlevelmods) ||
command_add("reloadperlexportsettings", nullptr, 255, command_reloadperlexportsettings) ||
command_add("reloadqst", " - Clear quest cache (any argument causes it to also stop all timers)", 150, command_reloadqst) ||
command_add("reloadquest", " - Clear quest cache (any argument causes it to also stop all timers)", 150, command_reloadqst) ||
command_add("reloadrulesworld", "Executes a reload of all rules in world specifically.", 80, command_reloadworldrules) ||
command_add("reloadstatic", "- Reload Static Zone Data", 150, command_reloadstatic) ||
command_add("reloadtitles", "- Reload player titles from the database", 150, command_reloadtitles) ||
command_add("reloadworld", "[0|1] - Clear quest cache (0 - no repop, 1 - repop)", 255, command_reloadworld) ||
command_add("reloadzonepoints", "- Reload zone points from database", 150, command_reloadzps) ||
command_add("reloadzps", nullptr,0, command_reloadzps) ||
command_add("reloadzps", "- Reload zone points from database", 150, command_reloadzps) ||
command_add("repop", "[delay] - Repop the zone with optional delay", 100, command_repop) ||
command_add("repopclose", "[distance in units] Repops only NPC's nearby for fast development purposes", 100, command_repopclose) ||
command_add("resetaa", "- Resets a Player's AA in their profile and refunds spent AA's to unspent, may disconnect player.", 200, command_resetaa) ||
command_add("resetaa_timer", "Command to reset AA cooldown timers.", 200, command_resetaa_timer) ||
command_add("revoke", "[charname] [1/0] - Makes charname unable to talk on OOC", 200, command_revoke) ||
command_add("rq", nullptr, 150, command_reloadqst) ||
command_add("rules", "(subcommand) - Manage server rules", 250, command_rules) ||
command_add("rules", "(subcommand) - Manage server rules", 250, command_rules) ||
command_add("save", "- Force your player or player corpse target to be saved to the database", 50, command_save) ||
command_add("scribespell", "[spellid] - Scribe specified spell in your target's spell book.", 180, command_scribespell) ||
command_add("scribespell", "[spellid] - Scribe specified spell in your target's spell book.", 180, command_scribespell) ||
command_add("scribespells", "[max level] [min level] - Scribe all spells for you or your player target that are usable by them, up to level specified. (may freeze client for a few seconds)", 150, command_scribespells) ||
command_add("search", nullptr,10, command_itemsearch) ||
command_add("sendzonespawns", "- Refresh spawn list for all clients in zone", 150, command_sendzonespawns) ||
command_add("sensetrap", "Analog for ldon sense trap for the newer clients since we still don't have it working.", 0, command_sensetrap) ||
command_add("serverinfo", "- Get OS info about server host", 200, command_serverinfo) ||
command_add("serverrules", "- Read this server's rules", 0, command_serverrules) ||
command_add("setaaexp", nullptr,0, command_setaaxp) ||
command_add("setaapoints", nullptr,0, command_setaapts) ||
command_add("setaapts", "[value] - Set your or your player target's available AA points", 100, command_setaapts) ||
command_add("setaaxp", "[value] - Set your or your player target's AA experience", 100, command_setaaxp) ||
command_add("setadventurepoints", "- Set your or your player target's available adventure points", 150, command_set_adventure_points) ||
command_add("setallskill", nullptr,0, command_setskillall) ||
command_add("setallskills", nullptr,0, command_setskillall) ||
command_add("setanim", "[animnum] - Set target's appearance to animnum", 200, command_setanim) ||
command_add("setcrystals", "[value] - Set your or your player target's available radiant or ebon crystals", 100, command_setcrystals) ||
command_add("setexp", nullptr,0, command_setxp) ||
command_add("setfaction", "[faction number] - Sets targeted NPC's faction in the database", 170, command_setfaction) ||
command_add("setgraveyard", "[zone name] - Creates a graveyard for the specified zone based on your target's LOC.", 200, command_setgraveyard) ||
command_add("setlanguage", "[language ID] [value] - Set your target's language skillnum to value", 50, command_setlanguage) ||
@ -386,13 +355,11 @@ int command_init(void) {
command_add("showspellslist", "Shows spell list of targeted NPC", 100, command_showspellslist) ||
command_add("showstats", "- Show details about you or your target", 50, command_showstats) ||
command_add("shutdown", "- Shut this zone process down", 150, command_shutdown) ||
command_add("si", nullptr,200, command_summonitem) ||
command_add("size", "[size] - Change size of you or your target", 50, command_size) ||
command_add("spawn", "[name] [race] [level] [material] [hp] [gender] [class] [priweapon] [secweapon] [merchantid] - Spawn an NPC", 10, command_spawn) ||
command_add("spawnfix", "- Find targeted NPC in database based on its X/Y/heading and update the database to make it spawn at your current location/heading.", 170, command_spawnfix) ||
command_add("spawnstatus", "- Show respawn timer status", 100, command_spawnstatus) ||
command_add("spellinfo", "[spellid] - Get detailed info about a spell", 10, command_spellinfo) ||
command_add("spfind", nullptr,0, command_findspell) ||
command_add("spoff", "- Sends OP_ManaChange", 80, command_spoff) ||
command_add("spon", "- Sends OP_MemorizeSpell", 80, command_spon) ||
command_add("stun", "[duration] - Stuns you or your target for duration", 100, command_stun) ||
@ -414,7 +381,7 @@ int command_init(void) {
command_add("undyeme", "- Remove dye from all of your armor slots", 0, command_undyeme) ||
command_add("unfreeze", "- Unfreeze your target", 80, command_unfreeze) ||
command_add("unlock", "- Unlock the worldserver", 150, command_unlock) ||
command_add("unscribespell", "[spellid] - Unscribe specified spell from your target's spell book.", 180, command_unscribespell) ||
command_add("unscribespell", "[spellid] - Unscribe specified spell from your target's spell book.", 180, command_unscribespell) ||
command_add("unscribespells", "- Clear out your or your player target's spell book.", 180, command_unscribespells) ||
command_add("untraindisc", "[spellid] - Untrain specified discipline from your target.", 180, command_untraindisc) ||
command_add("untraindiscs", "- Untrains all disciplines from your target.", 180, command_untraindiscs) ||
@ -446,27 +413,35 @@ int command_init(void) {
command_add("zstats", "- Show info about zone header", 80, command_zstats) ||
command_add("zunderworld", "[zcoord] - Sets the underworld using zcoord", 80, command_zunderworld) ||
command_add("zuwcoords", "[z coord] - Set underworld coord", 80, command_zuwcoords)
)
{
) {
command_deinit();
return -1;
}
std::map<std::string, CommandRecord *>::iterator cur,end;
cur = commandlist.begin();
end = commandlist.end();
std::map<std::string,uint8> command_settings;
std::map<std::string,uint8>::iterator itr;
std::map<std::string, std::pair<uint8, std::vector<std::string>>> command_settings;
database.GetCommandSettings(command_settings);
for(; cur != end; ++cur) {
if ((itr=command_settings.find(cur->first))!=command_settings.end()) {
cur->second->access = itr->second;
Log.Out(Logs::General, Logs::Commands, "command_init(): - Command '%s' set to access level %d.", cur->first.c_str(), itr->second);
for (std::map<std::string, CommandRecord *>::iterator iter_cl = commandlist.begin(); iter_cl != commandlist.end(); ++iter_cl) {
std::map<std::string, std::pair<uint8, std::vector<std::string>>>::iterator iter_cs = command_settings.find(iter_cl->first);
if (iter_cs == command_settings.end()) {
if (iter_cl->second->access == 0)
Log.Out(Logs::General, Logs::Commands, "command_init(): Warning: Command '%s' defaulting to access level 0!", iter_cl->first.c_str());
continue;
}
else
{
if(cur->second->access == 0)
Log.Out(Logs::General, Logs::Commands, "command_init(): Warning: Command '%s' defaulting to access level 0!" , cur->first.c_str());
iter_cl->second->access = iter_cs->second.first;
Log.Out(Logs::General, Logs::Commands, "command_init(): - Command '%s' set to access level %d.", iter_cl->first.c_str(), iter_cs->second.first);
if (iter_cs->second.second.empty())
continue;
for (std::vector<std::string>::iterator iter_aka = iter_cs->second.second.begin(); iter_aka != iter_cs->second.second.end(); ++iter_aka) {
if (iter_aka->empty())
continue;
if (commandlist.find(*iter_aka) != commandlist.end()) {
Log.Out(Logs::General, Logs::Commands, "command_init(): Warning: Alias '%s' already exists as a command - skipping!", iter_aka->c_str());
continue;
}
commandlist[*iter_aka] = iter_cl->second;
}
}
@ -496,53 +471,38 @@ void command_deinit(void)
* adds a command to the command list; used by command_init
*
* Parameters:
* command_string - the command ex: "spawn"
* desc - text description of command for #help
* access - default access level required to use command
* command_name - the command ex: "spawn"
* desc - text description of command for #help
* access - default access level required to use command
* function - pointer to function that handles command
*
*/
int command_add(const char *command_string, const char *desc, int access, CmdFuncPtr function)
int command_add(std::string command_name, const char *desc, int access, CmdFuncPtr function)
{
if(function == nullptr)
return(-1);
std::string cstr(command_string);
if(commandlist.count(cstr) != 0) {
Log.Out(Logs::General, Logs::Error, "command_add() - Command '%s' is a duplicate - check command.cpp." , command_string);
return(-1);
if (command_name.empty()) {
Log.Out(Logs::General, Logs::Error, "command_add() - Command added with empty name string - check command.cpp.");
return -1;
}
if (function == nullptr) {
Log.Out(Logs::General, Logs::Error, "command_add() - Command '%s' added without a valid function pointer - check command.cpp.", command_name.c_str());
return -1;
}
if (commandlist.count(command_name) != 0) {
Log.Out(Logs::General, Logs::Error, "command_add() - Command '%s' is a duplicate command name - check command.cpp.", command_name.c_str());
return -1;
}
for (std::map<std::string, CommandRecord *>::iterator iter = commandlist.begin(); iter != commandlist.end(); ++iter) {
if (iter->second->function != function)
continue;
Log.Out(Logs::General, Logs::Error, "command_add() - Command '%s' equates to an alias of '%s' - check command.cpp.", command_name.c_str(), iter->first.c_str());
return -1;
}
//look for aliases...
std::map<std::string, CommandRecord *>::iterator cur,end,del;
cur = commandlist.begin();
end = commandlist.end();
for(; cur != end; ++cur) {
if(cur->second->function == function) {
int r;
for(r = 1; r < CMDALIASES; r++) {
if(cur->second->command[r] == nullptr) {
cur->second->command[r] = command_string;
break;
}
}
commandlist[cstr] = cur->second;
return(0);
}
}
CommandRecord *c = new CommandRecord;
CommandRecord *c = new CommandRecord{ access, desc, function };
commandlist[command_name] = c;
cleanup_commandlist.Append(c);
c->desc = desc;
c->access = access;
c->function = function;
memset(c->command, 0, sizeof(c->command));
c->command[0] = command_string;
commandlist[cstr] = c;
commandcount++;
return 0;
}

View File

@ -25,324 +25,311 @@ class Seperator;
#include "../common/types.h"
#define COMMAND_CHAR '#'
#define CMDALIASES 5
#define COMMAND_CHAR '#'
typedef void (*CmdFuncPtr)(Client *,const Seperator *);
// this is a command list item
/*struct cl_struct
{
char *command[CMDALIASES]; // the command(s)
char *desc; // description of command
CmdFuncPtr function; // the function to call
int access; // the required 'status' level
struct cl_struct *next; // linked list
};
extern struct cl_struct *commandlist; // the head of the list
*/
typedef struct {
const char *command[CMDALIASES]; // the command(s)
int access;
const char *desc; // description of command
CmdFuncPtr function; //null means perl function
const char *desc; // description of command
CmdFuncPtr function; // null means perl function
} CommandRecord;
extern int (*command_dispatch)(Client *,char const*);
extern int commandcount; // number of commands loaded
extern int commandcount; // number of commands loaded
// the command system:
int command_init(void);
void command_deinit(void);
int command_add(const char *command_string, const char *desc, int access, CmdFuncPtr function);
int command_add(std::string command_name, const char *desc, int access, CmdFuncPtr function);
int command_notavail(Client *c, const char *message);
int command_realdispatch(Client *c, char const *message);
void command_logcommand(Client *c, const char *message);
//commands
void command_resetaa(Client* c,const Seperator *sep);
void command_bind(Client* c,const Seperator *sep);
void command_sendop(Client *c, const Seperator *sep);
void command_optest(Client *c, const Seperator *sep);
void command_setstat(Client *c, const Seperator *sep);
void command_incstat(Client *c, const Seperator *sep);
void command_help(Client *c, const Seperator *sep);
void command_version(Client *c, const Seperator *sep);
void command_setfaction(Client *c, const Seperator *sep);
void command_serversidename(Client *c, const Seperator *sep);
void command_testspawnkill(Client *c, const Seperator *sep);
void command_testspawn(Client *c, const Seperator *sep);
void command_wc(Client *c, const Seperator *sep);
void command_heromodel(Client *c, const Seperator *sep);
void command_numauths(Client *c, const Seperator *sep);
void command_setanim(Client *c, const Seperator *sep);
void command_connectworldserver(Client *c, const Seperator *sep);
void command_serverinfo(Client *c, const Seperator *sep);
void command_crashtest(Client *c, const Seperator *sep);
void command_getvariable(Client *c, const Seperator *sep);
void command_chat(Client *c, const Seperator *sep);
void command_showpetspell(Client *c, const Seperator *sep);
void command_ipc(Client *c, const Seperator *sep);
void command_npcloot(Client *c, const Seperator *sep);
void command_gm(Client *c, const Seperator *sep);
void command_summon(Client *c, const Seperator *sep);
void command_zone(Client *c, const Seperator *sep);
void command_zone_instance(Client *c, const Seperator *sep);
void command_peqzone(Client *c, const Seperator *sep);
void command_showbuffs(Client *c, const Seperator *sep);
void command_movechar(Client *c, const Seperator *sep);
void command_viewpetition(Client *c, const Seperator *sep);
void command_petitioninfo(Client *c, const Seperator *sep);
void command_delpetition(Client *c, const Seperator *sep);
void command_listnpcs(Client *c, const Seperator *sep);
void command_date(Client *c, const Seperator *sep);
void command_timezone(Client *c, const Seperator *sep);
void command_synctod(Client *c, const Seperator *sep);
void command_invul(Client *c, const Seperator *sep);
void command_hideme(Client *c, const Seperator *sep);
void command_emote(Client *c, const Seperator *sep);
void command_fov(Client *c, const Seperator *sep);
void command_manastat(Client *c, const Seperator *sep);
void command_npcstats(Client *c, const Seperator *sep);
void command_zclip(Client *c, const Seperator *sep);
void command_npccast(Client *c, const Seperator *sep);
void command_zstats(Client *c, const Seperator *sep);
void command_permaclass(Client *c, const Seperator *sep);
void command_permarace(Client *c, const Seperator *sep);
void command_permagender(Client *c, const Seperator *sep);
void command_weather(Client *c, const Seperator *sep);
void command_zheader(Client *c, const Seperator *sep);
void command_zsky(Client *c, const Seperator *sep);
void command_zcolor(Client *c, const Seperator *sep);
void command_spon(Client *c, const Seperator *sep);
void command_spoff(Client *c, const Seperator *sep);
void command_itemtest(Client *c, const Seperator *sep);
void command_gassign(Client *c, const Seperator *sep);
void command_acceptrules(Client *c, const Seperator *sep);
void command_advnpcspawn(Client *c, const Seperator *sep);
void command_aggro(Client *c, const Seperator *sep);
void command_aggrozone(Client *c, const Seperator *sep);
void command_ai(Client *c, const Seperator *sep);
void command_worldshutdown(Client *c, const Seperator *sep);
void command_sendzonespawns(Client *c, const Seperator *sep);
void command_zsave(Client *c, const Seperator *sep);
void command_dbspawn2(Client *c, const Seperator *sep);
void command_shutdown(Client *c, const Seperator *sep);
void command_delacct(Client *c, const Seperator *sep);
void command_setpass(Client *c, const Seperator *sep);
void command_setlsinfo(Client *c, const Seperator *sep);
void command_grid(Client *c, const Seperator *sep);
void command_wp(Client *c, const Seperator *sep);
void command_iplookup(Client *c, const Seperator *sep);
void command_size(Client *c, const Seperator *sep);
void command_mana(Client *c, const Seperator *sep);
void command_flymode(Client *c, const Seperator *sep);
void command_showskills(Client *c, const Seperator *sep);
void command_findspell(Client *c, const Seperator *sep);
void command_castspell(Client *c, const Seperator *sep);
void command_setlanguage(Client *c, const Seperator *sep);
void command_setskill(Client *c, const Seperator *sep);
void command_setskillall(Client *c, const Seperator *sep);
void command_race(Client *c, const Seperator *sep);
void command_gender(Client *c, const Seperator *sep);
void command_makepet(Client *c, const Seperator *sep);
void command_level(Client *c, const Seperator *sep);
void command_spawn(Client *c, const Seperator *sep);
void command_texture(Client *c, const Seperator *sep);
void command_npctypespawn(Client *c, const Seperator *sep);
void command_heal(Client *c, const Seperator *sep);
void command_appearance(Client *c, const Seperator *sep);
void command_nukeitem(Client *c, const Seperator *sep);
void command_peekinv(Client *c, const Seperator *sep);
void command_interrogateinv(Client *c, const Seperator *sep);
void command_invsnapshot(Client *c, const Seperator *sep);
void command_clearinvsnapshots(Client *c, const Seperator *sep);
void command_findnpctype(Client *c, const Seperator *sep);
void command_findzone(Client *c, const Seperator *sep);
void command_viewnpctype(Client *c, const Seperator *sep);
void command_reloadqst(Client *c, const Seperator *sep);
void command_reloadworld(Client *c, const Seperator *sep);
void command_reloadzps(Client *c, const Seperator *sep);
void command_zoneshutdown(Client *c, const Seperator *sep);
void command_zonebootup(Client *c, const Seperator *sep);
void command_kick(Client *c, const Seperator *sep);
void command_apply_shared_memory(Client *c, const Seperator *sep);
void command_attack(Client *c, const Seperator *sep);
void command_lock(Client *c, const Seperator *sep);
void command_unlock(Client *c, const Seperator *sep);
void command_motd(Client *c, const Seperator *sep);
void command_listpetition(Client *c, const Seperator *sep);
void command_equipitem(Client *c, const Seperator *sep);
void command_zonelock(Client *c, const Seperator *sep);
void command_corpse(Client *c, const Seperator *sep);
void command_fixmob(Client *c, const Seperator *sep);
void command_gmspeed(Client *c, const Seperator *sep);
void command_title(Client *c, const Seperator *sep);
void command_titlesuffix(Client *c, const Seperator *sep);
void command_spellinfo(Client *c, const Seperator *sep);
void command_lastname(Client *c, const Seperator *sep);
void command_memspell(Client *c, const Seperator *sep);
void command_save(Client *c, const Seperator *sep);
void command_showstats(Client *c, const Seperator *sep);
void command_mystats(Client *c, const Seperator *sep);
void command_myskills(Client *c, const Seperator *sep);
void command_depop(Client *c, const Seperator *sep);
void command_depopzone(Client *c, const Seperator *sep);
void command_repop(Client *c, const Seperator *sep);
void command_repopclose(Client *c, const Seperator *sep);
void command_spawnstatus(Client *c, const Seperator *sep);
void command_nukebuffs(Client *c, const Seperator *sep);
void command_zuwcoords(Client *c, const Seperator *sep);
void command_zunderworld(Client *c, const Seperator *sep);
void command_zsafecoords(Client *c, const Seperator *sep);
void command_freeze(Client *c, const Seperator *sep);
void command_unfreeze(Client *c, const Seperator *sep);
void command_pvp(Client *c, const Seperator *sep);
void command_setxp(Client *c, const Seperator *sep);
void command_setpvppoints(Client *c, const Seperator *sep);
void command_name(Client *c, const Seperator *sep);
void command_tempname(Client *c, const Seperator *sep);
void command_npcspecialattk(Client *c, const Seperator *sep);
void command_kill(Client *c, const Seperator *sep);
void command_haste(Client *c, const Seperator *sep);
void command_damage(Client *c, const Seperator *sep);
void command_zonespawn(Client *c, const Seperator *sep);
void command_npcspawn(Client *c, const Seperator *sep);
void command_spawnfix(Client *c, const Seperator *sep);
void command_loc(Client *c, const Seperator *sep);
void command_goto(Client *c, const Seperator *sep);
void command_augmentitem(Client *c, const Seperator *sep);
void command_ban(Client *c, const Seperator *sep);
void command_beard(Client *c, const Seperator *sep);
void command_beardcolor(Client *c, const Seperator *sep);
void command_bind(Client* c, const Seperator *sep);
#ifdef BUGTRACK
void command_bug(Client *c, const Seperator *sep);
#endif
void command_iteminfo(Client *c, const Seperator *sep);
void command_uptime(Client *c, const Seperator *sep);
void command_flag(Client *c, const Seperator *sep);
void command_time(Client *c, const Seperator *sep);
void command_guild(Client *c, const Seperator *sep);
bool helper_guild_edit(Client *c, uint32 dbid, uint32 eqid, uint8 rank, const char* what, const char* value);
void command_zonestatus(Client *c, const Seperator *sep);
void command_doanim(Client *c, const Seperator *sep);
void command_randomfeatures(Client *c, const Seperator *sep);
void command_face(Client *c, const Seperator *sep);
void command_helm(Client *c, const Seperator *sep);
void command_hair(Client *c, const Seperator *sep);
void command_haircolor(Client *c, const Seperator *sep);
void command_beard(Client *c, const Seperator *sep);
void command_beardcolor(Client *c, const Seperator *sep);
void command_tattoo(Client *c, const Seperator *sep);
void command_heritage(Client *c, const Seperator *sep);
void command_details(Client *c, const Seperator *sep);
void command_scribespells(Client *c, const Seperator *sep);
void command_unscribespells(Client *c, const Seperator *sep);
void command_wpinfo(Client *c, const Seperator *sep);
void command_wpadd(Client *c, const Seperator *sep);
void command_interrupt(Client *c, const Seperator *sep);
void command_camerashake(Client *c, const Seperator *sep);
void command_castspell(Client *c, const Seperator *sep);
void command_chat(Client *c, const Seperator *sep);
void command_checklos(Client *c, const Seperator *sep);
void command_clearinvsnapshots(Client *c, const Seperator *sep);
void command_connectworldserver(Client *c, const Seperator *sep);
void command_corpse(Client *c, const Seperator *sep);
void command_crashtest(Client *c, const Seperator *sep);
void command_cvs(Client *c, const Seperator *sep);
void command_d1(Client *c, const Seperator *sep);
void command_summonitem(Client *c, const Seperator *sep);
void command_damage(Client *c, const Seperator *sep);
void command_date(Client *c, const Seperator *sep);
void command_dbspawn2(Client *c, const Seperator *sep);
void command_delacct(Client *c, const Seperator *sep);
void command_deletegraveyard(Client *c, const Seperator *sep);
void command_delpetition(Client *c, const Seperator *sep);
void command_depop(Client *c, const Seperator *sep);
void command_depopzone(Client *c, const Seperator *sep);
void command_details(Client *c, const Seperator *sep);
void command_disablerecipe(Client *c, const Seperator *sep);
void command_disarmtrap(Client *c, const Seperator *sep);
void command_distance(Client *c, const Seperator *sep);
void command_doanim(Client *c, const Seperator *sep);
void command_emote(Client *c, const Seperator *sep);
void command_emotesearch(Client* c, const Seperator *sep);
void command_emoteview(Client* c, const Seperator *sep);
void command_enablerecipe(Client *c, const Seperator *sep);
void command_equipitem(Client *c, const Seperator *sep);
void command_face(Client *c, const Seperator *sep);
void command_findnpctype(Client *c, const Seperator *sep);
void command_findspell(Client *c, const Seperator *sep);
void command_findzone(Client *c, const Seperator *sep);
void command_fixmob(Client *c, const Seperator *sep);
void command_flag(Client *c, const Seperator *sep);
void command_flagedit(Client *c, const Seperator *sep);
void command_flags(Client *c, const Seperator *sep);
void command_flymode(Client *c, const Seperator *sep);
void command_fov(Client *c, const Seperator *sep);
void command_freeze(Client *c, const Seperator *sep);
void command_gassign(Client *c, const Seperator *sep);
void command_gender(Client *c, const Seperator *sep);
void command_getplayerburiedcorpsecount(Client *c, const Seperator *sep);
void command_getvariable(Client *c, const Seperator *sep);
void command_ginfo(Client *c, const Seperator *sep);
void command_giveitem(Client *c, const Seperator *sep);
void command_givemoney(Client *c, const Seperator *sep);
void command_itemsearch(Client *c, const Seperator *sep);
void command_setaaxp(Client *c, const Seperator *sep);
void command_setaapts(Client *c, const Seperator *sep);
void command_setcrystals(Client *c, const Seperator *sep);
void command_stun(Client *c, const Seperator *sep);
void command_ban(Client *c, const Seperator *sep);
void command_suspend(Client *c, const Seperator *sep);
void command_globalview(Client* c, const Seperator *sep);
void command_gm(Client *c, const Seperator *sep);
void command_gmspeed(Client *c, const Seperator *sep);
void command_goto(Client *c, const Seperator *sep);
void command_grid(Client *c, const Seperator *sep);
void command_guild(Client *c, const Seperator *sep);
bool helper_guild_edit(Client *c, uint32 dbid, uint32 eqid, uint8 rank, const char* what, const char* value);
void command_guildapprove(Client *c, const Seperator *sep);
void command_guildcreate(Client *c, const Seperator *sep);
void command_guildlist(Client *c, const Seperator *sep);
void command_hair(Client *c, const Seperator *sep);
void command_haircolor(Client *c, const Seperator *sep);
void command_haste(Client *c, const Seperator *sep);
void command_hatelist(Client *c, const Seperator *sep);
void command_heal(Client *c, const Seperator *sep);
void command_helm(Client *c, const Seperator *sep);
void command_help(Client *c, const Seperator *sep);
void command_heritage(Client *c, const Seperator *sep);
void command_heromodel(Client *c, const Seperator *sep);
void command_hideme(Client *c, const Seperator *sep);
void command_hotfix(Client *c, const Seperator *sep);
void command_hp(Client *c, const Seperator *sep);
void command_incstat(Client *c, const Seperator *sep);
void command_instance(Client *c, const Seperator *sep);
void command_interrogateinv(Client *c, const Seperator *sep);
void command_interrupt(Client *c, const Seperator *sep);
void command_invsnapshot(Client *c, const Seperator *sep);
void command_invul(Client *c, const Seperator *sep);
void command_ipban(Client *c, const Seperator *sep);
void command_oocmute(Client *c, const Seperator *sep);
void command_revoke(Client *c, const Seperator *sep);
void command_checklos(Client *c, const Seperator *sep);
void command_set_adventure_points(Client *c, const Seperator *sep);
void command_ipc(Client *c, const Seperator *sep);
void command_iplookup(Client *c, const Seperator *sep);
void command_iteminfo(Client *c, const Seperator *sep);
void command_itemsearch(Client *c, const Seperator *sep);
void command_itemtest(Client *c, const Seperator *sep);
void command_kick(Client *c, const Seperator *sep);
void command_kill(Client *c, const Seperator *sep);
void command_lastname(Client *c, const Seperator *sep);
void command_level(Client *c, const Seperator *sep);
void command_listnpcs(Client *c, const Seperator *sep);
void command_listpetition(Client *c, const Seperator *sep);
void command_load_shared_memory(Client *c, const Seperator *sep);
void command_loc(Client *c, const Seperator *sep);
void command_lock(Client *c, const Seperator *sep);
void command_logs(Client *c, const Seperator *sep);
void command_logtest(Client *c, const Seperator *sep);
void command_makepet(Client *c, const Seperator *sep);
void command_mana(Client *c, const Seperator *sep);
void command_manastat(Client *c, const Seperator *sep);
void command_max_all_skills(Client *c, const Seperator *sep);
void command_memspell(Client *c, const Seperator *sep);
void command_merchantcloseshop(Client *c, const Seperator *sep);
void command_merchantopenshop(Client *c, const Seperator *sep);
void command_modifynpcstat(Client *c, const Seperator *sep);
void command_motd(Client *c, const Seperator *sep);
void command_movechar(Client *c, const Seperator *sep);
void command_myskills(Client *c, const Seperator *sep);
void command_mysql(Client *c, const Seperator *sep);
void command_mysqltest(Client *c, const Seperator *sep);
void command_mystats(Client *c, const Seperator *sep);
void command_name(Client *c, const Seperator *sep);
void command_netstats(Client *c, const Seperator *sep);
void command_npccast(Client *c, const Seperator *sep);
void command_npcedit(Client *c, const Seperator *sep);
void command_npcemote(Client *c, const Seperator *sep);
void command_npcloot(Client *c, const Seperator *sep);
void command_npcsay(Client *c, const Seperator *sep);
void command_npcshout(Client *c, const Seperator *sep);
void command_npcemote(Client *c, const Seperator *sep);
void command_npcedit(Client *c, const Seperator *sep);
void command_timers(Client *c, const Seperator *sep);
void command_undye(Client *c, const Seperator *sep);
void command_undyeme(Client *c, const Seperator *sep);
void command_hp(Client *c, const Seperator *sep);
void command_ginfo(Client *c, const Seperator *sep);
void command_qglobal(Client *c, const Seperator *sep);
void command_path(Client *c, const Seperator *sep);
void command_ginfo(Client *c, const Seperator *sep);
void command_opcode(Client *c, const Seperator *sep);
void command_aggro(Client *c, const Seperator *sep);
void command_hatelist(Client *c, const Seperator *sep);
void command_aggrozone(Client *c, const Seperator *sep);
void command_reloadstatic(Client *c, const Seperator *sep);
void command_flags(Client *c, const Seperator *sep);
void command_flagedit(Client *c, const Seperator *sep);
void command_serverrules(Client *c, const Seperator *sep);
void command_acceptrules(Client *c, const Seperator *sep);
void command_guildcreate(Client *c, const Seperator *sep);
void command_guildapprove(Client *c, const Seperator *sep);
void command_guildlist(Client *c, const Seperator *sep);
void command_rules(Client *c, const Seperator *sep);
void command_task(Client *c, const Seperator *sep);
void command_reloadtitles(Client *c, const Seperator *sep);
void command_refundaa(Client *c, const Seperator *sep);
void command_traindisc(Client *c, const Seperator *sep);
void command_deletegraveyard(Client *c, const Seperator *sep);
void command_setgraveyard(Client *c, const Seperator *sep);
void command_getplayerburiedcorpsecount(Client *c, const Seperator *sep);
void command_summonburiedplayercorpse(Client *c, const Seperator *sep);
void command_unscribespell(Client *c, const Seperator *sep);
void command_scribespell(Client *c, const Seperator *sep);
void command_refreshgroup(Client *c, const Seperator *sep);
void command_advnpcspawn(Client *c, const Seperator *sep);
void command_modifynpcstat(Client *c, const Seperator *sep);
void command_instance(Client *c, const Seperator *sep);
void command_setstartzone(Client *c, const Seperator *sep);
void command_netstats(Client *c, const Seperator *sep);
void command_object(Client* c, const Seperator *sep);
void command_raidloot(Client* c, const Seperator *sep);
void command_globalview(Client* c, const Seperator *sep);
void command_emoteview(Client* c, const Seperator *sep);
void command_reloademote(Client* c, const Seperator *sep);
void command_emotesearch(Client* c, const Seperator *sep);
void command_distance(Client *c, const Seperator *sep);
void command_cvs(Client *c, const Seperator *sep);
void command_max_all_skills(Client *c, const Seperator *sep);
void command_showbonusstats(Client *c, const Seperator *sep);
void command_reloadallrules(Client *c, const Seperator *sep);
void command_reloadworldrules(Client *c, const Seperator *sep);
void command_reloadlevelmods(Client *c, const Seperator *sep);
void command_camerashake(Client *c, const Seperator *sep);
void command_disarmtrap(Client *c, const Seperator *sep);
void command_sensetrap(Client *c, const Seperator *sep);
void command_picklock(Client *c, const Seperator *sep);
void command_qtest(Client *c, const Seperator *sep);
void command_mysql(Client *c, const Seperator *sep);
void command_xtargets(Client *c, const Seperator *sep);
void command_zopp(Client *c, const Seperator *sep);
void command_augmentitem(Client *c, const Seperator *sep);
void command_questerrors(Client *c, const Seperator *sep);
void command_enablerecipe(Client *c, const Seperator *sep);
void command_disablerecipe(Client *c, const Seperator *sep);
void command_showspellslist(Client *c, const Seperator *sep);
void command_npcspawn(Client *c, const Seperator *sep);
void command_npcspecialattk(Client *c, const Seperator *sep);
void command_npcstats(Client *c, const Seperator *sep);
void command_npctype_cache(Client *c, const Seperator *sep);
void command_merchantopenshop(Client *c, const Seperator *sep);
void command_merchantcloseshop(Client *c, const Seperator *sep);
void command_shownumhits(Client *c, const Seperator *sep);
void command_tune(Client *c, const Seperator *sep);
void command_logtest(Client *c, const Seperator *sep);
void command_mysqltest(Client *c, const Seperator *sep);
void command_logs(Client *c, const Seperator *sep);
void command_resetaa_timer(Client *c, const Seperator *sep);
void command_reloadaa(Client *c, const Seperator *sep);
void command_hotfix(Client *c, const Seperator *sep);
void command_load_shared_memory(Client *c, const Seperator *sep);
void command_apply_shared_memory(Client *c, const Seperator *sep);
void command_untraindisc(Client *c, const Seperator *sep);
void command_untraindiscs(Client *c, const Seperator *sep);
void command_reloadperlexportsettings(Client *c, const Seperator *sep);
void command_npctypespawn(Client *c, const Seperator *sep);
void command_nukebuffs(Client *c, const Seperator *sep);
void command_nukeitem(Client *c, const Seperator *sep);
void command_numauths(Client *c, const Seperator *sep);
void command_object(Client* c, const Seperator *sep);
void command_oocmute(Client *c, const Seperator *sep);
void command_opcode(Client *c, const Seperator *sep);
void command_optest(Client *c, const Seperator *sep);
#ifdef PACKET_PROFILER
void command_packetprofile(Client *c, const Seperator *sep);
#endif
void command_path(Client *c, const Seperator *sep);
void command_peekinv(Client *c, const Seperator *sep);
void command_peqzone(Client *c, const Seperator *sep);
void command_permaclass(Client *c, const Seperator *sep);
void command_permagender(Client *c, const Seperator *sep);
void command_permarace(Client *c, const Seperator *sep);
void command_petitioninfo(Client *c, const Seperator *sep);
void command_picklock(Client *c, const Seperator *sep);
#ifdef EQPROFILE
void command_profiledump(Client *c, const Seperator *sep);
void command_profilereset(Client *c, const Seperator *sep);
#endif
#ifdef PACKET_PROFILER
void command_packetprofile(Client *c, const Seperator *sep);
#endif
void command_pvp(Client *c, const Seperator *sep);
void command_qglobal(Client *c, const Seperator *sep);
void command_qtest(Client *c, const Seperator *sep);
void command_questerrors(Client *c, const Seperator *sep);
void command_race(Client *c, const Seperator *sep);
void command_raidloot(Client* c, const Seperator *sep);
void command_randomfeatures(Client *c, const Seperator *sep);
void command_refreshgroup(Client *c, const Seperator *sep);
void command_refundaa(Client *c, const Seperator *sep);
void command_reloadaa(Client *c, const Seperator *sep);
void command_reloadallrules(Client *c, const Seperator *sep);
void command_reloademote(Client* c, const Seperator *sep);
void command_reloadlevelmods(Client *c, const Seperator *sep);
void command_reloadperlexportsettings(Client *c, const Seperator *sep);
void command_reloadqst(Client *c, const Seperator *sep);
void command_reloadstatic(Client *c, const Seperator *sep);
void command_reloadtitles(Client *c, const Seperator *sep);
void command_reloadworld(Client *c, const Seperator *sep);
void command_reloadworldrules(Client *c, const Seperator *sep);
void command_reloadzps(Client *c, const Seperator *sep);
void command_repop(Client *c, const Seperator *sep);
void command_repopclose(Client *c, const Seperator *sep);
void command_resetaa(Client* c,const Seperator *sep);
void command_resetaa_timer(Client *c, const Seperator *sep);
void command_revoke(Client *c, const Seperator *sep);
void command_rules(Client *c, const Seperator *sep);
void command_save(Client *c, const Seperator *sep);
void command_scribespell(Client *c, const Seperator *sep);
void command_scribespells(Client *c, const Seperator *sep);
void command_sendop(Client *c, const Seperator *sep);
void command_sendzonespawns(Client *c, const Seperator *sep);
void command_sensetrap(Client *c, const Seperator *sep);
void command_serverinfo(Client *c, const Seperator *sep);
void command_serverrules(Client *c, const Seperator *sep);
void command_serversidename(Client *c, const Seperator *sep);
void command_set_adventure_points(Client *c, const Seperator *sep);
void command_setaapts(Client *c, const Seperator *sep);
void command_setaaxp(Client *c, const Seperator *sep);
void command_setanim(Client *c, const Seperator *sep);
void command_setcrystals(Client *c, const Seperator *sep);
void command_setfaction(Client *c, const Seperator *sep);
void command_setgraveyard(Client *c, const Seperator *sep);
void command_setlanguage(Client *c, const Seperator *sep);
void command_setlsinfo(Client *c, const Seperator *sep);
void command_setpass(Client *c, const Seperator *sep);
void command_setpvppoints(Client *c, const Seperator *sep);
void command_setskill(Client *c, const Seperator *sep);
void command_setskillall(Client *c, const Seperator *sep);
void command_setstartzone(Client *c, const Seperator *sep);
void command_setstat(Client *c, const Seperator *sep);
void command_setxp(Client *c, const Seperator *sep);
void command_showbonusstats(Client *c, const Seperator *sep);
void command_showbuffs(Client *c, const Seperator *sep);
void command_shownumhits(Client *c, const Seperator *sep);
void command_showpetspell(Client *c, const Seperator *sep);
void command_showskills(Client *c, const Seperator *sep);
void command_showspellslist(Client *c, const Seperator *sep);
void command_showstats(Client *c, const Seperator *sep);
void command_shutdown(Client *c, const Seperator *sep);
void command_size(Client *c, const Seperator *sep);
void command_spawn(Client *c, const Seperator *sep);
void command_spawnfix(Client *c, const Seperator *sep);
void command_spawnstatus(Client *c, const Seperator *sep);
void command_spellinfo(Client *c, const Seperator *sep);
void command_spoff(Client *c, const Seperator *sep);
void command_spon(Client *c, const Seperator *sep);
void command_stun(Client *c, const Seperator *sep);
void command_summon(Client *c, const Seperator *sep);
void command_summonburiedplayercorpse(Client *c, const Seperator *sep);
void command_summonitem(Client *c, const Seperator *sep);
void command_suspend(Client *c, const Seperator *sep);
void command_synctod(Client *c, const Seperator *sep);
void command_task(Client *c, const Seperator *sep);
void command_tattoo(Client *c, const Seperator *sep);
void command_tempname(Client *c, const Seperator *sep);
void command_testspawn(Client *c, const Seperator *sep);
void command_testspawnkill(Client *c, const Seperator *sep);
void command_texture(Client *c, const Seperator *sep);
void command_time(Client *c, const Seperator *sep);
void command_timers(Client *c, const Seperator *sep);
void command_timezone(Client *c, const Seperator *sep);
void command_title(Client *c, const Seperator *sep);
void command_titlesuffix(Client *c, const Seperator *sep);
void command_traindisc(Client *c, const Seperator *sep);
void command_tune(Client *c, const Seperator *sep);
void command_undye(Client *c, const Seperator *sep);
void command_undyeme(Client *c, const Seperator *sep);
void command_unfreeze(Client *c, const Seperator *sep);
void command_unlock(Client *c, const Seperator *sep);
void command_unscribespell(Client *c, const Seperator *sep);
void command_unscribespells(Client *c, const Seperator *sep);
void command_untraindisc(Client *c, const Seperator *sep);
void command_untraindiscs(Client *c, const Seperator *sep);
void command_uptime(Client *c, const Seperator *sep);
void command_version(Client *c, const Seperator *sep);
void command_viewnpctype(Client *c, const Seperator *sep);
void command_viewpetition(Client *c, const Seperator *sep);
void command_wc(Client *c, const Seperator *sep);
void command_weather(Client *c, const Seperator *sep);
void command_worldshutdown(Client *c, const Seperator *sep);
void command_wp(Client *c, const Seperator *sep);
void command_wpadd(Client *c, const Seperator *sep);
void command_wpinfo(Client *c, const Seperator *sep);
void command_xtargets(Client *c, const Seperator *sep);
void command_zclip(Client *c, const Seperator *sep);
void command_zcolor(Client *c, const Seperator *sep);
void command_zheader(Client *c, const Seperator *sep);
void command_zone(Client *c, const Seperator *sep);
void command_zone_instance(Client *c, const Seperator *sep);
void command_zonebootup(Client *c, const Seperator *sep);
void command_zonelock(Client *c, const Seperator *sep);
void command_zoneshutdown(Client *c, const Seperator *sep);
void command_zonespawn(Client *c, const Seperator *sep);
void command_zonestatus(Client *c, const Seperator *sep);
void command_zopp(Client *c, const Seperator *sep);
void command_zsafecoords(Client *c, const Seperator *sep);
void command_zsave(Client *c, const Seperator *sep);
void command_zsky(Client *c, const Seperator *sep);
void command_zstats(Client *c, const Seperator *sep);
void command_zunderworld(Client *c, const Seperator *sep);
void command_zuwcoords(Client *c, const Seperator *sep);
#ifdef BOTS
#include "bot.h"
@ -350,4 +337,3 @@ void command_bot(Client*c, const Seperator *sep);
#endif
#endif