• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

To allow only gms to use gm commands via gmtool

Newbie Spellweaver
Joined
Apr 16, 2012
Messages
28
Reaction score
4
Go to mapserver src and Menuserver.cpp
go to the commands for example changing scenario time:

void RecvChangeScenarioTime( t_packet *p, short int cn )
{ //< CSD-030306
CHARLIST* ch = CheckServerId( cn );
if( !ch ) return;
if( !ch->IsCounselor() ) return; <------ Only allows GM to use this command

if( cn == CN_FROM_OTHER_MAPSERVER_MSG )
{
if (!g_pDungeonMgr)
{
return;
}

CDungeonBasic* pTemp = g_pDungeonMgr->GetDungeon(p->u.kein.scenario_time_change.idDungeon);

if (pTemp == NULL)
{
return;
}

pTemp->SetStartUpInfo(p->u.kein.scenario_time_change.idStartUp,
p->u.kein.scenario_time_change.nApplyDay,
p->u.kein.scenario_time_change.nStartHour,
p->u.kein.scenario_time_change.nStartMinute,
p->u.kein.scenario_time_change.nEndHour,
p->u.kein.scenario_time_change.nEndMinute);
}
else
{
if( g_pDungeonMgr )
{
RecvChangeScenarioTime( p, CN_FROM_OTHER_MAPSERVER_MSG );
}
else
{
SendPacket2Map( p, MN_SCENARIO_MAP);
}
}
} //> CSD-030306
 
Back
Top