Our server pr0vider carried out maintenance on 15 January 2020 but it corrupted some files in the process. If you notice anything out of the ordinary (partial files, pages not loading, that kind of shit) then let us know at:

modmanager_irc.md 5.2 KB

modmanager_irc

Doesn't work on Windows ;]

Building upon the existing functionality of Unreal's module manager, this module allows control of that shit through IRC commands instead of having to SSH to every server. ;];] As a bonus, it also supports passing custom compilation flags by means of the EXLIBS environment variable. This is very rarely needed; module authors will tell you to use it when necessary.

Also, keep in mind that a module upgrade involves recompiling the module all over again, thus you'll need to pass the required EXLIBS flags every time (or see Config blocks section for a way around that).

Important note: while this module works perfectly fine on any Unreal 5.x version, there currently is a minor problem with the module manager which I expect to be fixed in 5.0.2. This problem is that even when module compilation fails, Unreal sometimes may report the test phase as being successful and ends up outputting the errors twice.

Config blocks:
First off, you'll need to grant opers the new modmanager-irc permission:

operclass netadmin-modmanager {
    parent netadmin;
    permissions {
        modmanager-irc;
    };
};

For now there's one extra option you can slam in your configuration file, which is of course entirely optional:

modmanager-irc {
    default-exlibs "-lldap";
};

If any oper omits the EXLIBS flags then the module will use whatever you specify here. Anything specified on IRC will override what's in the config instead of adding them together, to prevent any conflicts.

You may also wanna make sure that the class { } block that your opers use has a large enough sendq value, due to the possibility that a large amount of text may be sent at once. The sendq/recvq values are from the perspective of the server, so sendq is for messages to users.

class opers {
    // Rest of the block here
    sendq 1M; // Unreal has this in its example config so you might be good already, this should be plenty big =]
};

Syntax:
MODMGR <local|global|server name> install <module name> [EXLIBS compilation flags]
MODMGR <local|global|server name> uninstall <module name>
MODMGR <local|global|server name> upgrade <*|module name> [EXLIBS compilation flags]

All these arguments should be pretty clear. =] For the module name you can omit both the leading third/ and trailing .c, because both are assumed anyways. ;].

Because we need to remain able to forward the command to other servers, there's a limit of 192 characters for any EXLIBS value (conf or IRC). Many clients cut off messages around 230 characters anyways, so anything much higher and shit will be incomplete regardless. ;];];]

The module emits one global message indicating usage of this command, which can be seen if you have the SNO_EYES snomask set (/umode +s +e). All other messages like compilation errors are usually only shown to the oper running the command (exceptions apply, see directly below).

Now, a few other things to keep in mind as well:

  • Only one command can run at a time, otherwise shit might get funky. ;]
  • Because the module manager is called externally, it would normally block the entire IRCd until it's completely finished. To work around this I'm using an event that runs every 5 seconds to see if we need to get output from the modmanager. This means that any output could be delayed for up to 8 seconds; there's also a 3 second delay after running the modmanager to prevent some race conditions. Meaning you could get the output from the second "tick".
  • A side effect of using this event is that the oper who originally ran the command might have /quit from IRC. In this case, any messages originally intended for them will now be sent to all opers local to the server emitting those messages. Like after a global install command, compilation errors from all servers would normally have been relayed to only the originating oper. But if they're gone then server A will send them to all opers locally connected to it, server B for its own local opers, etc. Any such messages are prefixed with relayed (for lack of a better term elemao).
  • As the originating oper, it might be a bit confusing why you're getting certain messages from a certain server (or not getting them) in case of global commands. So I'll explain em right here:
    • From the server you're connected to you'll receive: module not installed error, compilation errors, compilation success message and any post-install text from the author indicating the next steps
    • From other servers: module not installed error, compilation errors and compilation success message

Examples:
MODMGR => Display built-in halp stuff =]]]
MODMGR local install chansno => Install my chansno module only on the server you're currently connected to
MODMGR global uninstall chansno => Uninstall my chansno module from the entire network
MODMGR global upgrade * => Upgrade all currently managed modules
MODMGR global install wwwstats -lmysqlclient => Install k4be's wwwstats module, which requires linking against the MySQL client library
MODMGR global upgrade wwwstats -lmysqlclient => Upgrade that same module, which also requires the same compilation flags

And prest0. =]