SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 30/06/2012, 01:11 PM   #1
The_Scope
Huge Clucker
 
The_Scope's Avatar
 
Join Date: Dec 2011
Location: Argentina
Posts: 310
Reputation: 18
Default [HELP] Chat IRC Log send Error

Hello all!

Well, yesterday i connect a IRC Mibbit Chat to my server and was working perfect with the cmds that i added. I leave it on all the night and today at the morning when i come here i enter the chat and i saw that the Bot wasn't online, so i restart my server but nothing happends. So i check the IRC Log and saids this:

Code:
ERROR :Closing Link: [184.22.115.132] Z:Lined (connect pounding)
ERROR :Closing Link: [184.22.115.132] Z:Lined (connect pounding)
ERROR :Closing Link: [184.22.115.132] Z:Lined (connect pounding)
ERROR :Closing Link: [184.22.115.132] Z:Lined (connect pounding)
ERROR :Closing Link: [184.22.115.132] Z:Lined (connect pounding)
ERROR :Closing Link: [184.22.115.132] Z:Lined (connect pounding)
ERROR :Closing Link: [184.22.115.132] Z:Lined (connect pounding)
ERROR :Closing Link: [184.22.115.132] Z:Lined (connect pounding)
ERROR :Closing Link: [184.22.115.132] Z:Lined (connect pounding)
ERROR :Closing Link: [184.22.115.132] Z:Lined (connect pounding)
ERROR :Closing Link: [184.22.115.132] Z:Lined (connect pounding)
ERROR :Closing Link: [184.22.115.132] Z:Lined (connect pounding)
ERROR :Closing Link: [184.22.115.132] Z:Lined (connect pounding)
ERROR :Closing Link: [184.22.115.132] Z:Lined (connect pounding)
ERROR :Closing Link: [184.22.115.132] Z:Lined (connect pounding)
ERROR :Closing Link: [184.22.115.132] Z:Lined (connect pounding)
ERROR :Closing Link: [184.22.115.132] Z:Lined (connect pounding)
ERROR :Closing Link: [184.22.115.132] Z:Lined (connect pounding)
ERROR :Closing Link: [184.22.115.132] Z:Lined (connect pounding)
ERROR :Closing Link: [184.22.115.132] Z:Lined (connect pounding)
ERROR :Closing Link: [184.22.115.132] Z:Lined (connect pounding)
ERROR :Closing Link: [184.22.115.132] Z:Lined (connect pounding)
ERROR :Closing Link: [184.22.115.132] Z:Lined (connect pounding)
ERROR :Closing Link: [184.22.115.132] Z:Lined (connect pounding)
ERROR :Closing Link: [184.22.115.132] Z:Lined (connect pounding)
ERROR :Closing Link: [184.22.115.132] Z:Lined (connect pounding)
ERROR :Closing Link: [184.22.115.132] Z:Lined (connect pounding)
ERROR :Closing Link: [184.22.115.132] Z:Lined (connect pounding)
ERROR :Closing Link: [184.22.115.132] Z:Lined (connect pounding)
I don't understand the error. If someone know how to fix this please help me

I use Incognito IRC Plugin and Mibbit IRC Chat
The_Scope is offline   Reply With Quote
Old 30/06/2012, 03:10 PM   #2
The_Scope
Huge Clucker
 
The_Scope's Avatar
 
Join Date: Dec 2011
Location: Argentina
Posts: 310
Reputation: 18
Default Respuesta: [HELP] Chat IRC Log send Error

33 views and nobody answer . Please if someone know how to fix this don't be vague and answer :P. I need this urgent .. Thanks
The_Scope is offline   Reply With Quote
Old 30/06/2012, 06:56 PM   #3
The_Scope
Huge Clucker
 
The_Scope's Avatar
 
Join Date: Dec 2011
Location: Argentina
Posts: 310
Reputation: 18
Default Respuesta: [HELP] Chat IRC Log send Error

Please I need Help URGENT with this man
The_Scope is offline   Reply With Quote
Old 30/06/2012, 06:57 PM   #4
[A]ndrei
Huge Clucker
 
Join Date: Jun 2012
Location: Sacramento
Posts: 376
Reputation: 21
Default Re: [HELP] Chat IRC Log send Error

wtf man post the filterscript please...
[A]ndrei is offline   Reply With Quote
Old 30/06/2012, 08:51 PM   #5
The_Scope
Huge Clucker
 
