A Little Help About IRC.
#1

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.
Reply
#2

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;
}
Reply
#3

Thanks ! I will Check it Out later
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)