[Plugin] IRC Plugin

Not Working Patrik ....
Reply

do i have to add more bots? (i currently have 2)
Reply

mike,
Quote:
Originally Posted by [KSF
Mike]
how to chat ingame with this plugin??
http://forum.sa-mp.com/showpost.php?...&postcount=469



Quote:
Originally Posted by Incognito
View Post
Unknown1234: Maybe I'll add a function that allows you to loop through the user list. Admittedly, a space-delimited list isn't very useful, but you can always parse the list yourself and add the names to an array in your script for now.
okkay, i am looking forward for it. i got it worked some how.
Reply

Recently my players have discovered you can embed colours in your irc username or message and it will affect the colours in the server when using irc commands.

Sa-mp filters out this when players try it ingame. For now I will just script something, but maybe you could support this in future?
Reply

To people that don't want to edit their include for this:
pawn Code:
#undef COMMAND_PREFIX
#define COMMAND_PREFIX '!'
And why are there weird characters in this?
Code:
format(string, sizeof(string), "02[%d] 03*** %s has joined the server.", playerid, name);
t02 t03

Its kinda annoying, i'm going to try without the characters..
Reply

I would guess that those characters are IRC control codes, used for color, bold, underline etc.
Reply

How to give someone AUTOMATICLY voice when he joins the channel?
Reply

Do not work lol i cant start my server when i have cops and robbers..... lol before i download IRC i get IRC error......... now when i download this and start server all work only it give me this : Unable to load filterscript irc.amx : also you dont have irc.amx you only put in irc.pnx plz put it in and put the link again to download!!!!!!!!!!!!!
Reply

Can you help me read the other message plz ?
Reply

