29.11.2009, 19:36
My Irc connection wont join channel when the filterscript is loaded for some reason, here is the script with all the bits unneeded erased:
This is what appears in the console when i load the filterscript..
Anyone know what would be stopping it? Thanks in advance.
Код:
#include <a_samp> #include <a_irc> new Connections = 0; new EchoConnection; //This will hold the connection ID for messages. new EchoServer[23] = "irc.st0rm.net"; //Server to connect to new EchoNick[23] = "GTA2"; //Nickname for the bot new EchoChan[23] = "#The-Hangout"; //Public irc channel new EchoChana[23] = "#GTA-admin"; // Admin irc channel new bool:TimerSet = false; // Prevents the timer from being set multiple times. forward EventTimer(); // Forward declaration for Event Timer (explained later) public EventTimer() { TimerSet = true; ircPollEvents(); } public OnFilterScriptInit() { print("\n--------------------------------------"); print("St0rmNet Freeroam Main Coding Loaded."); print("--------------------------------------\n"); EchoConnection = ircConnect(EchoServer,6667,EchoNick); //Server and nickname are now altered at top of config. return 1; } public ircOnConnect(conn) { if (!TimerSet) SetTimer("EventTimer", 500, 1); // listen for callbacks from this channel Connections++; // save number of connections new string[256]; format(string, 100, "[[NOTE]] Successfully Connected To: %s", EchoServer); printf("%s",string); ircSendRawData(EchoConnection , "join #gta2"); return 1; } public OnFilterScriptExit() { ircDisconnect(EchoConnection); return 1; }
Код:
*** Connecting to irc.st0rm.net:6667... <connection #1> *** IRC socket 1 established. [[NOTE]] Succesfully connected to: irc.st0rm.net Filterscript 'main.amx' loaded. *** MODE :You have not registered *** GTA2 :MOTD File is missing