Reloac
BETA Tester
Hey
I've been trying for the last hour or so, to make the kick command show who was kicked, by who and the reason to world, i can make 2 of the 3 show, im just having problems when it comes to showing the persons name who kicked the player, I'm pretty new to CTM Cores, recently moved from TC 3.3.5 to Skyfire 4.0, had to re-edit the kick command, however decided to edit it...
What i currently have :
What Im trying to make it do :
Been trying all ways, but their just showing errors on me...
Any help would be appreciated.
I've been trying for the last hour or so, to make the kick command show who was kicked, by who and the reason to world, i can make 2 of the 3 show, im just having problems when it comes to showing the persons name who kicked the player, I'm pretty new to CTM Cores, recently moved from TC 3.3.5 to Skyfire 4.0, had to re-edit the kick command, however decided to edit it...
What i currently have :
Code:
//kick player
bool ChatHandler::HandleKickPlayerCommand(const char *args)
{
Player* target = NULL;
std::string playerName;
std::string playerName;
if (!extractPlayerTarget((char*)args, &target, NULL, &playerName))
return false;
// check online security
if (HasLowerSecurity(target, 0))
return false;
char const* kickReason = strtok(NULL, "\r");
std::string kickReasonStr = "No reason";
if (kickReason != NULL)
kickReasonStr = kickReason;
if (sWorld->getBoolConfig(CONFIG_SHOW_KICK_IN_WORLD))
/*sWorld->SendWorldText(LANGUAGE_COMMAND_KICKMESSAGE, playerName.c_str());*/
sWorld->SendWorldText(LANGUAGE_COMMAND_KICKMESSAGE, playerName.c_str(), kickReasonStr.c_str());
else
PSendSysMessage(LANGUAGE_COMMAND_KICKMESSAGE, playerName.c_str());
target->GetSession()->KickPlayer();
return true;
}
What Im trying to make it do :
Code:
sWorld->SendWorldText(LANGUAGE_COMMAND_KICKMESSAGE, playerName.c_str(), Personwhokickedplayer, kickReasonStr.c_str());
so that it would output :
"%s has been kicked from the server by %s. Reason : %s"
Been trying all ways, but their just showing errors on me...
Any help would be appreciated.