Echo pm to irc
#1

This is what i have, it echos the pm's but its displayed to everyone in the channel.

How can i fix thgis to only display the private messages to @ & % ~

pawn Код:
public OnPlayerPrivmsg(playerid, recieverid, text[])
{
    if(pm == true)
    {
        new ircLevel[4];
        new userslist[128];
        new pmstr[128];
        ircGetUserList(RandomBot(), ECHOCHAN, userslist, sizeof(userslist));
        ircGetUserLevel(RandomBot(), ECHOCHAN, userslist, ircLevel);
        if(!strcmp(ircLevel, "~", true,1) || !strcmp(ircLevel, "&", true,1) || !strcmp(ircLevel, "@", true,1) || !strcmp(ircLevel, "%", true,1)) return true;
    format(pmstr,128,"5PM from %s (ID:%d) to %s (ID:%d):12 %s",PlayerName(playerid),playerid,PlayerName(recieverid),recieverid,text);
        explain(pmstr);
    }
    return true;
}
Reply


Messages In This Thread
Echo pm to irc - by Outbreak - 22.02.2009, 18:20

Forum Jump:


Users browsing this thread: 1 Guest(s)