Page 1 of 1

Configuring IRC Optional Parameters?

Posted: Mon Nov 02, 2020 5:44 am
Hi, I have a rather unorthodox support question, but I already checked through the documentation and FAQ and couldn't find anything about this. I suspect that given the nature of the request this probably won't become a feature, but I thought it'd be worth asking anyway.

I and some others run a server for an old, online multiplayer game called RobotRage: Rearmed. The original game server went down a long time ago, but with some help we were able to create an unofficial server emulator to get it back up and running. Conveniently, the game uses the IRC protocol for the multiplayer lobby, so this was a drop-in replacement. After trying some other IRC servers we found that unrealircd was the only one compatible with the game client. We're currently using unrealircd for the game server and it works well - if you're curious our website is

However, there is a minor issue: the game client has trouble determining how many players are online, which it is supposed to display on login. By reversing the code I was able to determine it finds this number from IRC response 265 (RPL_LOCALUSERS.) unrealircd does send this response, but not in the format the game client expects. I found this page detailing the response.

The format of the message is like this:

Code: Select all

<client> [<u> <m>] :Current local users <u>, max <m>
u and m are optional parameters, which unrealircd always sends. Here's a quote from the spec.
The two optional parameters SHOULD be supplied to allow clients to better extract these numbers.
Unfortunately, the game client seems to deviate from the spec here. It expects that the optional parameters are not sent, instead finding the seventh word of the message, which it expects to be the number - but in this case it is actually the word "local," which it attempts to convert to an integer, and fails to display the number of online users. Because I don't have the source for the client, only the binary, I can't edit it to fix this problem.

I had a look at the source for unrealircd and found the message defined in numerics.c with seemingly no way to disable the optional parameters. Since these parameters are technically optional, is there a way they could be configured off or at least could there be a compile time flag to modify them, or will I just have to fork and edit the string myself? Thanks very much in advance.

Re: Configuring IRC Optional Parameters?

Posted: Mon Nov 02, 2020 7:42 am
by Syzop
I'm afraid, customizing the numerics is not planned (it has been requested before and rejected).

You got a very specific case here, though. If I were you I would just edit numerics.c and change:

Code: Select all

"%d %d :Current local users %d, max %d"
"%d %d :Current global users %d, max %d"

Code: Select all

":Current local users %d, max %d"
":Current global users %d, max %d"
In this specific case, it should be a safe edit.

If you go edit other numerics than this (or edit them in a different way), then it is easy to screw something up: causing a crash, violate specifications, cause client issues, etc.

After changing this you simply run 'make' and 'make install' again. The IRC Server would need to be (re)started for the changes to take effect.

Re: Configuring IRC Optional Parameters?

Posted: Mon Nov 02, 2020 12:27 pm
That's about the answer I expected, but thank you anyway. :)