[srvx-commits] CVS: services/src gline.c,1.38,1.39 opserv.c,1.346,1.347
Brought to you by:
entrope
From: Entrope <en...@us...> - 2003-10-20 17:24:14
|
Update of /cvsroot/srvx/services/src In directory sc8-pr-cvs1:/tmp/cvs-serv15326/src Modified Files: gline.c opserv.c Log Message: allow glines for local channels take OpServ out of bad-word channels when they are addexempt'ed or delbad'ed Index: gline.c =================================================================== RCS file: /cvsroot/srvx/services/src/gline.c,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -r1.38 -r1.39 *** gline.c 12 Oct 2003 19:39:59 -0000 1.38 --- gline.c 20 Oct 2003 16:56:54 -0000 1.39 *************** *** 165,169 **** return res; /* Stock ircu requires BADCHANs to match exactly. */ ! if (target[0] == '#') return NULL; else { --- 165,169 ---- return res; /* Stock ircu requires BADCHANs to match exactly. */ ! if ((target[0] == '#') || (target[0] == '&')) return NULL; else { Index: opserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/opserv.c,v retrieving revision 1.346 retrieving revision 1.347 diff -C2 -r1.346 -r1.347 *** opserv.c 12 Oct 2003 19:39:59 -0000 1.346 --- opserv.c 20 Oct 2003 16:56:55 -0000 1.347 *************** *** 797,805 **** reason = unsplit_string(argv+3, argc-3, NULL); ! if (!is_gline(argv[1]) && !IsChannelName(argv[1])) { opserv_notice(user, MSG_INVALID_GLINE, argv[1]); return 0; } ! if (!argv[1][strspn(argv[1], "#*?@.")] && (strlen(argv[1]) < 10)) { opserv_notice(user, OSMSG_STUPID_GLINE, argv[1]); return 0; --- 797,805 ---- reason = unsplit_string(argv+3, argc-3, NULL); ! if (!is_gline(argv[1]) && !IsChannelName(argv[1]) && (argv[1][0] != '&')) { opserv_notice(user, MSG_INVALID_GLINE, argv[1]); return 0; } ! if (!argv[1][strspn(argv[1], "#&*?@.")] && (strlen(argv[1]) < 10)) { opserv_notice(user, OSMSG_STUPID_GLINE, argv[1]); return 0; *************** *** 1975,1980 **** channel = iter_data(it); if (irccasestr(channel->name, argv[1]) ! && !opserv_bad_channel(channel->name)) channel->bad_channel = 0; } opserv_notice(user, OSMSG_REMOVED_BAD, argv[1]); --- 1975,1983 ---- channel = iter_data(it); if (irccasestr(channel->name, argv[1]) ! && !opserv_bad_channel(channel->name)) { ! DelChannelUser(opserv, channel, "Channel name no longer contains a bad word.", 1); ! timeq_del(0, opserv_part_channel, channel, TIMEQ_IGNORE_WHEN); channel->bad_channel = 0; + } } opserv_notice(user, OSMSG_REMOVED_BAD, argv[1]); *************** *** 1999,2004 **** dict_insert(opserv_exempt_channels, strdup(chanName), NULL); channel = GetChannel(chanName); ! if (channel) channel->bad_channel = 0; reply(OSMSG_ADDED_EXEMPTION, chanName); return 1; --- 2002,2012 ---- dict_insert(opserv_exempt_channels, strdup(chanName), NULL); channel = GetChannel(chanName); ! if (channel) { ! if (channel->bad_channel) { ! DelChannelUser(opserv, channel, "Channel is now exempt from bad-word checking.", 1); ! timeq_del(0, opserv_part_channel, channel, TIMEQ_IGNORE_WHEN); ! } channel->bad_channel = 0; + } reply(OSMSG_ADDED_EXEMPTION, chanName); return 1; *************** *** 2045,2049 **** th->expires = expires; dict_insert(opserv_trusted_hosts, th->ipaddr, th); ! if (th->expires) timeq_add(th->expires, opserv_expire_trusted_host, th); } --- 2053,2058 ---- th->expires = expires; dict_insert(opserv_trusted_hosts, th->ipaddr, th); ! if (th->expires) ! timeq_add(th->expires, opserv_expire_trusted_host, th); } |