ShaneMcC.co.uk :: IRC Related Stuff

 
About
This page used to exist at http://shane.dmdirc.com/, but that now redirects here. This page contains stuff related to IRC in general.
Contents
DMDirc
I am one of the developers for an IRC Client called DMDirc (More information can be found on the site).
I'm primarily in charge of the actual IRC Parser, and the plugin system however I have also developed some of the other plugins such as the DCC Plugin.

Back to top
IRC List Modes
Whilst developing the parser for DMDirc I noticed that the current way listmodes work is rather flawed, At the moment there is no usable standard for getting the current listmodes of a channel on an irc network.
Each ircd uses its own list modes, and numerics for giving the information, there is no easy way to be able to parse these lists reliably without checking EVERY ircd to see what numerics it uses, and even that isn't enough.
Take for example freenode's hyperion IRCD, and the following commands:
MODE #Channel +d %moded!user@host
MODE #Channel +d moded!user@host
MODE #Channel +q modeq!user@host
MODE #Channel +b modeb!user@host
This will:
  • set a ban on a user with the host "modeb!user@host"
  • silence a user with the host "modeq!user@host"
  • ban anyone with a realname of "%moded!user@host"
  • ban anyone with a realname of "moded!user@host"
Seems easy enough? - if you are in the channel at the time the mode is set, you can easily see what mode it is (b, q, d). However a new client joining doesn't see this, instead they issue the following command:
MODE #Channel bqd
to which they get the following response back:
:pratchett.freenode.net 367 DFTest #Channel modeb!user@host DFTest!i=shane@home.dataforce.org.uk 1173715309
:pratchett.freenode.net 367 DFTest #Channel %modeq!user@host DFTest!i=shane@home.dataforce.org.uk 1173715309
:pratchett.freenode.net 368 DFTest #Channel :End of Channel Ban List
:pratchett.freenode.net 367 DFTest #Channel moded!user@host DFTest!i=shane@home.dataforce.org.uk 1173715309
:pratchett.freenode.net 367 DFTest #Channel %moded!user@host DFTest!i=shane@home.dataforce.org.uk 1173715309
:pratchett.freenode.net 368 DFTest #Channel :End of Channel Ban List
There is no easy way to know which were set as mode d, and which were mode b as they come from the same numeric. (Of course you could statefully remember which modes you asked for in which order - but on dancer/hyperion using "bdq" not "bqd" returns the exact same - q and b are merged into one, which would still require some hard-coded knowledge. There is also still the problem that not all IRCDs use the same numeric for everthing)

RPL_ISUPPORT allows IRC parser/client developers to dynamically discover what modes are available on the IRCD, yet the raw numerics for each type of list mode still need to be hardcoded.

My Proposal
To aid in the design of IRC Parsers, I propose an addition to RPL_ISUPPORT and a new command.
The addition to RPL_ISUPPORT is a "LISTMODE=997" option.
This new option would let clients know that there is an easy-to-parse/sensible way to get the current list modes on a channel, the "LISTMODE" command. (ie /LISTMODE #Channel bdq or (/LISTMODE #Channel * for all list modes))
The LISTMODE commands given above would return the following:
:pratchett.freenode.net 997 DFTest #Channel b modeb!user@host DFTest!i=shane@home.dataforce.org.uk 1173715309
:pratchett.freenode.net 997 DFTest #Channel d %moded!user@host DFTest!i=shane@home.dataforce.org.uk 1173715309
:pratchett.freenode.net 997 DFTest #Channel d moded!user@host DFTest!i=shane@home.dataforce.org.uk 1173715309
:pratchett.freenode.net 997 DFTest #Channel q %modeq!user@host DFTest!i=shane@home.dataforce.org.uk 1173715309
:pratchett.freenode.net 998 DFTest #Channel :End of Channel List Modes
The numeric used for the individual items is the same as specified in RPL_ISUPPORT (in this case 997) and the "End of list modes" uses LISTMODE+1 for its numeric. This allows ircds to use what ever numeric they want that is free - without clients needing to know what numeric each IRCD uses.

The addition of the /LISTMODE command and not just altering the current /MODE command is to maintain backwards compatability with older clients.

Existing list mode information
To the best of my knowledge, the information on the dmdirc wiki provides a complete list of current numerics used by various IRCDs, and is what the DMDirc parser uses for parsing list modes
Known Implementions
At the moment as far as I am aware the only IRC Client/Parser that understands the LISTMODE option/command is DMDirc, and as yet the only "server" that allows its use is DFBnc-Java.
Questions, Comments, Corrections
Any questions about this should be sent to IRCDevel@Dataforce.org.uk, or contact Dataforce in #DMDirc on Quakenet or Freenode



Back to top