The_Scope's Avatar
 
Join Date: Dec 2011
Location: Argentina
Posts: 310
Reputation: 18
Default Respuesta: Re: [HELP] Chat IRC Log send Error

Quote:
Originally Posted by [A]ndrei View Post
wtf man post the filterscript please...
Is the filter script of the Incognito plugin:

pawn Code:
#include <irc>
// sscanf2 include from the sscanf plugin
#include <sscanf2>

// Name that everyone will see
#define BOT_1_NICKNAME "Bot1"
// Name that will only be visible in a whois
#define BOT_1_REALNAME "SA-MP Bot"
// Name that will be in front of the hostname (username@hostname)
#define BOT_1_USERNAME "bot"

#define BOT_2_NICKNAME "Bot1"
#define BOT_2_REALNAME "SA-MP Bot"
#define BOT_2_USERNAME "bot"

#define IRC_SERVER "irc.mibbit.net"
#define IRC_PORT (6667)
#define IRC_CHANNEL "#mundotdm"

// Maximum number of bots in the filterscript
#define MAX_BOTS (2)

#define PLUGIN_VERSION "1.4.2"

new gBotID[MAX_BOTS], gGroupID;

#define COLOR_WHITE             0xFFFFFFAA

/*
    When the filterscript is loaded, two bots will connect and a group will be
    created for them.
*/


public OnFilterScriptInit()
{
    // Connect the first bot
    gBotID[0] = IRC_Connect(IRC_SERVER, IRC_PORT, BOT_1_NICKNAME, BOT_1_REALNAME, BOT_1_USERNAME);
    // Set the connect delay for the first bot to 20 seconds
    IRC_SetIntData(gBotID[0], E_IRC_CONNECT_DELAY, 20);
    // Connect the second bot
    gBotID[1] = IRC_Connect(IRC_SERVER, IRC_PORT, BOT_2_NICKNAME, BOT_2_REALNAME, BOT_2_USERNAME);
    // Set the connect delay for the second bot to 30 seconds
    IRC_SetIntData(gBotID[1], E_IRC_CONNECT_DELAY, 30);
    // Create a group (the bots will be added to it upon connect)
    gGroupID = IRC_CreateGroup();
}

/*
    When the filterscript is unloaded, the bots will disconnect, and the group
    will be destroyed.
*/


public OnFilterScriptExit()
{
    // Disconnect the first bot
    IRC_Quit(gBotID[0], "Filterscript exiting");
    // Disconnect the second bot
    IRC_Quit(gBotID[1], "Filterscript exiting");
    // Destroy the group
    IRC_DestroyGroup(gGroupID);
}

/*
    The standard SA-MP callbacks are below. We will echo a few of them to the
    IRC channel.
*/


