SA-MP Forums Archive
IRC problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: IRC problem (/showthread.php?tid=283299)



IRC problem - [WoF]Sonny - 14.09.2011

Hi all, I just installed incognitos irc on my server, bots are connected, but if somebody connects on channel there is no message at join or for example cmd "say" wont work. Did I forget something??!


Re: IRC problem - Kingunit - 14.09.2011

Show us some code. We can't do much right now.


Re: IRC problem - [WoF]Sonny - 14.09.2011

Quote:

IRCCMDay(botid, channel[], user[], host[], params[])
{
// Check if the user has at least voice in the channel
if (IRC_IsVoice(botid, channel, user))
{
// Check if the user entered any text
if (!isnull(params))
{
new msg[128];
// Echo the formatted message
format(msg, sizeof(msg), "02*** %s on IRC: %s", user, params);
IRC_GroupSay(gGroupID, channel, msg);
format(msg, sizeof(msg), "*** %s on IRC: %s", user, params);
SendClientMessageToAll(0x0000FFFF, msg);
}
}
return 1;
}

This example cmd wont work


Re: IRC problem - Kingunit - 14.09.2011

Try this as join message under OnPlayerConnect:
pawn Код:
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(gGroupID, IRC_CHANNEL, joinMsg);



Re: IRC problem - Baboon - 14.09.2011

First check whether the bots are connected -_-


Re: IRC problem - [WoF]Sonny - 14.09.2011

Quote:
Originally Posted by Kingunit
Посмотреть сообщение
Try this as join message under OnPlayerConnect:
pawn Код:
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(gGroupID, IRC_CHANNEL, joinMsg);
This works and I already have that, problem is, the server dont send that msg to ingame players


Re: IRC problem - Kingunit - 14.09.2011

Quote:
Originally Posted by [WoF]Sonny
Посмотреть сообщение
This works and I already have that, problem is, the server dont send that msg to ingame players
If that works - then the plugin is installed correct. Hmm try this exactly, since it's works on my server:
pawn Код:
IRCCMD:say(botid, channel[], user[], host[], params[])
{
    if (IRC_IsVoice(botid, channel, user))
    {
        if (!isnull(params))
        {
            new msg[128];
            format(msg, sizeof(msg), "02*** %s on IRC: %s", user, params);
            IRC_GroupSay(gGroupID, channel, msg);
            format(msg, sizeof(msg), "*** %s on IRC: %s", user, params);
            SendClientMessageToAll(0x0000FFFF, msg);
        }
    }
    return 1;
}



Re: IRC problem - [WoF]Sonny - 14.09.2011

Quote:
Originally Posted by Kingunit
Посмотреть сообщение
If that works - then the plugin is installed correct. Hmm try this exactly, since it's works on my server:
pawn Код:
IRCCMD:say(botid, channel[], user[], host[], params[])
{
    if (IRC_IsVoice(botid, channel, user))
    {
        if (!isnull(params))
        {
            new msg[128];
            format(msg, sizeof(msg), "02*** %s on IRC: %s", user, params);
            IRC_GroupSay(gGroupID, channel, msg);
            format(msg, sizeof(msg), "*** %s on IRC: %s", user, params);
            SendClientMessageToAll(0x0000FFFF, msg);
        }
    }
    return 1;
}
I have the same code, this is the problem