Update of /cvsroot/solidircd/solidircd-stable/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv32644/src Modified Files: channel.c glines.c ircd.c klines.c m_nick.c m_services.c s_serv.c struct.c userban.c Log Message: compile fixes Index: glines.c =================================================================== RCS file: /cvsroot/solidircd/solidircd-stable/src/glines.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** glines.c 10 Apr 2007 20:13:07 -0000 1.10 --- glines.c 10 Apr 2007 21:16:54 -0000 1.11 *************** *** 608,610 **** return 0; ! } \ No newline at end of file --- 608,610 ---- return 0; ! } Index: s_serv.c =================================================================== RCS file: /cvsroot/solidircd/solidircd-stable/src/s_serv.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** s_serv.c 25 Jun 2006 22:53:01 -0000 1.19 --- s_serv.c 10 Apr 2007 21:16:54 -0000 1.20 *************** *** 1348,1353 **** char *message = parc > 1 ? parv[1] : NULL; ! if (check_registered(sptr)) ! return 0; if (BadPtr(message)) --- 1348,1352 ---- char *message = parc > 1 ? parv[1] : NULL; ! if (BadPtr(message)) *************** *** 3857,3862 **** aClient *acptr; ! if (check_registered(sptr)) ! return 0; if (MyClient(sptr)) { --- 3856,3860 ---- aClient *acptr; ! if (MyClient(sptr)) { *************** *** 3916,3921 **** aClient *acptr; ! if (check_registered(sptr)) ! return 0; if (MyClient(sptr)) { --- 3914,3918 ---- aClient *acptr; ! if (MyClient(sptr)) { *************** *** 4100,4105 **** int longest = strlen(me.name); ! if (check_registered (sptr)) ! return 0; if (!IsAnOper(cptr)) --- 4097,4101 ---- int longest = strlen(me.name); ! if (!IsAnOper(cptr)) *************** *** 4125,4128 **** --- 4121,4161 ---- } + int + m_check(aClient *cptr, aClient *sptr, int parc, char *parv[]) + { + struct simBan *ban; + + if (!IsAnOper(sptr)) + { + sendto_one(sptr, getreply(ERR_NOPRIVILEGES), me.name, parv[0]); + return 0; + } + + if (parc < 3 || mycmp(parv[1], "nick")) + { + sendto_one(sptr, "NOTICE %s :Syntax: CHECK NICK <nickname>", parv[0]); + return 0; + } + + if ((ban = check_mask_simbanned(parv[2], SBAN_NICK))) + { + char *reason = ban->reason ? ban->reason : "<no reason>"; + + if (ban->flags & SBAN_TEMPORARY) + sendto_one(sptr, "NOTICE %s :CHECK NICK: %s [expires in %dm]: %s", + parv[0], ban->mask, + (ban->timeset + ban->duration - NOW) / 60, + reason); + else + sendto_one(sptr, "NOTICE %s :CHECK NICK: %s [permanent]: %s", + parv[0], ban->mask, reason); + } + else + { + sendto_one(sptr, "NOTICE %s :CHECK NICK: no match", parv[0]); + } + + return 0; + } Index: userban.c =================================================================== RCS file: /cvsroot/solidircd/solidircd-stable/src/userban.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** userban.c 10 Apr 2007 20:13:08 -0000 1.13 --- userban.c 10 Apr 2007 21:16:55 -0000 1.14 *************** *** 481,484 **** --- 481,485 ---- if((ban->flags & UBAN_TEMPORARY) && ban->timeset + ban->duration <= NOW) { + /* if (ban->flags & UBAN_SHUN) { *************** *** 495,499 **** } ! remove_userban(ban); --- 496,500 ---- } ! */ remove_userban(ban); Index: m_nick.c =================================================================== RCS file: /cvsroot/solidircd/solidircd-stable/src/m_nick.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** m_nick.c 27 Jun 2005 03:02:22 -0000 1.1.1.1 --- m_nick.c 10 Apr 2007 21:16:54 -0000 1.2 *************** *** 469,484 **** nick, get_client_name(cptr, TRUE)); - if (ban->autocap) - { - time_t maxexp = NOW + ban->autocap; - ban->duration += 5; - if ((ban->timeset + ban->duration) > maxexp) - { - ban->duration = maxexp - ban->timeset; - sendto_realops_lev(REJ_LEV, "Resetting expire time for" - " restricted nick %s on try from %s", - nick, get_client_name(cptr, TRUE)); - } - } return 0; --- 469,472 ---- *************** *** 612,642 **** if (MyConnect(sptr)) { ! if (!IsOper(sptr) && (ban = check_mask_simbanned(nick, SBAN_NICK))) ! { ! sendto_one(sptr, err_str(ERR_ERRONEUSNICKNAME), me.name, ! BadPtr(parv[0]) ? "*" : parv[0], nick, ! BadPtr(ban->reason) ? "Erroneous Nickname" : ! ban->reason); ! sendto_realops_lev(REJ_LEV, ! "Forbidding restricted nick %s from %s.", nick, ! get_client_name(cptr, TRUE)); - if (ban->autocap) - { - time_t maxexp = NOW + ban->autocap; - ban->duration += 5; - if ((ban->timeset + ban->duration) > maxexp) - { - ban->duration = maxexp - ban->timeset; - sendto_realops_lev(REJ_LEV, "Resetting expire time for" - " restricted nick %s on try from %s", - nick, get_client_name(cptr, TRUE)); - } - } - return 0; - } - } - - strcpy(sptr->name, nick); sptr->tsinfo = timeofday; --- 600,620 ---- if (MyConnect(sptr)) { ! if ((ban = check_mask_simbanned(nick, SBAN_NICK))) ! { ! if (MyConnect(sptr) && (!IsServer(cptr)) && (!IsOper(cptr)) ! && (!IsULine(sptr))) ! { ! sendto_one(sptr, err_str(ERR_ERRONEUSNICKNAME), me.name, ! BadPtr(parv[0]) ? "*" : parv[0], nick, ! BadPtr(ban->reason) ? "Erroneous Nickname" : ! ban->reason); ! sendto_realops_lev(REJ_LEV, ! "Forbidding restricted nick %s from %s", nick, ! get_client_name(cptr, FALSE)); ! return 0; ! } ! } ! } strcpy(sptr->name, nick); sptr->tsinfo = timeofday; Index: ircd.c =================================================================== RCS file: /cvsroot/solidircd/solidircd-stable/src/ircd.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ircd.c 10 Apr 2007 18:46:27 -0000 1.10 --- ircd.c 10 Apr 2007 21:16:54 -0000 1.11 *************** *** 659,663 **** char REPORT_DO_DNS[256], REPORT_FIN_DNS[256], REPORT_FIN_DNSC[256], REPORT_FAIL_DNS[256], REPORT_DO_ID[256], REPORT_FIN_ID[256], ! REPORT_FAIL_ID[256], REPORT_REJECT_ID[256]; FILE *dumpfp=NULL; --- 659,663 ---- char REPORT_DO_DNS[256], REPORT_FIN_DNS[256], REPORT_FIN_DNSC[256], REPORT_FAIL_DNS[256], REPORT_DO_ID[256], REPORT_FIN_ID[256], ! REPORT_FAIL_ID[256], REPORT_REJECT_ID[256]; FILE *dumpfp=NULL; Index: channel.c =================================================================== RCS file: /cvsroot/solidircd/solidircd-stable/src/channel.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** channel.c 9 Apr 2007 22:59:07 -0000 1.24 --- channel.c 10 Apr 2007 21:16:54 -0000 1.25 *************** *** 1108,1112 **** chanMember *cm; int ismine; ! if (IsServer(cptr) || IsULine(cptr)) return 0; --- 1108,1112 ---- chanMember *cm; int ismine; ! if (IsServer(cptr) || IsULine(cptr)) return 0; *************** *** 1114,1118 **** cm = find_user_member(chptr->members, cptr); ismine = MyClient(cptr); ! if(!cm) { --- 1114,1118 ---- cm = find_user_member(chptr->members, cptr); ismine = MyClient(cptr); ! if(!cm) { *************** *** 1128,1144 **** return (ERR_NOCTRLSONCHAN); if (is_banned(cptr, chptr, NULL)) ! return (MODE_BAN); ! ! /* * channel is -n and user is not there; * we need to bquiet them if we can ! } */ } else { /* ops and voices can talk through everything except NOCTRL */ ! if (!(cm->flags & (CHFL_CHANOP | CHFL_HALFOP | CHFL_VOICE))) { ! if (chptr->mode.mode & MODE_MODERATED) return (MODE_MODERATED); if (is_banned(cptr, chptr, cm)) --- 1128,1143 ---- return (ERR_NOCTRLSONCHAN); if (is_banned(cptr, chptr, NULL)) ! return (MODE_BAN); /* * channel is -n and user is not there; * we need to bquiet them if we can ! */ ! } } else { /* ops and voices can talk through everything except NOCTRL */ ! if (!(cm->flags & (CHFL_CHANOP | CHFL_HALFOP | CHFL_VOICE))) { ! if (chptr->mode.mode & MODE_MODERATED) return (MODE_MODERATED); if (is_banned(cptr, chptr, cm)) *************** *** 1149,1153 **** /* control code blocking isn't flood-critical, so only check locally */ if (ismine && (chptr->mode.mode & MODE_NOCTRL) && msg_has_ctrls(msg)) - return (ERR_NOCTRLSONCHAN); } --- 1148,1151 ---- *************** *** 1156,1160 **** } - /* Can a user change his nick on this channel? - TheSphere 08/01/04*/ --- 1154,1157 ---- *************** *** 2169,2172 **** --- 2166,2170 ---- break; *mbuf++ = 'j'; + chptr->mode.mode &= ~MODE_JOINRATE; chptr->mode.jr_num = DEFAULT_JOIN_NUM; chptr->mode.jr_time = DEFAULT_JOIN_TIME; *************** *** 5468,5473 **** mc->s_scratch.c++; mc->s_scratch.m += sizeof(parabuf); ! ! return mc->total.m; ! } --- 5466,5469 ---- mc->s_scratch.c++; mc->s_scratch.m += sizeof(parabuf); ! return mc->total.m; } Index: klines.c =================================================================== RCS file: /cvsroot/solidircd/solidircd-stable/src/klines.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** klines.c 10 Apr 2007 20:13:07 -0000 1.5 --- klines.c 10 Apr 2007 21:16:54 -0000 1.6 *************** *** 600,602 **** return 0; ! } \ No newline at end of file --- 600,602 ---- return 0; ! } Index: m_services.c =================================================================== RCS file: /cvsroot/solidircd/solidircd-stable/src/m_services.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** m_services.c 25 Jun 2006 22:53:01 -0000 1.5 --- m_services.c 10 Apr 2007 21:16:54 -0000 1.6 *************** *** 481,485 **** oban->timeset = NOW; oban->duration = length; ! oban->autocap = (*parv[2] == '+') ? length : 0; } } --- 481,485 ---- oban->timeset = NOW; oban->duration = length; ! } } *************** *** 490,495 **** ban->timeset = NOW; ban->duration = length; - if (*parv[2] == '+') - ban->autocap = length; add_simban(ban); } --- 490,493 ---- Index: struct.c =================================================================== RCS file: /cvsroot/solidircd/solidircd-stable/src/struct.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** struct.c 9 Jul 2005 01:22:50 -0000 1.3 --- struct.c 10 Apr 2007 21:16:54 -0000 1.4 *************** *** 485,496 **** return chptr->chname; } - - int ch_join_start(aChannel *chptr) - { - return chptr->join_start; - } - - int ch_join_count(aChannel *chptr) - { - return chptr->join_count; - } --- 485,486 ---- |