PDA

View Full Version : Need a help with IRC OnPlayerConnect.


Ercha
06/03/2014, 03:38 PM
Hello.

So i've added IRC for my server as a FS and tested it with Mirc, everything seem to work fine. But in IRC, it doesn't shows the message when a player connects to the server. It does shows the message when he leaves the server in-game, but when he connects. I'm not quite sure where could be a problem, i'll paste the OnPlayerConnect info from my gamemode and the same thing from IRC fs.


@IRC

public OnPlayerConnect(playerid)
{
new joinMsg[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(joinMsg, sizeof(joinMsg), "02[%d] 03*** %s has joined the server.", playerid, name);
IRC_GroupSay(groupID, IRC_CHANNEL, joinMsg);
return 1;
}


@GM (Here when a player joins the server, it shows his ip also. I've copied only the info when player joins)

new c2string[128], playerip[16];
GetPlayerIp(playerid, playerip, sizeof(playerip));
format(c2string, sizeof(c2string), ""chat" "COL_RED"[SERVER] "COL_WHITE"Player %s[%d] has joined the server! "COL_RED" (IP: %s)", PlayerName(playerid), playerid, playerip);
SendMessageToAllAdmins(c2string, -1);


First experience with IRC, if you know how fix the problem, please response. Thanks in advance!