public OnPlayerConnect(playerid)
{
    new joinMsg[128], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(joinMsg, sizeof(joinMsg), "02[%d] 03*** %s ha entrado a Mundo TDM.", playerid, name);
    IRC_GroupSay(gGroupID, IRC_CHANNEL, joinMsg);
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    new leaveMsg[128], name[MAX_PLAYER_NAME], reasonMsg[8];
    switch(reason)
    {
        case 0: reasonMsg = "Timeout";
        case 1: reasonMsg = "Leaving";
        case 2: reasonMsg = "Kicked";
    }
    GetPlayerName(playerid, name, sizeof(name));
    format(leaveMsg, sizeof(leaveMsg), "02[%d] 03*** %s ha salido del servidor. (%s)", playerid, name, reasonMsg);
    IRC_GroupSay(gGroupID, IRC_CHANNEL, leaveMsg);
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    new msg[128], killerName[MAX_PLAYER_NAME], reasonMsg[32], playerName[MAX_PLAYER_NAME];
    GetPlayerName(killerid, killerName, sizeof(killerName));
    GetPlayerName(playerid, playerName, sizeof(playerName));
    if (killerid != INVALID_PLAYER_ID)
    {
        switch (reason)
        {
            case 0: reasonMsg = "Unarmed";
            case 1: reasonMsg = "Brass Knuckles";
            case 2: reasonMsg = "Golf Club";
            case 3: reasonMsg = "Night Stick";
            case 4: reasonMsg = "Knife";
            case 5: reasonMsg = "Baseball Bat";
            case 6: reasonMsg = "Shovel";
            case 7: reasonMsg = "Pool Cue";
            case 8: reasonMsg = "Katana";
            case 9: reasonMsg = "Chainsaw";
            case 10: reasonMsg = "Dildo";
            case 11: reasonMsg = "Dildo";
            case 12: reasonMsg = "Vibrator";
            case 13: reasonMsg = "Vibrator";
            case 14: reasonMsg = "Flowers";
            case 15: reasonMsg = "Cane";
            case 22: reasonMsg = "Pistol";
            case 23: reasonMsg = "Silenced Pistol";
            case 24: reasonMsg = "Desert Eagle";
            case 25: reasonMsg = "Shotgun";
            case 26: reasonMsg = "Sawn-off Shotgun";
            case 27: reasonMsg = "Combat Shotgun";
            case 28: reasonMsg = "MAC-10";
            case 29: reasonMsg = "MP5";
            case 30: reasonMsg = "AK-47";
            case 31: reasonMsg = "M4";
            case 32: reasonMsg = "TEC-9";
            case 33: reasonMsg = "Country Rifle";
            case 34: reasonMsg = "Sniper Rifle";
            case 37: reasonMsg = "Fire";
            case 38: reasonMsg = "Minigun";
            case 41: reasonMsg = "Spray Can";
            case 42: reasonMsg = "Fire Extinguisher";
            case 49: reasonMsg = "Vehicle Collision";
            case 50: reasonMsg = "Vehicle Collision";
            case 51: reasonMsg = "Explosion";
            default: reasonMsg = "Unknown";
        }
        format(msg, sizeof(msg), "04*** %s mató a %s. (%s)", killerName, playerName, reasonMsg);
    }
    else
    {
        switch (reason)
        {
            case 53: format(msg, sizeof(msg), "04*** %s murió. (Drowned)", playerName);
            case 54: format(msg, sizeof(msg), "04*** %s murió. (Collision)", playerName);
            default: format(msg, sizeof(msg), "04*** %s murió.", playerName);
        }
    }
    IRC_GroupSay(gGroupID, IRC_CHANNEL, msg);
    return 1;
}

public OnPlayerText(playerid, text[])
{
    new name[MAX_PLAYER_NAME], ircMsg[256];
    GetPlayerName(playerid, name, sizeof(name));
    format(ircMsg, sizeof(ircMsg), "02[%d] 07%s: %s", playerid, name, text);
    IRC_GroupSay(gGroupID, IRC_CHANNEL, ircMsg);
    return 1;
}

/*
    The IRC callbacks are below. Many of these are simply derived from parsed
    raw messages received from the IRC server. They can be used to inform the
    bot of new activity in any of the channels it has joined.
*/


/*
    This callback is executed whenever a bot successfully connects to an IRC
    server.
*/


public IRC_OnConnect(botid, ip[], port)
{
    printf("*** IRC_OnConnect: Bot ID %d conectando a %s:%d", botid, ip, port);
    // Join the channel
    IRC_JoinChannel(botid, IRC_CHANNEL);
    // Add the bot to the group
    IRC_AddToGroup(gGroupID, botid);
    return 1;
}

/*
    This callback is executed whenever a current connection is closed. The
    plugin may automatically attempt to reconnect per user settings. IRC_Quit
    may be called at any time to stop the reconnection process.
*/


public IRC_OnDisconnect(botid, ip[], port, reason[])
{
    printf("*** IRC_OnDisconnect: Bot ID %d desconectando de %s:%d (%s)", botid, ip, port, reason);
    // Remove the bot from the group
    IRC_RemoveFromGroup(gGroupID, botid);
    return 1;
}

/*
    This callback is executed whenever a connection attempt begins. IRC_Quit may
    be called at any time to stop the reconnection process.
*/


public IRC_OnConnectAttempt(botid, ip[], port)
{
    printf("*** IRC_OnConnectAttempt: Bot ID %d intentando conectar a %s:%d...", botid, ip, port);
    return 1;
}

/*
    This callback is executed whenever a connection attempt fails. IRC_Quit may
    be called at any time to stop the reconnection process.
*/


public IRC_OnConnectAttemptFail(botid, ip[], port, reason[])
{
    printf("*** IRC_OnConnectAttemptFail: Bot ID %d intento de conexion fallido a %s:%d (%s)", botid, ip, port, reason);
    return 1;
}

/*
    This callback is executed whenever a bot joins a channel.
*/


public IRC_OnJoinChannel(botid, channel[])
{
    printf("*** IRC_OnJoinChannel: Bot ID %d entro al Canal %s", botid, channel);
    return 1;
}

