X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/b212d7134452d695ce63aacfc79a1166df429808..f3439650c08a82af4271c364ac79b5b091799e5b:/modules/chm_noctcp.c diff --git a/modules/chm_noctcp.c b/modules/chm_noctcp.c index f23f18a5..43ad602d 100644 --- a/modules/chm_noctcp.c +++ b/modules/chm_noctcp.c @@ -1,5 +1,5 @@ /* - * charybdis: an advanced ircd. + * Solanum: a slightly advanced ircd * chm_noctcp: block non-action CTCP (+C mode). * * Copyright (c) 2012 William Pitcock @@ -34,6 +34,9 @@ #include "chmode.h" #include "inline/stringops.h" +static const char chm_noctcp_desc[] = + "Adds channel mode +C, which blocks CTCP messages from a channel (except ACTION)"; + static unsigned int mode_noctcp; static void chm_noctcp_process(hook_data_privmsg_channel *); @@ -43,9 +46,6 @@ mapi_hfn_list_av1 chm_noctcp_hfnlist[] = { { NULL, NULL } }; -static const char chm_noctcp_desc[] = - "Adds channel mode +C, which blocks CTCP messages from a channel (except ACTION)"; - static void chm_noctcp_process(hook_data_privmsg_channel *data) { @@ -53,7 +53,7 @@ chm_noctcp_process(hook_data_privmsg_channel *data) if (data->approved || data->msgtype == MESSAGE_TYPE_NOTICE) return; - if (*data->text == '\001' && strncasecmp(data->text + 1, "ACTION ", 7) && data->chptr->mode.mode & mode_noctcp) + if (*data->text == '\001' && rb_strncasecmp(data->text + 1, "ACTION ", 7) && data->chptr->mode.mode & mode_noctcp) { sendto_one_numeric(data->source_p, ERR_CANNOTSENDTOCHAN, form_str(ERR_CANNOTSENDTOCHAN), data->chptr->chname); data->approved = ERR_CANNOTSENDTOCHAN;