Search found 8 matches

by Axle1975
Fri Nov 15, 2024 9:08 am
Forum: UnrealIRCd modules (third party)
Topic: A blocking module - what is the correct design?
Replies: 3
Views: 29242

Re: A blocking module - what is the correct design?

hmmm yeah ok, thanks for that info. Food for thought, but definitely making me reconsider my life choices
by Axle1975
Fri Nov 15, 2024 8:45 am
Forum: UnrealIRCd modules (third party)
Topic: [SOLVED] Module that adds a message tag to channel messages, how to?
Replies: 6
Views: 12107

Re: Module that adds a message tag to channel messages, how to?

I guess another solution that would suit my use case would be to pass the message text as an argument to the new message hook
by Axle1975
Fri Nov 15, 2024 7:07 am
Forum: UnrealIRCd modules (third party)
Topic: A blocking module - what is the correct design?
Replies: 3
Views: 29242

A blocking module - what is the correct design?

Suppose I write a module that needs to do a fair bit of work in one of its hooks before allowing the message to proceed down the line - say in the HOOKTYPE_NEW_MESSAGE or HOOKTYPE_PRE_CHANMSG. I'm not sure how unrealircd's threading model works. Am I blocking the whole server or other messages from ...
by Axle1975
Fri Nov 15, 2024 6:58 am
Forum: UnrealIRCd modules (third party)
Topic: [SOLVED] Module that adds a message tag to channel messages, how to?
Replies: 6
Views: 12107

Re: Module that adds a message tag to channel messages, how to?

Hi Val, thanks for your reply. Yeah I found the new message hook but unfortunately its not suitable for my use case. You see I need to inspect the message text in order to determine the value for the new tag. The new message hook doesn't provide the message text AFAIK
by Axle1975
Thu Nov 14, 2024 11:27 am
Forum: UnrealIRCd modules (third party)
Topic: [SOLVED] Module that adds a message tag to channel messages, how to?
Replies: 6
Views: 12107

Re: Module that adds a message tag to channel messages, how to?

Now I want to do the same for User Messages. HOOKTYPE_PRE_CHANMSG works well for channel messages, but there doesn't seem to be any User Message equivalent. HOOKTYPE_USERMSG is no good because its only called after the message is actually forwarded to the user so there's no opportunity to modify ...
by Axle1975
Thu Nov 14, 2024 6:35 am
Forum: UnrealIRCd modules (third party)
Topic: [SOLVED] Module that adds a message tag to channel messages, how to?
Replies: 6
Views: 12107

Re: Module that adds a message tag to channel messages, how to?

ok I got it sussed, thanks for your help all! It's necessary to register a message tag handler:


MOD_INIT() {
MessageTagHandlerInfo tag;

MARK_AS_GLOBAL_MODULE(modinfo);

memset(&mtag, 0, sizeof(mtag));
mtag.name = "taforever.com/name";
mtag.flags = MTAG_HANDLER_FLAGS_NO_CAP_NEEDED ...
by Axle1975
Wed Nov 13, 2024 6:54 am
Forum: UnrealIRCd modules (third party)
Topic: [SOLVED] Module that adds a message tag to channel messages, how to?
Replies: 6
Views: 12107

[SOLVED] Module that adds a message tag to channel messages, how to?

I want to write a module that tags all channel messages with a custom message tag. I tried a few things, but can't get it working - or at least the IRC client (KittehChat java based client) doesn't see the new messages.

Does the below look right, or am I way off? The log message appears no problem ...