autoattach cannot be loaded as network module #397

Closed
opened 2026-10-05 04:18:13 +02:00 by adam · 2 comments
Owner

< *status> Module [autoattach] does not support module type [Network].

I want to be attached on all channels when I am highlighted with two expections so I attempted loading autoattach as user and network module.

I am on two channels that are relayed between two networks and the relaybot highlights me when I am mentioned. I want to be on both of them so I can see what happens when the bot is down and the other network is IRCnet and doesn't have services.

Sorry if there is already issue about this, I simply searched for "autoattach" at GitHub and was given three closed issues.

> `< *status> Module [autoattach] does not support module type [Network].` I want to be attached on all channels when I am highlighted with two expections so I attempted loading autoattach as user and network module. I am on two channels that are relayed between two networks and the relaybot highlights me when I am mentioned. I want to be on both of them so I can see what happens when the bot is down and the other network is IRCnet and doesn't have services. Sorry if there is already issue about this, I simply searched for "autoattach" at GitHub and was given three closed issues. <!-- github-sync-id:44241118 -->
adam closed this issue 2026-10-05 04:18:13 +02:00
Author
Owner

The autoattach module is using registry for storing match entries. Since registry is stored separately for global, user and network modules, I believe this should be enough:

diff --git a/modules/autoattach.cpp b/modules/autoattach.cpp
index 1e5c3d9..2143b67 100644
--- a/modules/autoattach.cpp
+++ b/modules/autoattach.cpp
@@ -281,6 +281,7 @@ private:
 };

 template<> void TModInfo<CChanAttach>(CModInfo& Info) {
+       Info.AddType(CModInfo::NetworkModule);
        Info.SetWikiPage("autoattach");
        Info.SetHasArgs(true);
        Info.SetArgsHelpText("List of channel masks and channel masks with ! before them.");
The autoattach module is using registry for storing match entries. Since registry is stored separately for global, user and network modules, I believe this should be enough: ``` diff diff --git a/modules/autoattach.cpp b/modules/autoattach.cpp index 1e5c3d9..2143b67 100644 --- a/modules/autoattach.cpp +++ b/modules/autoattach.cpp @@ -281,6 +281,7 @@ private: }; template<> void TModInfo<CChanAttach>(CModInfo& Info) { + Info.AddType(CModInfo::NetworkModule); Info.SetWikiPage("autoattach"); Info.SetHasArgs(true); Info.SetArgsHelpText("List of channel masks and channel masks with ! before them."); ``` <!-- github-comment-id:57930708 -->
Author
Owner

Probably network should be even the default..

Probably network should be even the default.. <!-- github-comment-id:57951663 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#397