HookTypes for raw incoming and outgoing messages
Posted: Thu Nov 04, 2004 11:25 pm
Hi,
it would be really useful to me if there was a HookType that would allow a module to catch an incoming command (single line) and read and/or modify it before it's being sent to the parse() method (this would probably go somewhere into dopaket()).
The same would be useful for outgoing messages. A module could catch an outgoing message just before it's sent to the client (in sendbufto_one() I guess) and read and/or change it accordingly.
You would probably wanna know what I need that for. I was wondering if I could write some sort of a wrapper module that would allow clients that implement a different protocol (e.g. XML-based protocol) to connect to the IRC server by translating incoming messages into IRC before they are parsed by the server, and translating back into the target protocol before they are sent back to the client.
it would be really useful to me if there was a HookType that would allow a module to catch an incoming command (single line) and read and/or modify it before it's being sent to the parse() method (this would probably go somewhere into dopaket()).
The same would be useful for outgoing messages. A module could catch an outgoing message just before it's sent to the client (in sendbufto_one() I guess) and read and/or change it accordingly.
You would probably wanna know what I need that for. I was wondering if I could write some sort of a wrapper module that would allow clients that implement a different protocol (e.g. XML-based protocol) to connect to the IRC server by translating incoming messages into IRC before they are parsed by the server, and translating back into the target protocol before they are sent back to the client.