/*
    This callback is executed whenevever a bot leaves a channel.
*/


public IRC_OnLeaveChannel(botid, channel[], message[])
{
    printf("*** IRC_OnLeaveChannel: Bot ID %d salio del Canal %s (%s)", botid, channel, message);
    IRC_JoinChannel(botid, channel);
    return 1;
}

/*
    This callback is executed whenevever a bot is kicked from a channel. If the
    bot cannot immediately rejoin the channel (in the event, for example, that
    the bot is kicked and then banned), you might want to set up a timer here
    for rejoin attempts.
*/


public IRC_OnKickedFromChannel(botid, channel[], oppeduser[], oppedhost[], message[])
{
    printf("*** IRC_OnKickedFromChannel: Bot ID %d kickeado por %s (%s) from channel %s (%s)", botid, oppeduser, oppedhost, channel, message);
    IRC_JoinChannel(botid, channel);
    return 1;
}

public IRC_OnUserDisconnect(botid, user[], host[], message[])
{
    printf("*** IRC_OnUserDisconnect (Bot ID %d): Usuario %s (%s) desconectado (%s)", botid, user, host, message);
    return 1;
}

public IRC_OnUserJoinChannel(botid, channel[], user[], host[])
{
    printf("*** IRC_OnUserJoinChannel (Bot ID %d): Usuario %s (%s) entro al Canal %s", botid, user, host, channel);
    return 1;
}

public IRC_OnUserLeaveChannel(botid, channel[], user[], host[], message[])
{
    printf("*** IRC_OnUserLeaveChannel (Bot ID %d): Usuario %s (%s) salio del Canal %s (%s)", botid, user, host, channel, message);
    return 1;
}

public IRC_OnUserKickedFromChannel(botid, channel[], kickeduser[], oppeduser[], oppedhost[], message[])
{
    printf("*** IRC_OnUserKickedFromChannel (Bot ID %d): Usuario %s kickeado por %s (%s) del Canal %s (%s)", botid, kickeduser, oppeduser, oppedhost, channel, message);
}

public IRC_OnUserNickChange(botid, oldnick[], newnick[], host[])
{
    printf("*** IRC_OnUserNickChange (Bot ID %d): Usuario %s (%s) cambio su nick a %s", botid, oldnick, host, newnick);
    return 1;
}

public IRC_OnUserSetChannelMode(botid, channel[], user[], host[], mode[])
{
    printf("*** IRC_OnUserSetChannelMode (Bot ID %d): Usuario %s (%s) on %s set mode: %s", botid, user, host, channel, mode);
    return 1;
}

public IRC_OnUserSetChannelTopic(botid, channel[], user[], host[], topic[])
{
    printf("*** IRC_OnUserSetChannelTopic (Bot ID %d): Usuario %s (%s) on %s set topic: %s", botid, user, host, channel, topic);
    return 1;
}

public IRC_OnUserSay(botid, recipient[], user[], host[], message[])
{
    printf("*** IRC_OnUserSay (Bot ID %d): Usuario %s (%s) mensaje enviado a %s: %s", botid, user, host, recipient, message);
    // Someone sent the first bot a private message
    if (!strcmp(recipient, BOT_1_NICKNAME))
    {
        IRC_Say(botid, user, "Me has enviado un MP!");
    }
    return 1;
}

public IRC_OnUserNotice(botid, recipient[], user[], host[], message[])
{
    printf("*** IRC_OnUserNotice (Bot ID %d): Usuario %s (%s) envio una noticia a %s: %s", botid, user, host, recipient, message);
    // Someone sent the second bot a notice (probably a network service)
    if (!strcmp(recipient, BOT_2_NICKNAME))
    {
        IRC_Notice(botid, user, "You sent me a notice!");
    }
    return 1;
}

