Hello, I'm experienced with standalone Lua with the default libraries, and I wanted to get into more advanced/useful stuff. I'm currently interested in making things like IRC bots, so I was wondering: Where do I start? What libraries do I need? Anything else?
Thanks in advance,
Ott
I think a good start would be writing a parser for strings, and check if they have any relevant content in them (i.e. a command).
Yeah, I've started on a couple of text based games that have command parsers, I just want to know how to connect to the servers, fetch the data etc.
[QUOTE=Ott;39686531]Yeah, I've started on a couple of text based games that have command parsers, I just want to know how to connect to the servers, fetch the data etc.[/QUOTE]
Just google for some irc libraries then? I'm sure there's a ton of ready-to-go libraries.
Luasocket, if my memory is correct, is good for lua networking.
Should be perfectly fine for IRC.
[url=http://tools.ietf.org/html/rfc2812]RFC 2812[/url]. I wrote an IRC bot on an Arduino with an ethernet shield a while back.
Basic IRC is easy. Make a socket, connect to your server, and then
PASS ServerPassword (if the server needs one)
NICK YourNickname
USER YourNickname irc.server.name bla :Whatever you give as a "full name"
then respond to ping with pong and viola.
You're going to want to implement most of RFC 2812 (if not all of it) for best results, but that will get you a bot that can hold a nickname.
[editline]14th March 2013[/editline]
oh also commands are supposed to be separated with \r\n
I say "supposed to be" because last I was aware there are some IRCds that insist on using only \n because they're dicks
Sorry, you need to Log In to post a reply to this thread.