IRC plugin

Posted by Ircria on Sun 14 Aug 2011 05:55 AM — 7 posts, 27,601 views.

#0
Version 0.2.1 of the plugin has been released.

Download: http://dl.dropbox.com/u/22153772/lithium_irc.zip

-0.2.0- Several major additions have been made to the plugin, including allowing the use of user-defined colours (defined per command), prettying up the output, the inclusion of several more commands into the parser, allowing the ability to Simulate() the output to be matched by triggers (for a chatbox or further highlighting), and more that seems to have slipped my mind.

-0.2.1- Added a few missing commands, and fixed inspIRCd compatability issues.

Installation, configuration and usage instructions are in readme.txt, contained in the zip file.

Known bugs:
o Character 0x01 will not be sent to IRC server. Emotes have been disabled because of this
o Lines split across packets will not be read correctly.

Special thanks to:
o FenceWalker for finding the 0.1.1 bug
o Fiendish for inspiration for 0.1.2 and 0.2.0
o Nick Gammon and MUSHclient contributors for producing the, in my honest opinion, best MUD client available

[EDIT] Updated to 0.2.1
Amended on Mon 29 Aug 2011 06:34 AM by Ircria
#1
It seems that my haste has ended up given me problems again. I received a private message from a user named FenceWalker, who pointed out his inability to connect using this plugin. While debugging it, I noticed that one of my variables was named incorrectly. I use a version of this with slightly different code and seemed to have changed a variable name in my hasty job of removing certain features so this could be released publicly.

I would like to apologize to anybody who attempted to use this plugin and was inconvenienced by this error, and thank FenceWalker for his bug report.

Version 0.1.1 has been uploaded to http://dl.dropbox.com/u/22153772/irc.zip and contains a fix and a new feature. A debug mode, enabled by changing config.debug to a non-false/non-nil value, will echo out useful information (and a lot of non-useful information too).

I again, would like to apologize for any inconvenience. Thank you for your patience.
USA Global Moderator #2
Cool idea. You should make the connect alias accept parameters, so that you don't have to edit the plugin to connect to different servers.

[EDIT] Also, color coding/syntax highlighting. It's really hard to read when everything is one color.
Amended on Sat 27 Aug 2011 07:02 AM by Fiendish
#3
Fiendish said:

You should make the connect alias accept parameters, so that you don't have to edit the plugin to connect to different servers. Cool idea.


Added and uploaded (same link as before. And yes, I did test it this time.). You can now do (replacing the server and port with the one you want)
IRC CONNECT irc.freenode.net
IRC CONNECT irc.freenode.net:6667
IRC CONNECT irc.freenode.net 6667

If any of the parameters are left out, it defaults to the... well, default. Thanks, Fiendish!

EDIT: As for colour coding/highlighting, it's being added in a future version when I have a bit more time. I'll also be prettying up the output a bit so it's more readable, and adding in a configuration option to Simulate() the output (with ANSI escape sequences used for colouring) so it can be made to work with a chatbox miniwindow.
Amended on Sat 27 Aug 2011 07:07 AM by Ircria
#4
Version 0.2.0 has been released. The original post has been updated with the new download information and instructions.

EDIT: Also, to save everybody some time setting up their own colour scheme if they don't mind using somebody elses, here is the one I use personally:

<variables>
  <variable name="irccolours">temptable = {
  ["433"] = {
    bg = 0,
    fg = 9,
    },
  ["333"] = {
    bg = 0,
    fg = 7,
    },
  ["252"] = {
    bg = 0,
    fg = 7,
    },
  JOIN = {
    bg = 0,
    fg = 10,
    },
  ["473"] = {
    bg = 0,
    fg = 9,
    },
  ["254"] = {
    bg = 0,
    fg = 7,
    },
  ["411"] = {
    bg = 0,
    fg = 9,
    },
  NOTICE = {
    bg = 0,
    fg = 13,
    },
  ["491"] = {
    bg = 0,
    fg = 9,
    },
  ["255"] = {
    bg = 0,
    fg = 7,
    },
  ["451"] = {
    bg = 0,
    fg = 9,
    },
  ["251"] = {
    bg = 0,
    fg = 7,
    },
  ["403"] = {
    bg = 0,
    fg = 9,
    },
  ["446"] = {
    bg = 0,
    fg = 9,
    },
  ["003"] = {
    bg = 0,
    fg = 7,
    },
  ["422"] = {
    bg = 0,
    fg = 9,
    },
  ["483"] = {
    bg = 0,
    fg = 9,
    },
  ["406"] = {
    bg = 0,
    fg = 9,
    },
  ["443"] = {
    bg = 0,
    fg = 9,
    },
  ["421"] = {
    bg = 0,
    fg = 9,
    },
  ["464"] = {
    bg = 0,
    fg = 9,
    },
  ["265"] = {
    bg = 0,
    fg = 7,
    },
  MODE = {
    bg = 0,
    fg = 11,
    },
  ["465"] = {
    bg = 0,
    fg = 9,
    },
  ["424"] = {
    bg = 0,
    fg = 9,
    },
  ["461"] = {
    bg = 0,
    fg = 9,
    },
  ["413"] = {
    bg = 0,
    fg = 9,
    },
  ["472"] = {
    bg = 0,
    fg = 9,
    },
  PRIVMSG = {
    bg = 0,
    fg = 10,
    },
  ["332"] = {
    bg = 0,
    fg = 7,
    },
  ["432"] = {
    bg = 0,
    fg = 9,
    },
  ["353"] = {
    bg = 0,
    fg = 10,
    },
  ["253"] = {
    bg = 0,
    fg = 7,
    },
  ["431"] = {
    bg = 0,
    fg = 9,
    },
  ["474"] = {
    bg = 0,
    fg = 9,
    },
  ["250"] = {
    bg = 0,
    fg = 7,
    },
  ["372"] = {
    bg = 0,
    fg = 7,
    },
  QUIT = {
    bg = 0,
    fg = 10,
    },
  ["475"] = {
    bg = 0,
    fg = 9,
    },
  ["376"] = {
    bg = 0,
    fg = 7,
    },
  ["462"] = {
    bg = 0,
    fg = 9,
    },
  ["375"] = {
    bg = 0,
    fg = 7,
    },
  ["366"] = {
    bg = 0,
    fg = 10,
    },
  ["414"] = {
    bg = 0,
    fg = 9,
    },
  ["482"] = {
    bg = 0,
    fg = 9,
    },
  ["266"] = {
    bg = 0,
    fg = 0,
    },
  ["002"] = {
    bg = 0,
    fg = 7,
    },
  PING = {
    bg = 0,
    fg = 0,
    },
  ["436"] = {
    bg = 0,
    fg = 9,
    },
  ["442"] = {
    bg = 0,
    fg = 9,
    },
  ["467"] = {
    bg = 0,
    fg = 9,
    },
  ["001"] = {
    bg = 0,
    fg = 7,
    },
  ["407"] = {
    bg = 0,
    fg = 9,
    },
  ["502"] = {
    bg = 0,
    fg = 9,
    },
  ["463"] = {
    bg = 0,
    fg = 9,
    },
  PART = {
    bg = 0,
    fg = 10,
    },
  NICK = {
    bg = 0,
    fg = 14,
    },
  ["412"] = {
    bg = 0,
    fg = 9,
    },
  ["501"] = {
    bg = 0,
    fg = 9,
    },
  ["444"] = {
    bg = 0,
    fg = 9,
    },
  ["005"] = {
    bg = 0,
    fg = 0,
    },
  ["401"] = {
    bg = 0,
    fg = 9,
    },
  ["423"] = {
    bg = 0,
    fg = 9,
    },
  ERROR = {
    bg = 0,
    fg = 9,
    },
  TOPIC = {
    bg = 0,
    fg = 10,
    },
  ["405"] = {
    bg = 0,
    fg = 9,
    },
  ["445"] = {
    bg = 0,
    fg = 9,
    },
  ["481"] = {
    bg = 0,
    fg = 9,
    },
  ["004"] = {
    bg = 0,
    fg = 7,
    },
  ["409"] = {
    bg = 0,
    fg = 9,
    },
  ["441"] = {
    bg = 0,
    fg = 9,
    },
  ["402"] = {
    bg = 0,
    fg = 9,
    },
  ["404"] = {
    bg = 0,
    fg = 9,
    },
  ["471"] = {
    bg = 0,
    fg = 9,
    },
  }</variable>
</variables>
Amended on Sun 28 Aug 2011 07:58 AM by Ircria
#5
Is there a way to use this without it being mixed with an open world? Like in a channel by itself?
#6
Sakuryu said:

Is there a way to use this without it being mixed with an open world? Like in a channel by itself?


I'm not sure I understand entirely what you mean by that. If you mean having it as a world itself, it shouldn't be too hard to do so (considering this was converted to a plugin from such a state). You'd still need a plugin tick to run OnPluginTick for the reactor... Or you could make a new world pointing to the IP address 0.0.0.0 and run the plugin from that. This should also work.