View Issue Details

IDProjectCategoryView StatusLast Update
0006122unrealircdpublic2022-06-01 08:57
Reporterwestor Assigned To 
Status newResolutionopen 
Product Version6.0.4-rc1 
Summary0006122: @if module-loaded() @endif doesn't working sometimes when unloading a module

It seems when you have @if module-loaded("module") @endif set under unrealircd.conf and you trying to unload a module after /REHASH ircd gives errors.

Example Errors (line 150 is the following configuration):

config.CONFIG_ERROR_GENERIC [error] /home/westor/unrealircd/conf/unrealircd.conf:150: unknown directive set::antirandom
config.CONFIG_ERROR_GENERIC [error] 1 errors encountered
config.CONFIG_ERROR_GENERIC [error] IRCd configuration failed to pass testing
config.CONFIG_NOT_LOADED [error] IRCd configuration failed to load

Example Configuration:

@if module-loaded("antirandom")
set {
    antirandom {
        threshold 5;

        ban-action zline;

        ban-time 5m;

        ban-reason "You look like a bot. Be sure to fill in your nick/ident/realname properly.";

        convert-to-lowercase yes;

        show-failedconnects yes;

        except {
            ip { 192.168.*; 127.*; }

- Thanks!
Steps To Reproduce1. Load antirandom module
2. Set the above configuration
3. Rehash
4. Unload antirandom
5. Rehash
6. Check that IRCd returns config errors
TagsNo tags attached.
3rd party modules



2022-06-01 08:53

administrator   ~0022546

Last edited: 2022-06-01 08:57

Ah ok, you could be right indeed. I will look at it post-6.0.4 release because the config code is generally quite complex and I don't want to accidentally break the entire release for a bug that is probably around for a few years with no reports until now.

Issue History

Date Modified Username Field Change
2022-06-01 04:02 westor New Issue
2022-06-01 08:53 syzop Note Added: 0022546
2022-06-01 08:53 syzop Priority high => normal
2022-06-01 08:53 syzop Severity major => minor
2022-06-01 08:57 syzop Note Edited: 0022546