Need Help about IRC

Started by CZ, Jul 23, 2015, 02:16 PM

Previous topic - Next topic

CZ

Hi I just want to know about the IRC, so how can i create a channel and set a bot then connect to LUNet?

Mashreq

First of all you need to register in LUNET for that purpose you need to use /ns register <password> <email>. Once you have done with it then you shall move to your channel by typing /join #yourchannelname. If you have joined (it must be a non-registered channel inorder to register, if you have @ in front of your channel that means you are free to register that channel). When you have seen that you got @ infront of your name, then you can register that channel by typing /cs register #yourchannelname.

Afterall, you can download a IRC script there's plenty snippets around the forum you can download them and keep them in your script and let load by giving LUNET IP and your channel name as well as a bot name for it.

jayant

#2
To create your channel in any IRC server [ LUNet ] -

1 ) Connect to the IRC server via IRC client like mirc or xchat  etc. [ Address - irc.liberty-unleashed.co.uk ]
2 ) After you connect successfully, use - /join #channelname [ Like /join #Mychan ]
3 ) Use - /cs register #channelname [ Like /cs register #Mychan ]
4 ) Your channel will get registered and to confirm that its your channel you can see something like ~ or red dot in left side of your name

>> Note - To do above you must be registered in IRC Server, to do that use - /msg nickserv register password email@address.
>> Also, after joining the channel you must have a green dot or @ in left side of your name to register the channel.

To connect your bot, you must have a script [ FBS-Echo.nut or other ]  to connect it to the IRC Server, in the script you need to do is -
const FBS_NICK = "Botname"; // The name of the echo bot
const FBS_BPASS = ""; // The NickServ password of the echo bot
const FBS_SERVER = "94.23.157.172"; // The numerical ip of the irc server - this will join irc.nl.project-apollo.co.uk
const FBS_PORT = 6667; // The port for that irc server
const FBS_CHAN = "#channelname"; // The channel that you wont your echo bot to join
const FBS_CPASS = ""; // The password for that channel, if there isnt one leave it as "".

To load the FBS-Echo.nut or any other -

function onScriptLoad()
{
dofile("FBS-Echo.nut"); // or other any other
ActivateEcho();// function in FBS-Echo.nut file to connect the bot.
}
function onScriptUnload()
{
DisconnectBots();// function in FBS-Echo.nut file to disconnect bot.
}

CZ

Successfully created a irc and connected to server. And anpther question is how to set colours that different event happen also that how can i change that when someone kills someone killed someone it just says 'xxx kills xxx' change to'xxx kills someone within a xxx*
PS: Why we always need to type !say to say how to change it to begin with . (full stop)?

jayant

//IRC COLOURS Credits to creator
const ICOL_WHITE    = "\x000300";
const ICOL_BLACK    = "\x000301";
const ICOL_BLUE     = "\x000302";
const ICOL_GREEN    = "\x000303";
const ICOL_RED      = "\x000304";
const ICOL_BROWN    = "\x000305";
const ICOL_PURPLE   = "\x000306";
const ICOL_ORANGE   = "\x000307";
const ICOL_YELLOW   = "\x000308";
const ICOL_LGREEN   = "\x000309";
const ICOL_CYAN     = "\x000310";
const ICOL_LCYAN    = "\x000311";
const ICOL_LBLUE    = "\x000312";
const ICOL_PINK     = "\x000313";
const ICOL_GREY     = "\x000314";
const ICOL_LGREY    = "\x000315";
const ICOL          = "\x0003";
const ICOL_BOLD     = "\x0002";
const ICOL_ULINE    = "\x0031";

Put the above const [ constants for irc colours ] in your Main.nut or other you have..When you will look the FBS-Echo.nut it has some functions in it. Like EchoMessage, EchoNotice. EchoMessage function is used to get server messages in the IRC.

function onPlayerDeath( player, reason )
{
EchoMessage(  ICOL_ORANGE + player.Name + " died !! " );
}
>> This will display a message in IRC channel with orange colour. Do, this on other functions too. [ Like - function onPlayerJoin(player) , function onPlayerSpawn(player) ]

To use fullstop ".", you need to make a code..Try to make it.

ℛḝξ☂

Quote
Quote from: jayant on Jul 24, 2015, 01:13 PMTo use fullstop ".", you need to make a code..Try to make it.

How?
I may be a slow walker but I am always walking.

KAKAN

oh no

ℛḝξ☂

Quote from: KAKAN on Jul 26, 2015, 05:34 AMHere you go:-
http://forum.vc-mp.org/?topic=1130.new#new

Thanks.
btw, why the bot will quit after loading server a few hours?
 8)
I may be a slow walker but I am always walking.

Thijn

Quote from: Sentral on Jul 26, 2015, 09:38 AM
Quote from: KAKAN on Jul 26, 2015, 05:34 AMHere you go:-
http://forum.vc-mp.org/?topic=1130.new#new

Thanks.
btw, why the bot will quit after loading server a few hours?
 8)
What quit message do you get?

ℛḝξ☂

Quote from: Thijn on Jul 26, 2015, 10:03 AM
Quote from: Sentral on Jul 26, 2015, 09:38 AM
Quote from: KAKAN on Jul 26, 2015, 05:34 AMHere you go:-
http://forum.vc-mp.org/?topic=1130.new#new

Thanks.
btw, why the bot will quit after loading server a few hours?
 8)
What quit message do you get?

* MYBOT ([email protected]) Quit (Ping timeout: 121 seconds)
I may be a slow walker but I am always walking.

CZ

Quote from: Thijn on Jul 26, 2015, 10:03 AM
Quote from: Sentral on Jul 26, 2015, 09:38 AM
Quote from: KAKAN on Jul 26, 2015, 05:34 AMHere you go:-
http://forum.vc-mp.org/?topic=1130.new#new

Thanks.
btw, why the bot will quit after loading server a few hours?
 8)
What quit message do you get?
It just says: (Connection Closed)

KAKAN

connection closed means u have turned the server off, and ping timeout means either u have done something wrong in ur script or else ur net is not fixed
oh no

ℛḝξ☂

Quote from: KAKAN on Jul 27, 2015, 08:29 AMconnection closed means u have turned the server off.
Nope, Server is working.
I may be a slow walker but I am always walking.

Thijn

A Ping timeout is caused by your script not sending a PONG back at pings you get from the IRC server. You'll have to check your script for that.
A connection closed means your script/something else closed the socket. Usually this happens when the server shuts down (You probably have a socket.Disconnect() in your onScriptUnload).