This code doens't work:
pawn Код:
//-----------------------------------[Ask]-----------------------------------------------
CMD:ask(playerid, params[])
    {
        {
        new string[128], reason[64], msg[64];
        if(sscanf(params, "z", reason)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_DGREY"[CMD] / "#COL_SGREY"[Question]");
        else
        {
        SendClientMessage(playerid, COLOR_WHITE, ""#COL_ORANGE"[SERVER]"#COL_LRED" Your message has been send to all online administrators.");
        new pName[24];
        GetPlayerRame(playerid, pName, 128);
        for (new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                format(string, sizeof(string), ""#COL_BROWN"[ASK]"#COL_EASY" %s: %s ", pName, reason);
                IRC_GroupSay(gGroupID, msg, string);
               
                format(string, sizeof(string), ""#COL_BROWN"[ASK]"#COL_EASY" %s: %s ", pName, reason);
                SendMessageToAdmins(COLOR_RED, string);
                   
            }
        }
        }
        }
        return 1;
    }
Reply

Quote:
Originally Posted by Kingunit
Посмотреть сообщение
This code doens't work:
pawn Код:
IRC_GroupSay(gGroupID, [b]msg[/b], string);
change that to a channel or user, + msg is empty.
Reply

Also, IRC protocol does not accept RGB colors!
Reply

I have Problem with IRC_OnUserNickChange That message not show on ingame
All correct

pawn Код:
format(msg2, 144, "{F2AF11}%s {FFFFFF}Changed Nick To {F2AF11}%s.", oldnick, newnick);
    SendClientMessageToAll(0xFF000DFF, msg2);
Reply

When i am trying to complie my GM with IRC i am gettin 26 errors:

Код:
pawno\include\irc.inc(38) : error 010: invalid function or declaration
pawno\include\irc.inc(38) : error 001: expected token: ";", but found "["
pawno\include\irc.inc(40) : error 010: invalid function or declaration
pawno\include\irc.inc(40) : error 001: expected token: ";", but found "["
pawno\include\irc.inc(43) : error 010: invalid function or declaration
pawno\include\irc.inc(43) : error 001: expected token: ";", but found "["
pawno\include\irc.inc(44) : error 010: invalid function or declaration
pawno\include\irc.inc(44) : error 001: expected token: ";", but found "["
pawno\include\irc.inc(47) : error 010: invalid function or declaration
pawno\include\irc.inc(47) : error 001: expected token: ";", but found "["
pawno\include\irc.inc(51) : error 010: invalid function or declaration
pawno\include\irc.inc(51) : error 001: expected token: ";", but found "["
pawno\include\irc.inc(52) : error 010: invalid function or declaration
pawno\include\irc.inc(52) : error 001: expected token: ";", but found "["
pawno\include\irc.inc(53) : error 010: invalid function or declaration
pawno\include\irc.inc(53) : error 001: expected token: ";", but found "["
pawno\include\irc.inc(58) : error 010: invalid function or declaration
pawno\include\irc.inc(58) : error 001: expected token: ";", but found "["
pawno\include\irc.inc(59) : error 010: invalid function or declaration
pawno\include\irc.inc(59) : error 001: expected token: ";", but found "["
pawno\include\irc.inc(69) : error 010: invalid function or declaration
pawno\include\irc.inc(69) : error 001: expected token: ";", but found "["
pawno\include\irc.inc(70) : error 010: invalid function or declaration
pawno\include\irc.inc(70) : error 001: expected token: ";", but found "["
pawno\include\irc.inc(71) : error 010: invalid function or declaration
pawno\include\irc.inc(71) : error 001: expected token: ";", but found "["

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.
Help me please
Reply

edit: i have a problem lol, the first bot never connect ?! the 2d one does
Reply

I have a big issue that started occuring randomly after updating to the newest version of the plugin.

Every now and then, this randomly gets spammed in my owner echo channel:
Quote:

[16:49] <12~YosBot3> 3Bot ID 165 Attempting To Reconnect...
[16:49] <12~YosBot1> 3Bot ID 234 Attempting To Reconnect...
[16:49] <12~YosBot2> 3Bot ID 322 Disconnected.
[16:49] <12~YosBot3> 3Bot ID 145 Disconnected.
[16:49] <12~YosBot1> 3Bot ID 378 Disconnected.
[16:49] <12~YosBot2> 3Bot ID 632 Attempting To Reconnect...
[16:49] <12~YosBot3> 3Bot ID 102 Attempting To Reconnect...
[16:49] <12~YosBot1> 3Bot ID 319 Attempting To Reconnect...
[16:49] <12~YosBot2> 3Bot ID 368 Disconnected.
[16:49] <12~YosBot3> 3Bot ID 48 Disconnected.
[16:49] <12~YosBot1> 3Bot ID 109 Disconnected.
[16:49] <12~YosBot2> 3Bot ID 185 Attempting To Reconnect...
[16:49] <12~YosBot3> 3Bot ID 356 Attempting To Reconnect...
[16:49] <12~YosBot1> 3Bot ID 28 Attempting To Reconnect...
[16:49] <12~YosBot2> 3Bot ID 478 Disconnected.

But according to Popz, there are no more than five bots connecting. So this means that IRC_OnDisconnect returns the wrong botids.

Code:

pawn Код:
public OnGameModeInit()
{
    if(IsCorrectServer())
    {
        SetTimerEx("IRC_ConnectDelay", 5000, 0, "d", 1);
        SetTimerEx("IRC_ConnectDelay", 7000, 0, "d", 2);
        SetTimerEx("IRC_ConnectDelay", 9000, 0, "d", 3);
        SetTimerEx("IRC_ConnectDelay", 11000, 0, "d", 4);
        SetTimerEx("IRC_ConnectDelay", 13000, 0, "d", 5);
        gGroupID = IRC_CreateGroup();
    }
}
pawn Код:
stock IsCorrectServer()
{
    if(!strcmp(ReturnServerStringVar("bind"), SERVER_IP, false) && GetServerVarAsInt("port") == SERVER_PORT) return 1;
    else return 0;
}
pawn Код:
function IRC_ConnectDelay(tempid)
{
    if(IsCorrectServer())
    {
        switch(tempid)
        {
            case 1: gBotID[0] = IRC_Connect(IRC_SERVER, IRC_PORT, BOT_1_NICKNAME, BOT_1_REALNAME, BOT_1_USERNAME);
            case 2: gBotID[1] = IRC_Connect(IRC_SERVER, IRC_PORT, BOT_2_NICKNAME, BOT_2_REALNAME, BOT_2_USERNAME);
            case 3: gBotID[2] = IRC_Connect(IRC_SERVER, IRC_PORT, BOT_3_NICKNAME, BOT_3_REALNAME, BOT_3_USERNAME);
            case 4: gBotID[3] = IRC_Connect(IRC_SERVER, IRC_PORT, BOT_4_NICKNAME, BOT_4_REALNAME, BOT_4_USERNAME);
            case 5: gBotID[4] = IRC_Connect(IRC_SERVER, IRC_PORT, BOT_5_NICKNAME, BOT_5_REALNAME, BOT_5_USERNAME);
        }
    }
    return 1;
}
pawn Код:
public IRC_OnConnect(botid)
{
    if(IsCorrectServer())
    {
        new string[150];
        format(string, sizeof(string), "Bot ID %d Connected.", botid);
        SendOwnerMessageToIRC(string);
        format(string, sizeof(string), "IDENTIFY %s", BOT_PASSWORD);
        IRC_SendRaw(botid, string);
        format(string, sizeof(string), "Bot ID %d Identified.", botid);
        SendOwnerMessageToIRC(string);
        IRC_JoinChannel(botid, IRC_CHANNEL);
        IRC_JoinChannel(botid, IRC_NORMALCHANNEL);
        IRC_JoinChannel(botid, IRC_NORMALADMINCHANNEL);
        IRC_JoinChannel(botid, IRC_NORMALOWNERCHANNEL);
        IRC_JoinChannel(botid, IRC_ADMINCHANNEL);
        IRC_JoinChannel(botid, IRC_LOGCHANNEL);
        IRC_JoinChannel(botid, IRC_COMMANDSCHANNEL);
        IRC_JoinChannel(botid, IRC_OWNERCHANNEL);
        IRC_JoinChannel(botid, "#yoshi");
        IRC_AddToGroup(gGroupID, botid);
        if(botid == gBotID[0]) format(BotName[0], 10, BOT_1_NICKNAME);
        if(botid == gBotID[1]) format(BotName[1], 10, BOT_2_NICKNAME);
        if(botid == gBotID[2]) format(BotName[2], 10, BOT_3_NICKNAME);
        if(botid == gBotID[3]) format(BotName[3], 10, BOT_4_NICKNAME);
        if(botid == gBotID[4]) format(BotName[4], 10, BOT_5_NICKNAME);
    }
    return 1;
}

pawn Код:
public IRC_OnDisconnect(botid) // Code that causes the spam messages.
{
    if(IsCorrectServer())
    {
        new string[150];
        format(string, sizeof(string), "Bot ID %d Disconnected.", botid);
        SendOwnerMessageToIRC(string);
        if(botid == gBotID[0])
        {
            gBotID[0] = 0;
            SetTimerEx("IRC_ConnectDelay", 8000, 0, "d", 1);
        }
        else if(botid == gBotID[1])
        {
            gBotID[1] = 0;
            SetTimerEx("IRC_ConnectDelay", 10000, 0, "d", 2);
        }
        else if(botid == gBotID[2])
        {
            gBotID[2] = 0;
            SetTimerEx("IRC_ConnectDelay", 15000, 0, "d", 3);
        }
        else if(botid == gBotID[3])
        {
            gBotID[3] = 0;
            SetTimerEx("IRC_ConnectDelay", 20000, 0, "d", 4);
        }
        else if(botid == gBotID[4])
        {
            gBotID[4] = 0;
            SetTimerEx("IRC_ConnectDelay", 25000, 0, "d", 5);
        }
        format(string, sizeof(string), "Bot ID %d Attempting To Reconnect...", botid);
        SendOwnerMessageToIRC(string);
        IRC_RemoveFromGroup(gGroupID, botid);
    }
    return 1;
}
Why is this happening? This code has been the same for over a year now and this never happend before the latest update.
Reply

maybe you are banned irc network not allow 5 user in same ip
Reply

is there a way to block the commands with a ! infrom in mibbit?

like if i do !fakechat 0 hi then other in mibbit see i type it, i only want it to show to me

and if i ban somoene, how to unban eheh, thanks
Reply

Quote:
Originally Posted by Venice
Посмотреть сообщение
maybe you are banned irc network not allow 5 user in same ip
nope. I already have a session limit increasement, this is definitely a v1.4.2 issue.

EDIT: the bots also keep randomly reconnecting with Client exited as reason...
Reply

~Yoshi, bots automatically try to reconnect as of the latest version, so you don't need to put all of that code under IRC_OnDisconnect anymore. I would recommend taking a look at the example filterscript to see what other changes you need to make as well.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)