}
static void
-chanserv_ctcp_check(struct userNode *user, struct chanNode *channel, const char *text, UNUSED_ARG(struct userNode *bot))
+chanserv_ctcp_check(struct userNode *user, struct chanNode *channel, const char *text, UNUSED_ARG(struct userNode *bot), UNUSED_ARG(unsigned int is_notice))
{
unsigned int eflags, argc;
char *argv[4];
}
void
-modcmd_chanmsg(struct userNode *user, struct chanNode *chan, const char *text, struct userNode *bot) {
+modcmd_chanmsg(struct userNode *user, struct chanNode *chan, const char *text, struct userNode *bot, unsigned int is_notice) {
struct service *service;
- if (!(service = dict_find(services, bot->nick, NULL))) return;
+ if (!(service = dict_find(services, bot->nick, NULL)))
+ return;
svccmd_invoke(user, service, chan, text, 0);
+ (void)is_notice;
}
struct service *
/* Never send a NOTICE to a channel to one of the services */
cf = &chanmsg_funcs[(unsigned char)pd->text[0]];
- if (!pd->is_notice && cf->func && GetUserMode(cn, cf->service) && !IsDeaf(cf->service))
- cf->func(pd->user, cn, pd->text+1, cf->service);
+ if (cf->func && !pd->is_notice
+ && GetUserMode(cn, cf->service) && !IsDeaf(cf->service))
+ cf->func(pd->user, cn, pd->text+1, cf->service, pd->is_notice);
/* This catches *all* text sent to the channel that the services server sees */
for (x = 0; x < ALLCHANMSG_FUNCS_MAX; x++) {
if (!cf->func)
break; /* end of list */
else
- cf->func(pd->user, cn, pd->text, cf->service);
+ cf->func(pd->user, cn, pd->text, cf->service, pd->is_notice);
}
}
int parse_line(char *line, int recursive);
/* Callback notifications for protocol support. */
-typedef void (*chanmsg_func_t) (struct userNode *user, struct chanNode *chan, const char *text, struct userNode *bot);
+typedef void (*chanmsg_func_t) (struct userNode *user, struct chanNode *chan, const char *text, struct userNode *bot, unsigned int is_notice);
void reg_chanmsg_func(unsigned char prefix, struct userNode *service, chanmsg_func_t handler);
void reg_allchanmsg_func(struct userNode *service, chanmsg_func_t handler);
struct userNode *get_chanmsg_bot(unsigned char prefix);