From: Gabriel B. <sh...@us...> - 2005-12-04 08:43:27
|
Update of /cvsroot/solidircd/solidircd-stable/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3445/src Modified Files: s_err.c s_serv.c s_user.c Log Message: added rehash to clean up temp glines. Index: s_user.c =================================================================== RCS file: /cvsroot/solidircd/solidircd-stable/src/s_user.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** s_user.c 4 Dec 2005 07:39:03 -0000 1.15 --- s_user.c 4 Dec 2005 08:43:13 -0000 1.16 *************** *** 1315,1318 **** --- 1315,1320 ---- "htm", "zip", + "rar", + "sit", NULL }; *************** *** 2965,2970 **** #endif #ifdef ALL_OPERS_HIDDEN ! sptr->umode |= UMODE_W; ! sendto_serv_butone(cptr, ":%s MODE %s :+W", parv[0], parv[0]); #endif Count.oper++; --- 2967,2972 ---- #endif #ifdef ALL_OPERS_HIDDEN ! sptr->umode |= UMODE_H; ! sendto_serv_butone(cptr, ":%s MODE %s :+H", parv[0], parv[0]); #endif Count.oper++; Index: s_err.c =================================================================== RCS file: /cvsroot/solidircd/solidircd-stable/src/s_err.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** s_err.c 27 Jun 2005 03:02:04 -0000 1.1.1.1 --- s_err.c 4 Dec 2005 08:43:13 -0000 1.2 *************** *** 350,354 **** /* 318 RPL_ENDOFWHOIS */ ":%s 318 %s %s :End of /WHOIS list.", /* 319 RPL_WHOISCHANNELS */ ":%s 319 %s %s :%s", ! /* 320 RPL_WHOISMODES */ ":%s 320 %s %s is using umodes [%s]", /* 321 RPL_LISTSTART */ ":%s 321 %s Channel :Users Name", /* 322 RPL_LIST */ ":%s 322 %s %s %d :%s", --- 350,354 ---- /* 318 RPL_ENDOFWHOIS */ ":%s 318 %s %s :End of /WHOIS list.", /* 319 RPL_WHOISCHANNELS */ ":%s 319 %s %s :%s", ! /* 320 RPL_WHOISMODES */ ":%s 320 %s %s is using modes [%s]", /* 321 RPL_LISTSTART */ ":%s 321 %s Channel :Users Name", /* 322 RPL_LIST */ ":%s 322 %s %s %d :%s", Index: s_serv.c =================================================================== RCS file: /cvsroot/solidircd/solidircd-stable/src/s_serv.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** s_serv.c 4 Dec 2005 07:39:03 -0000 1.10 --- s_serv.c 4 Dec 2005 08:43:13 -0000 1.11 *************** *** 93,96 **** --- 93,97 ---- /* Shadowfax's lockfile code */ void do_pending_klines(void); + void do_pending_glines(void); struct pkl *************** *** 103,106 **** --- 104,117 ---- time_t pending_kline_time = 0; + + struct pgl + { + char *comment; /* Kline Comment */ + char *gline; /* Actual Kline */ + struct pgl *next; /* Next Pending Kline */ + } *pending_glines = NULL; + + gtime_t pending_gline_time = 0; + #endif /* LOCKFILE */ *************** *** 2479,2483 **** struct userBan *ban, *oban; #if defined (LOCKFILE) ! struct pkl *k; #else int out; --- 2490,2494 ---- struct userBan *ban, *oban; #if defined (LOCKFILE) ! struct pgl *g; #else int out; *************** *** 2527,2531 **** temporary_gline_time_seconds = ! (time_t) temporary_gline_time *(time_t) 60; /* turn it into minutes */ --- 2538,2542 ---- temporary_gline_time_seconds = ! (gtime_t) temporary_gline_time *(gtime_t) 60; /* turn it into minutes */ *************** *** 2606,2613 **** argv = parv[2]; ! #ifdef DEFAULT_KLINE_TIME if (time_specified == 0) { ! temporary_gline_time = DEFAULT_KLINE_TIME; temporary_gline_time_seconds = (time_t) temporary_gline_time *(time_t) 60; --- 2617,2624 ---- argv = parv[2]; ! #ifdef DEFAULT_GLINE_TIME if (time_specified == 0) { ! temporary_gline_time = DEFAULT_GLINE_TIME; temporary_gline_time_seconds = (time_t) temporary_gline_time *(time_t) 60; *************** *** 2671,2675 **** } ! current_date = smalldate((time_t) 0); ircsprintf(buffer, "%s (%s)", reason, current_date); --- 2682,2686 ---- } ! current_date = smalldate((gtime_t) 0); ircsprintf(buffer, "%s (%s)", reason, current_date); *************** *** 2721,2725 **** #if defined(LOCKFILE) ! if ((k = (struct pkl *) malloc(sizeof(struct pkl))) == NULL) { sendto_one(sptr, ":%s NOTICE %s :Problem allocating memory", --- 2732,2736 ---- #if defined(LOCKFILE) ! if ((g = (struct pgl *) malloc(sizeof(struct pgl))) == NULL) { sendto_one(sptr, ":%s NOTICE %s :Problem allocating memory", *************** *** 2733,2737 **** sptr->user->host, user, host, current_date); ! if ((k->comment = strdup(buffer)) == NULL) { free(k); --- 2744,2748 ---- sptr->user->host, user, host, current_date); ! if ((g->comment = strdup(buffer)) == NULL) { free(k); *************** *** 2747,2751 **** user, host, reason); ! if ((k->kline = strdup(buffer)) == NULL) { free(k->comment); --- 2758,2762 ---- user, host, reason); ! if ((g->gline = strdup(buffer)) == NULL) { free(k->comment); *************** *** 2755,2760 **** return (0); } ! k->next = pending_glines; ! pending_glines = k; do_pending_glines(); --- 2766,2771 ---- return (0); } ! g->next = pending_glines; ! pending_glines = g; do_pending_glines(); *************** *** 2933,2936 **** --- 2944,2958 ---- return 0; } + /* Rehash & remove Temporary Glines - Sheik 03-DEC-2005 */ + + else if (mycmp(parv[1], "TGLINES") == 0) + { + sendto_one(sptr, rpl_str(RPL_REHASHING), me.name, parv[0], + "temp glines"); + remove_userbans_match_flags(UBAN_GLINE|UBAN_TEMPORARY, 0); + sendto_ops("%s is clearing temp glines while whistling innocently", + parv[0]); + return 0; + } else if (mycmp(parv[1], "GC") == 0) { |