Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "unrealircd.h"
- ModuleHeader MOD_HEADER = {
- "mymod",
- "1.0",
- "Just a test module",
- "westor",
- "unrealircd-6",
- };
- int avatar_chanmsg(Client *client, Channel *channel, MessageTag *mtags, const char *text, SendType sendtype);
- MOD_INIT() {
- HookAdd(modinfo->handle, HOOKTYPE_PRE_CHANMSG, -100000000, mymod_chanmsg); // yeah lets use this priority just in case
- return MOD_SUCCESS;
- }
- MOD_LOAD() { return MOD_SUCCESS; }
- MOD_UNLOAD() { return MOD_SUCCESS; }
- int mymod_chanmsg(Client *client, Channel *channel, MessageTag *mtags, const char *text, SendType sendtype) {
- if (IsULine(client) || IsServer(client)) { return 0; }
- int invi = invisible_user_in_channel(client, channel);
- int has_d = has_channel_mode(channel, 'd');
- int has_D = has_channel_mode(channel, 'D');
- unreal_log(ULOG_INFO, "mymod", "MYMOD_TEST_CHANMSG", client, "$client is invisible on $chan [invisible: $invi] [+D: $D] [+d: $d]",
- log_data_channel("chan", channel),
- log_data_integer("invi", invi),
- log_data_integer("D", has_D),
- log_data_integer("d", has_d));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement