Today I will present you a small blockade to the " do_disconnect " function .
It depends on the fact that we can not throw GM out of the game, so I think it is quite useful
1. Open cmd_gm.cpp (You will find it in the Source Game).
2. You are looking for and replacing this function:
3. Open locale_string.txt , and then add to it:
p.s2. You will find it in server files.
p.s3. You can also use the same "tch-> IsGM" function to block kill, stun, etc.
It depends on the fact that we can not throw GM out of the game, so I think it is quite useful
1. Open cmd_gm.cpp (You will find it in the Source Game).
2. You are looking for and replacing this function:
Code:
ACMD(do_disconnect)
{
char arg1[256];
one_argument(argument, arg1, sizeof(arg1));
if (!*arg1)
{
ch->ChatPacket(CHAT_TYPE_INFO, "ex) /dc <player name>");
return;
}
LPDESC d = DESC_MANAGER::instance().FindByCharacterName(arg1);
LPCHARACTER tch = d ? d->GetCharacter() : NULL;
if (!tch)
{
ch->ChatPacket(CHAT_TYPE_INFO, "%s: no such a player.", arg1);
return;
}
if (tch == ch)
{
ch->ChatPacket(CHAT_TYPE_INFO, "cannot disconnect myself");
return;
}
if (tch->IsGM())
{
ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Blokada_Disconnect_GM"));
return;
}
DESC_MANAGER::instance().DestroyDesc(d);
}
Code:
"Blokada_Disconnect_GM";
"You can not get an administrator out of the game!";
p.s3. You can also use the same "tch-> IsGM" function to block kill, stun, etc.