Hello all.
At my server I need give GMs some administrators chat commands. For example:
.gm fly
.npc info
.additem
.ban
.unban
At first I modify Chat.cpp: (it's just a part of the patch)
***************
*** 82,106 ****
static ChatCommand banCommandTable[] =
{
! { "account", SEC_ADMINISTRATOR, true, &ChatHandler::HandleBanAccountCommand, "", NULL },
! { "character", SEC_ADMINISTRATOR, true, &ChatHandler::HandleBanCharacterCommand, "", NULL },
! { "ip", SEC_ADMINISTRATOR, true, &ChatHandler::HandleBanIPCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand baninfoCommandTable[] =
{
! { "account", SEC_ADMINISTRATOR, true, &ChatHandler::HandleBanInfoAccountCommand, "", NULL },
! { "character", SEC_ADMINISTRATOR, true, &ChatHandler::HandleBanInfoCharacterCommand, "", NULL },
! { "ip", SEC_ADMINISTRATOR, true, &ChatHandler::HandleBanInfoIPCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand banlistCommandTable[] =
{
! { "account", SEC_ADMINISTRATOR, true, &ChatHandler::HandleBanListAccountCommand, "", NULL },
! { "character", SEC_ADMINISTRATOR, true, &ChatHandler::HandleBanListCharacterCommand, "", NULL },
! { "ip", SEC_ADMINISTRATOR, true, &ChatHandler::HandleBanListIPCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
--- 82,106 ----
static ChatCommand banCommandTable[] =
{
! { "account", SEC_GAMEMASTER, true, &ChatHandler::HandleBanAccountCommand, "", NULL },
! { "character", SEC_GAMEMASTER, true, &ChatHandler::HandleBanCharacterCommand, "", NULL },
! { "ip", SEC_GAMEMASTER, true, &ChatHandler::HandleBanIPCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand baninfoCommandTable[] =
{
! { "account", SEC_GAMEMASTER, true, &ChatHandler::HandleBanInfoAccountCommand, "", NULL },
! { "character", SEC_GAMEMASTER, true, &ChatHandler::HandleBanInfoCharacterCommand, "", NULL },
! { "ip", SEC_GAMEMASTER, true, &ChatHandler::HandleBanInfoIPCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand banlistCommandTable[] =
{
! { "account", SEC_GAMEMASTER, true, &ChatHandler::HandleBanListAccountCommand, "", NULL },
! { "character", SEC_GAMEMASTER, true, &ChatHandler::HandleBanListCharacterCommand, "", NULL },
! { "ip", SEC_GAMEMASTER, true, &ChatHandler::HandleBanListIPCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
And recompile MaNGOS but this commands don't work.
Next I try to move some functions like ChatHandler::HandleBanAccountCommand, ChatHandler::HandleBanCharacterCommand and ChatHandler::HandleBanIPCommand from Level3.cpp to Level2.cpp and recompile. But my GMs still have not this commands. What I do wrong?
P.S. Sorry for my bad English.