From: Juan B. <tu...@us...> - 2004-07-23 13:35:41
|
Update of /cvsroot/solidircd/Solid-dev/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9959/src Modified Files: Tag: Solid-030110 m_gline.c m_shun.c s_serv.c s_user.c Log Message: ---------------------------------------------------------------------- - Permanent glines and shuns are now reported thru /stats G/g/S/s - Fixed bug that didnt "add" glines or shuns properly when set permanent. - G-Lines and Shuns can now be set to be permanent. Committing in . Modified Files: Tag: Solid-030110 CHANGES src/m_gline.c src/m_shun.c src/s_serv.c src/s_user.c ---------------------------------------------------------------------- Index: m_gline.c =================================================================== RCS file: /cvsroot/solidircd/Solid-dev/src/m_gline.c,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.2 diff -C2 -d -r1.2.2.1 -r1.2.2.2 *** m_gline.c 22 Jul 2004 17:21:24 -0000 1.2.2.1 --- m_gline.c 23 Jul 2004 13:35:31 -0000 1.2.2.2 *************** *** 214,218 **** ircsprintf(buffer, "%s (%s)", reason, current_date); ! ban->flags |= (UBAN_GLINE|UBAN_TEMPORARY); ban->reason = (char *) MyMalloc(strlen(buffer) + 1); strcpy(ban->reason, buffer); --- 214,218 ---- ircsprintf(buffer, "%s (%s)", reason, current_date); ! ban->flags |= temporary_gline_time ? (UBAN_GLINE|UBAN_TEMPORARY) : (UBAN_GLINE); ban->reason = (char *) MyMalloc(strlen(buffer) + 1); strcpy(ban->reason, buffer); *************** *** 262,266 **** } ! sendto_realops("%s added gline for [%s@%s] [%s]", parv[0], user, host, reason); sendto_serv_butone(sptr, ":%s GLINE %d %s@%s :%s", --- 262,266 ---- } ! sendto_realops("%s added a permanent gline for [%s@%s] [%s]", parv[0], user, host, reason); sendto_serv_butone(sptr, ":%s GLINE %d %s@%s :%s", *************** *** 361,368 **** reason=(parv[5] ? parv[5] : "<no reason>"); - if(length == 0) - length = (86400 * 7); - - if(timeset + length <= NOW) return 0; --- 361,364 ---- *************** *** 391,395 **** ircsprintf(buffer, "%s", reason); ! ban->flags |= (UBAN_GLINE|UBAN_TEMPORARY); ban->reason = (char *) MyMalloc(strlen(buffer) + 1); strcpy(ban->reason, buffer); --- 387,391 ---- ircsprintf(buffer, "%s", reason); ! ban->flags |= length ? (UBAN_GLINE|UBAN_TEMPORARY) : (UBAN_GLINE); ban->reason = (char *) MyMalloc(strlen(buffer) + 1); strcpy(ban->reason, buffer); Index: s_user.c =================================================================== RCS file: /cvsroot/solidircd/Solid-dev/src/s_user.c,v retrieving revision 1.44 retrieving revision 1.44.2.1 diff -C2 -d -r1.44 -r1.44.2.1 *** s_user.c 17 Jul 2004 03:55:42 -0000 1.44 --- s_user.c 23 Jul 2004 13:35:32 -0000 1.44.2.1 *************** *** 1992,1996 **** else if (IsAdmin(acptr)) strcat(buf, "a \2Server Administrator\2"); ! else if (IsAnOper(acptr)) strcat(buf, "an \2IRC Operator\2"); else if (IsLocOp(acptr)) --- 1992,1996 ---- else if (IsAdmin(acptr)) strcat(buf, "a \2Server Administrator\2"); ! else if (IsOper(acptr)) strcat(buf, "an \2IRC Operator\2"); else if (IsLocOp(acptr)) Index: m_shun.c =================================================================== RCS file: /cvsroot/solidircd/Solid-dev/src/m_shun.c,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** m_shun.c 22 Jul 2004 17:21:24 -0000 1.1.2.1 --- m_shun.c 23 Jul 2004 13:35:31 -0000 1.1.2.2 *************** *** 204,208 **** ircsprintf(buffer, "%s (%s)", reason, current_date); ! ban->flags |= (UBAN_FREEZE|UBAN_TEMPORARY); ban->reason = (char *) MyMalloc(strlen(buffer) + 1); strcpy(ban->reason, buffer); --- 204,208 ---- ircsprintf(buffer, "%s (%s)", reason, current_date); ! ban->flags |= temporary_shun_time ? (UBAN_FREEZE|UBAN_TEMPORARY) : (UBAN_FREEZE); ban->reason = (char *) MyMalloc(strlen(buffer) + 1); strcpy(ban->reason, buffer); *************** *** 255,259 **** sendto_serv_butone(sptr, ":%s SHUN %d %s@%s :%s", parv[0], temporary_shun_time_seconds, user, host, reason); ! sendto_realops("%s added shun for [%s@%s] [%s]", parv[0], user, host, reason); return 0; --- 255,259 ---- sendto_serv_butone(sptr, ":%s SHUN %d %s@%s :%s", parv[0], temporary_shun_time_seconds, user, host, reason); ! sendto_realops("%s added a permanent shun for [%s@%s] [%s]", parv[0], user, host, reason); return 0; *************** *** 365,372 **** reason=(parv[5] ? parv[5] : "<no reason>"); - if(length == 0) - length = (86400 * 7); - - if(timeset + length <= NOW) return 0; --- 365,368 ---- *************** *** 395,399 **** ircsprintf(buffer, "%s", reason); ! ban->flags |= (UBAN_FREEZE|UBAN_TEMPORARY); ban->reason = (char *) MyMalloc(strlen(buffer) + 1); strcpy(ban->reason, buffer); --- 391,395 ---- ircsprintf(buffer, "%s", reason); ! ban->flags |= length ? (UBAN_FREEZE|UBAN_TEMPORARY) : (UBAN_FREEZE); ban->reason = (char *) MyMalloc(strlen(buffer) + 1); strcpy(ban->reason, buffer); Index: s_serv.c =================================================================== RCS file: /cvsroot/solidircd/Solid-dev/src/s_serv.c,v retrieving revision 1.30.2.2 retrieving revision 1.30.2.3 diff -C2 -d -r1.30.2.2 -r1.30.2.3 *** s_serv.c 22 Jul 2004 17:21:24 -0000 1.30.2.2 --- s_serv.c 23 Jul 2004 13:35:31 -0000 1.30.2.3 *************** *** 1958,1966 **** case 's': if(IsAnOper(cptr)) ! report_userbans_match_flags(cptr, UBAN_FREEZE, 0); break; case 'g': ! if(IsAnOper(cptr)) ! report_userbans_match_flags(cptr, UBAN_GLINE, 0); break; case 'M': --- 1958,1972 ---- case 's': if(IsAnOper(cptr)) ! { ! report_userbans_match_flags(cptr, UBAN_FREEZE, 0); ! report_userbans_match_flags(cptr, UBAN_FREEZE, UBAN_TEMPORARY); ! } break; case 'g': ! if(IsAnOper(cptr)) ! { ! report_userbans_match_flags(cptr, UBAN_GLINE, 0); ! report_userbans_match_flags(cptr, UBAN_GLINE, UBAN_TEMPORARY); ! } break; case 'M': |