unrealircd- supernets unrealircd source & configuration |
git clone git://git.acid.vegas/unrealircd.git |
Log | Files | Refs | Archive | README | LICENSE |
partmsg.c (1793B)
1 /* 2 * Hide Part/Quit message extended ban (+b ~p:nick!user@host) 3 * (C) Copyright i <info@servx.org> and the UnrealIRCd team 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 1, or (at your option) 8 * any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 */ 19 20 #include "unrealircd.h" 21 22 ModuleHeader MOD_HEADER 23 = { 24 "extbans/partmsg", 25 "4.2", 26 "ExtBan ~p - Ban/exempt Part/Quit message", 27 "UnrealIRCd Team", 28 "unrealircd-6", 29 }; 30 31 int extban_partmsg_is_banned(BanContext *b); 32 33 MOD_INIT() 34 { 35 ExtbanInfo req; 36 37 memset(&req, 0, sizeof(req)); 38 req.letter = 'p'; 39 req.name = "partmsg"; 40 req.is_ok = extban_is_ok_nuh_extban; 41 req.conv_param = extban_conv_param_nuh_or_extban; 42 req.options = EXTBOPT_ACTMODIFIER; 43 req.is_banned = extban_partmsg_is_banned; 44 req.is_banned_events = BANCHK_LEAVE_MSG; 45 if (!ExtbanAdd(modinfo->handle, req)) 46 { 47 config_error("could not register extended ban type"); 48 return MOD_FAILED; 49 } 50 51 MARK_AS_OFFICIAL_MODULE(modinfo); 52 53 return MOD_SUCCESS; 54 } 55 56 /** Called upon module load */ 57 MOD_LOAD() 58 { 59 return MOD_SUCCESS; 60 } 61 62 /** Called upon unload */ 63 MOD_UNLOAD() 64 { 65 return MOD_SUCCESS; 66 } 67 68 int extban_partmsg_is_banned(BanContext *b) 69 { 70 b->msg = NULL; 71 // Uh.. there is no attempt to match.... anything.......? 72 73 return 0; 74 }