[READ-ONLY] Mirror of https://github.com/VibeDevelopers/Comet.
0

Configure Feed

Select the types of activity you want to include in your feed.

Added extension extensions/chm_nobot.c.

Behavior:
- Provides channel mode +B
- When loaded, channel ops can set /MODE #channel +B
- Users with usermode +B / IsBot() cannot join channels with cmode +B
- Reject message: Cannot join channel (+B) - bots are not permitted

Also updated:
- extensions/meson.build
- extensions/Makefile.am
- doc/reference.conf loadmodule list
- help/users/cmode
- help/opers/cmode

TwinUsers (Jul 17, 2026, 3:49 PM +0100) 5d755b46 49b87f86

+85
+2
doc/reference.conf
··· 52 52 * Channel mode +-A (admin only) -- chm_adminonly 53 53 * Channel mode +-U (allow non-SSL users to join) -- chm_insecure 54 54 * Channel mode +-T (blocks notices) -- chm_nonotice 55 + * Channel mode +-B (blocks usermode +B bots) -- chm_nobot 55 56 * Channel mode +-O (oper only) -- chm_operonly 56 57 * Channel mode +-M (disallow KICK on IRC ops) -- chm_operpeace 57 58 * Channel mode +-R (only regged users can speak) -- chm_regmsg ··· 115 116 #loadmodule "extensions/chm_adminonly"; 116 117 #loadmodule "extensions/chm_insecure"; 117 118 #loadmodule "extensions/chm_nonotice"; 119 + #loadmodule "extensions/chm_nobot"; 118 120 #loadmodule "extensions/chm_operonly"; 119 121 #loadmodule "extensions/chm_operpeace"; 120 122 #loadmodule "extensions/chm_regmsg";
+1
extensions/Makefile.am
··· 13 13 chm_operonly.la \ 14 14 chm_insecure.la \ 15 15 chm_nonotice.la \ 16 + chm_nobot.la \ 16 17 chm_operpeace.la \ 17 18 chm_regmsg.la \ 18 19 chm_sslonly.la \
+78
extensions/chm_nobot.c
··· 1 + /* 2 + * Comet: a slightly advanced ircd 3 + * chm_nonotice: block NOTICEs (+T mode). 4 + * 5 + * Copyright (c) 2012 Ariadne Conill <ariadne@dereferenced.org> 6 + * 7 + * Permission to use, copy, modify, and/or distribute this software for any 8 + * purpose with or without fee is hereby granted, provided that the above 9 + * copyright notice and this permission notice is present in all copies. 10 + * 11 + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 12 + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 13 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 14 + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 15 + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 16 + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 17 + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 18 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 19 + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 20 + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 21 + * POSSIBILITY OF SUCH DAMAGE. 22 + */ 23 + 24 + #include "stdinc.h" 25 + #include "modules.h" 26 + #include "hook.h" 27 + #include "client.h" 28 + #include "ircd.h" 29 + #include "send.h" 30 + #include "numeric.h" 31 + #include "chmode.h" 32 + 33 + static const char chm_nobot_desc[] = 34 + "Adds channel mode +B which prevents users with umode +B from joining"; 35 + 36 + static void h_can_join(void *); 37 + 38 + mapi_hfn_list_av1 nobot_hfnlist[] = { 39 + { "can_join", h_can_join }, 40 + { NULL, NULL } 41 + }; 42 + 43 + static unsigned int mymode; 44 + 45 + static int 46 + _modinit(void) 47 + { 48 + mymode = cflag_add('B', chm_simple); 49 + if (mymode == 0) 50 + return -1; 51 + 52 + return 0; 53 + } 54 + 55 + static void 56 + _moddeinit(void) 57 + { 58 + cflag_orphan('B'); 59 + } 60 + 61 + DECLARE_MODULE_AV2(chm_nobot, _modinit, _moddeinit, NULL, NULL, nobot_hfnlist, NULL, NULL, chm_nobot_desc); 62 + 63 + static void 64 + h_can_join(void *data_) 65 + { 66 + hook_data_channel *data = data_; 67 + struct Client *source_p = data->client; 68 + struct Channel *chptr = data->chptr; 69 + 70 + if(data->approved != 0) 71 + return; 72 + 73 + if((chptr->mode.mode & mymode) && IsBot(source_p)) 74 + { 75 + sendto_one_numeric(source_p, 474, "%s :Cannot join channel (+B) - bots are not permitted", chptr->chname); 76 + data->approved = ERR_CUSTOM; 77 + } 78 + }
+1
extensions/meson.build
··· 6 6 'chm_operonly', 7 7 'chm_insecure', 8 8 'chm_nonotice', 9 + 'chm_nobot', 9 10 'chm_operpeace', 10 11 'chm_regmsg', 11 12 'chm_sslonly',
+1
help/opers/cmode
··· 38 38 (however, new forwards can still be set subject to +F). 39 39 +C - Disable CTCP. All CTCP messages to the channel, except ACTION, 40 40 are disallowed. 41 + ? +B - Users marked as bots with user mode +B may not join. 41 42 ? +O - IRC Operator only channel. 42 43 ? +M - IRC Operators can not be kicked. Only settable by opers. Only 43 44 viewable by opers.
+1
help/users/cmode
··· 36 36 (however, new forwards can still be set subject to +F). 37 37 +C - Disable CTCP. All CTCP messages to the channel, except ACTION, 38 38 are disallowed. 39 + ? +B - Users marked as bots with user mode +B may not join. 39 40 ? +O - IRC Operator only channel. 40 41 ? +A - IRC server administrator only channel. 41 42 ? +T - No NOTICEs allowed in the channel.
+1
ircd/supported.c
··· 339 339 add_isupport("MAXNICKLEN", isupport_intptr, &maxnicklen); 340 340 add_isupport("CHANNELLEN", isupport_intptr, &channellen); 341 341 add_isupport("TOPICLEN", isupport_intptr, &topiclen); 342 + add_isupport("BOT", isupport_umode, "B"); 342 343 add_isupport("DEAF", isupport_umode, "D"); 343 344 add_isupport("TARGMAX", isupport_targmax, NULL); 344 345 add_isupport("EXTBAN", isupport_extban, NULL);