Search found 8 matches
- Mon Nov 18, 2024 1:21 pm
- 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?
Incase you're interested you can see what I've done here: https://github.com/ta-forever/unrealirc ... 38a0ab3993
- 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
- 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
- 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 ...
- 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
- 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 ...
- 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 ...
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 ...
- 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 ...
Does the below look right, or am I way off? The log message appears no problem ...