SA-MP Forums Archive
A Little Help About IRC. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: A Little Help About IRC. (/showthread.php?tid=546550)



A Little Help About IRC. - Adarsh007 - 16.11.2014

Hello Everyone,I want a Little Help about IRC. I am Using IRC on My SAMP Server but Only I Can Chat (Owner / op) on IRC using !say but that Command not works on other member even they registerred and identifyed.

Here is my !say Code -
Код:
IRCCMD:say(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))
		{
			// Echo the formatted message
			new msg[112];
		 	format(msg,sizeof(msg), "(IRC) %s: %s", user, params);
			SendClientMessageToAll(COLOR_LIGHTBLUE, msg);
			format(msg, sizeof(msg),"(IRC) %s: %s", user, params);
			Say(channel,msg);
		}
	}
	return 1;
}
I want that Command for other Members who registerred,not Only for op / Owners.


Re: A Little Help About IRC. - JeaSon - 16.11.2014

i just modified the code now everyone can chat

pawn Код:
IRCCMD:say(botid, channel[], user[], host[], params[])
{
    if (IRC_IsOwner(botid, channel, user))
    {
        if (!isnull(params))
        {
            new msg[128];
            // Echo the formatted message
            format(msg, sizeof(msg), "02***Admin %s on IRC: %s", user, params);
            IRC_GroupSay(groupID, channel, msg);
            format(msg, sizeof(msg), "***Admin %s on IRC: %s", user, params);
            SendClientMessageToAll(0x00CCCCF, msg);
        }
    }

    else if (IRC_IsAdmin(botid, channel, user))
    {
        if (!isnull(params))
        {
            new msg[128];
            // Echo the formatted message
            format(msg, sizeof(msg), "02***Admin %s on IRC: %s", user, params);
            IRC_GroupSay(groupID, channel, msg);
            format(msg, sizeof(msg), "***Admin %s on IRC: %s", user, params);
            SendClientMessageToAll(0x00CCCCF, msg);
        }
    }

    else if (IRC_IsOp(botid, channel, user))
    {
        if (!isnull(params))
        {
            new msg[128];
            // Echo the formatted message
            format(msg, sizeof(msg), "02***Admin %s on IRC: %s", user, params);
            IRC_GroupSay(groupID, channel, msg);
            format(msg, sizeof(msg), "***Admin %s on IRC: %s", user, params);
            SendClientMessageToAll(0x00CCCCF, msg);
        }
    }

    else if (IRC_IsHalfop(botid, channel, user))
    {
        if (!isnull(params))
        {
            new msg[128];
            // Echo the formatted message
            format(msg, sizeof(msg), "02***Admin %s on IRC: %s", user, params);
            IRC_GroupSay(groupID, channel, msg);
            format(msg, sizeof(msg), "***Admin %s on IRC: %s", user, params);
            SendClientMessageToAll(0x00CCCCF, msg);
        }
    }
    // Check if the user has at least voice in the channel
    else 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***Guest %s on IRC: %s", user, params);
            IRC_GroupSay(groupID, channel, msg);
            format(msg, sizeof(msg), "***Guest %s on IRC: %s", user, params);
            SendClientMessageToAll(0x00CCCCF, msg);
        }
    }
            // Check if the user entered any text
    else if (!isnull(params))
    {
            new msg[128];
            // Echo the formatted message
            format(msg, sizeof(msg), "02***Guest %s on IRC: %s", user, params);
            IRC_GroupSay(groupID, channel, msg);
            format(msg, sizeof(msg), "***Guest %s on IRC: %s", user, params);
            SendClientMessageToAll(0x00CCCCF, msg);
    }
    return 1;
}



Re: A Little Help About IRC. - Adarsh007 - 16.11.2014

Thanks ! I will Check it Out later