public IRC_OnUserRequestCTCP(botid, user[], host[], message[])
{
    printf("*** IRC_OnUserRequestCTCP (Bot ID %d): Usuario %s (%s) sent CTCP request: %s", botid, user, host, message);
    // Someone sent a CTCP VERSION request
    if (!strcmp(message, "VERSION"))
    {
        IRC_ReplyCTCP(botid, user, "VERSION SA-MP IRC Plugin v" #PLUGIN_VERSION "");
    }
    return 1;
}

public IRC_OnUserReplyCTCP(botid, user[], host[], message[])
{
    printf("*** IRC_OnUserReplyCTCP (Bot ID %d): Usuario %s (%s) sent CTCP reply: %s", botid, user, host, message);
    return 1;
}

/*
    This callback is useful for logging, debugging, or catching error messages
    sent by the IRC server.
*/


public IRC_OnReceiveRaw(botid, message[])
{
    new File:file;
    if (!fexist("irc_log.txt"))
    {
        file = fopen("irc_log.txt", io_write);
    }
    else
    {
        file = fopen("irc_log.txt", io_append);
    }
    if (file)
    {
        fwrite(file, message);
        fwrite(file, "\r\n");
        fclose(file);
    }
    return 1;
}

/*
    Some examples of channel commands are here. You can add more very easily;
    their implementation is identical to that of ZeeX's zcmd.
*/


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))
        {
            new msg[128];
            // Echo the formatted message
            format(msg, sizeof(msg), "02*** %s en Chat IRC: %s", user, params);
            IRC_GroupSay(gGroupID, channel, msg);
            format(msg, sizeof(msg), "*** %s en Chat IRC: %s", user, params);
            SendClientMessageToAll(0x0000FFFF, msg);
        }
    }
    return 1;
}

IRCCMD:kick(botid, channel[], user[], host[], params[])
{
    // Check if the user is at least a halfop in the channel
    if (IRC_IsHalfop(botid, channel, user))
    {
        new playerid, reason[64];
        // Check if the user at least entered a player ID
        if (sscanf(params, "dS(Sin Razon)[64]", playerid, reason))
        {
            return 1;
        }
        // Check if the player is connected
        if (IsPlayerConnected(playerid))
        {
            // Echo the formatted message
            new msg[128], name[MAX_PLAYER_NAME];
            GetPlayerName(playerid, name, sizeof(name));
            format(msg, sizeof(msg), "02*** %s ha sido kickeado por %s en el Chat IRC. (%s)", name, user, reason);
            IRC_GroupSay(gGroupID, channel, msg);
            format(msg, sizeof(msg), "*** %s ha sido kickeado por %s en el Chat IRC. (%s)", name, user, reason);
            SendClientMessageToAll(COLOR_WHITE, msg);
            // Kick the player
            Kick(playerid);
        }
    }
    return 1;
}

IRCCMD:ban(botid, channel[], user[], host[], params[])
{
    // Check if the user is at least an op in the channel
    if (IRC_IsOp(botid, channel, user))
    {
        new playerid, reason[64];
        // Check if the user at least entered a player ID
        if (sscanf(params, "dS(Sin Razon)[64]", playerid, reason))
        {
            return 1;
        }
        // Check if the player is connected
        if (IsPlayerConnected(playerid))
        {
            // Echo the formatted message
            new msg[128], name[MAX_PLAYER_NAME];
            GetPlayerName(playerid, name, sizeof(name));
            format(msg, sizeof(msg), "02*** %s ha sido baneado por %s en el Chat IRC. (%s)", name, user, reason);
            IRC_GroupSay(gGroupID, channel, msg);
            format(msg, sizeof(msg), "*** %s ha sido baneado por %s en el Chat IRC. (%s)", name, user, reason);
            SendClientMessageToAll(0x0000FFFF, msg);
            // Ban the player
            BanEx(playerid, reason);
        }
    }
    return 1;
}

IRCCMD:rcon(botid, channel[], user[], host[], params[])
{
    // Check if the user is at least an op in the channel
    if (IRC_IsOp(botid, channel, user))
    {
        // Check if the user entered any text
        if (!isnull(params))
        {
            // Check if the user did not enter any invalid commands
            if (strcmp(params, "exit", true) != 0 && strfind(params, "loadfs irc", true) == -1)
            {
                // Echo the formatted message
                new msg[128];
                format(msg, sizeof(msg), "RCON command %s has been executed.", params);
                IRC_GroupSay(gGroupID, channel, msg);
                // Send the command
                SendRconCommand(params);
            }
        }
    }
    return 1;
}
The_Scope is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hey, Undefined Simbol, send chat patchkinson Help Archive 5 26/11/2009 09:19 PM
GTA SA + VISTA == Don't Send Error [SLOVED] roleplayman Client Support 3 18/09/2009 10:49 AM
[Error] In chat error codes [mad]MLK Help Archive 7 04/09/2009 08:15 PM


All times are GMT. The time now is 11:51 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.