Esempio n. 1
0
void Channel::Password(uint64 p, const char *pass)
{
    uint32 sec = 0;
    Player *plr = objmgr.GetPlayer(p);
    if(plr)
        sec = plr->GetSession()->GetSecurity();

    if(!IsOn(p))
    {
        WorldPacket data;
        MakeNotOn(&data);
        SendToOne(&data,p);
    }
    else if(!players[p].moderator && sec < SEC_GAMEMASTER)
    {
        WorldPacket data;
        MakeNotModerator(&data);
        SendToOne(&data,p);
    }
    else
    {
        password = pass;

        WorldPacket data;
        MakeSetPassword(&data,p);
        SendToAll(&data);
    }
}
Esempio n. 2
0
void Channel::Password(Player *p, const char *pass)
{
	WorldPacket data;
	if(!IsOn(p))
	{
		MakeNotOn(&data);
		SendToOne(&data,p);
	}
	else if(!players[p].moderator && p->GetSession()->GetSecurity() < 2)
	{
		MakeNotModerator(&data);
		SendToOne(&data,p);
	}
	else
	{
		password = pass;
		MakeSetPassword(&data,p);
		SendToAll(&data);
	}
}