From: Juan B. <tu...@us...> - 2005-12-26 05:21:50
|
Update of /cvsroot/solidircd/solidircd-stable/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29183/src Modified Files: glines.c ircd.c m_server.c m_shun.c s_conf.c s_serv.c s_user.c toys.c userban.c Log Message: Read CHANGES log Index: toys.c =================================================================== RCS file: /cvsroot/solidircd/solidircd-stable/src/toys.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** toys.c 4 Sep 2005 06:31:10 -0000 1.2 --- toys.c 26 Dec 2005 05:21:38 -0000 1.3 *************** *** 102,106 **** short *next_state_p; ! old_text = LowerAll(old_text); len = strlen(old_text); curr_state = 0; --- 102,106 ---- short *next_state_p; ! old_text = LowerAll(old_text); len = strlen(old_text); curr_state = 0; *************** *** 116,120 **** *next_state_p = curr_state = next_free_state++; } - DupString(state[curr_state].replacement, new_text); } --- 116,119 ---- *************** *** 125,133 **** char *old_frag, *last_replacement, *add_frag, *temp; int curr_state, old_frag_len, add_frag_len; ! int last_replacement_len=0; ! old_text = LowerAll(old_text); chars_left--; /* Leave space for null terminator */ ! temp = new_text; --- 124,131 ---- char *old_frag, *last_replacement, *add_frag, *temp; int curr_state, old_frag_len, add_frag_len; ! int last_replacement_len=0; old_text = LowerAll(old_text); chars_left--; /* Leave space for null terminator */ ! temp = new_text; *************** *** 137,141 **** curr_state = 0; last_replacement = 0; - do { curr_state = state[curr_state].next_state[*old_frag++ & 0x7f]; --- 135,138 ---- *************** *** 178,182 **** next_free_state = 1; #ifdef CHECK ! printf("states used: %d\n", next_free_state); #endif } --- 175,179 ---- next_free_state = 1; #ifdef CHECK ! fprintf(stderr, "states used: %d\n", next_free_state); #endif } *************** *** 305,316 **** * End ELMER routines *****************************************/ ! #ifdef CHECK ! void main(void) { ! char buffer[256], buffer2[256]; ! init_chef(); ! printf("Text: "); ! gets(buffer); ! encode_chef(buffer, buffer2, 256); ! printf("Translation: %s\n",buffer2); ! } ! #endif --- 302,304 ---- * End ELMER routines *****************************************/ ! Index: s_conf.c =================================================================== RCS file: /cvsroot/solidircd/solidircd-stable/src/s_conf.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** s_conf.c 4 Dec 2005 07:14:07 -0000 1.10 --- s_conf.c 26 Dec 2005 05:21:38 -0000 1.11 *************** *** 86,89 **** --- 86,92 ---- extern void confparse_error(char *, int); extern int klinestore_init(int); + #ifdef TOYS + extern void init_chef(); + #endif /* initclass() *************** *** 1491,1498 **** cVar *tmp; struct userBan *ban; ! int i, c = 0; char *ub_u = NULL, *ub_r = NULL, *host = NULL; - char fbuf[512]; - aClient *ub_acptr; for(tmp = vars[c]; tmp; tmp = vars[++c]) --- 1494,1499 ---- cVar *tmp; struct userBan *ban; ! int c = 0; char *ub_u = NULL, *ub_r = NULL, *host = NULL; for(tmp = vars[c]; tmp; tmp = vars[++c]) *************** *** 2346,2350 **** initclass(); new_confopts = 0; ! if(initconf(configfile) == -1) { --- 2347,2353 ---- initclass(); new_confopts = 0; ! #ifdef TOYS ! init_chef(); /* For now */ ! #endif if(initconf(configfile) == -1) { Index: s_user.c =================================================================== RCS file: /cvsroot/solidircd/solidircd-stable/src/s_user.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** s_user.c 4 Dec 2005 08:43:13 -0000 1.16 --- s_user.c 26 Dec 2005 05:21:38 -0000 1.17 *************** *** 943,961 **** char *reason, *ktype; ! int local; ! ! char *gtype; ! int global; ! ! global = (ban->flags & UBAN_GLINE) ? 1 : 0; ! gtype = global ? NETWORK_GLINE_NAME : NETWORK_GLINNED_NAME; ! reason = ban->reason ? ban->reason : gtype; ! ! ! local = (ban->flags & UBAN_LOCAL) ? 1 : 0; ! ktype = local ? LOCAL_BANNED_NAME : NETWORK_BANNED_NAME; ! reason = ban->reason ? ban->reason : ktype; ! sendto_one(sptr, err_str(ERR_YOUREBANNEDCREEP), me.name, --- 943,953 ---- char *reason, *ktype; ! int local = (ban->flags & UBAN_LOCAL) ? 1 : 0; ! if (ban->flags & UBAN_GLINE) ! ktype = NETWORK_GLINNED_NAME; ! else ! ktype = local ? LOCAL_BANNED_NAME : NETWORK_BANNED_NAME; ! reason = ban->reason ? ban->reason : ktype; sendto_one(sptr, err_str(ERR_YOUREBANNEDCREEP), me.name, *************** *** 1709,1712 **** --- 1701,1705 ---- { char silly_buffer[BUFSIZE]; + switch (sptr->user->special) { Index: glines.c =================================================================== RCS file: /cvsroot/solidircd/solidircd-stable/src/glines.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** glines.c 4 Dec 2005 07:14:07 -0000 1.1 --- glines.c 26 Dec 2005 05:21:38 -0000 1.2 *************** *** 86,90 **** struct userBan *existing; ! if (!OPCanGline(sptr)) { sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]); --- 86,90 ---- struct userBan *existing; ! if (!IsPrivileged(sptr)) { sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]); *************** *** 163,167 **** /* only looks for duplicate glines, not akills */ if ((existing = find_userban_exact(ban, UBAN_GLINE))) ! { sendto_one(sptr, ":%s NOTICE %s :gline: %s@%s is already %s: %s", me.name, parv[0], user, host, NETWORK_GLINE_NAME, --- 163,168 ---- /* only looks for duplicate glines, not akills */ if ((existing = find_userban_exact(ban, UBAN_GLINE))) ! { ! if (!IsServer(sptr)) sendto_one(sptr, ":%s NOTICE %s :gline: %s@%s is already %s: %s", me.name, parv[0], user, host, NETWORK_GLINE_NAME, *************** *** 171,175 **** } ! if (user_match_ban(sptr, ban)) { sendto_one(sptr, ":%s NOTICE %s :gline: %s@%s matches you, rejected", --- 172,176 ---- } ! if (MyClient(sptr) && user_match_ban(sptr, ban)) { sendto_one(sptr, ":%s NOTICE %s :gline: %s@%s matches you, rejected", *************** *** 178,183 **** return 0; } - ircsnprintf(rbuf, sizeof(rbuf), "%s (%s)", reason, smalldate(0)); ban->reason = MyMalloc(strlen(rbuf) + 1); strcpy(ban->reason, rbuf); --- 179,188 ---- return 0; } + + if (!IsServer(sptr)) + ircsnprintf(rbuf, sizeof(rbuf), "%s (%s)", reason, smalldate(0)); + else + ircsnprintf(rbuf, sizeof(rbuf), "%s", reason); ban->reason = MyMalloc(strlen(rbuf) + 1); strcpy(ban->reason, rbuf); *************** *** 198,201 **** --- 203,208 ---- host = get_userban_host(ban, rbuf, sizeof(rbuf)); + + sendto_serv_butone(MyConnect(sptr) ? NULL : cptr, ":%s GLINE %l %s@%s :%s", sptr->name, tgseconds, user, host, reason); if (tgminutes) *************** *** 225,229 **** struct userBan *existing; ! if (!OPCanUNGline(sptr)) { sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]); --- 232,236 ---- struct userBan *existing; ! if (!IsPrivileged(sptr)) { sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]); *************** *** 270,274 **** if (existing->flags & UBAN_CONF) { ! sendto_one(sptr, ":%s NOTICE %s :UNGline: %s@%s is specified in the" " configuration file and cannot be removed online", me.name, parv[0], user, host); --- 277,281 ---- if (existing->flags & UBAN_CONF) { ! sendto_one(sptr, ":%s NOTICE %s :UNGLINE: %s@%s is specified in the" " configuration file and cannot be removed online", me.name, parv[0], user, host); *************** *** 280,285 **** userban_free(existing); ! sendto_ops("%s has removed the G-Line for: [%s@%s]", parv[0], user, host); ! return 0; } --- 287,292 ---- userban_free(existing); ! sendto_ops("%s has removed the G-Line for: [%s@%s]", sptr->name, user, host); ! sendto_serv_butone(MyConnect(sptr) ? NULL : cptr, ":%s UNGLINE %s@%s", sptr->name, user, host); return 0; } Index: m_server.c =================================================================== RCS file: /cvsroot/solidircd/solidircd-stable/src/m_server.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** m_server.c 4 Dec 2005 15:13:20 -0000 1.5 --- m_server.c 26 Dec 2005 05:21:38 -0000 1.6 *************** *** 235,243 **** send_simbans(cptr, SBAN_GCOS|SBAN_NETWORK); - /* We need to send our gline list when we link! - - send_glines(cptr, UBAN_GLINE); - - */ /* Send out fake server list and other 'fake' stuff */ fakeserver_sendserver(cptr); --- 235,238 ---- *************** *** 290,293 **** --- 285,289 ---- sendnick_TS(cptr, acptr); } + sync_lists(cptr); /* Send out shuns and g-lines */ } Index: s_serv.c =================================================================== RCS file: /cvsroot/solidircd/solidircd-stable/src/s_serv.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** s_serv.c 4 Dec 2005 16:22:15 -0000 1.13 --- s_serv.c 26 Dec 2005 05:21:38 -0000 1.14 *************** *** 2485,2923 **** #endif /* UNKLINE */ - #if 0 - int m_gline(aClient *cptr, aClient *sptr, int parc, char *parv[]) - { - struct userBan *ban, *oban; - #if defined (LOCKFILE) - struct pgl *g; - #else - int out; - #endif - - char buffer[1024]; - - char *filename; /* filename to use for kline */ - char *user, *host; - char *reason; - char *current_date; - aClient *acptr; - char tempuser[USERLEN + 2]; - char temphost[HOSTLEN + 1]; - int temporary_gline_time = 0; /* -Dianora */ - time_t temporary_gline_time_seconds = 0; - int time_specified = 0; - char *argv; - int i; - char fbuf[512]; - - if (!MyClient(sptr) || !IsAnOper(sptr) || !OPCanGline(sptr)) - { - sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]); - return 0; - } - - if (parc < 2) - { - sendto_one(sptr, err_str(ERR_NEEDMOREPARAMS), - me.name, parv[0], "GLINE"); - return 0; - } - - argv = parv[1]; - - if ((temporary_gline_time = isnumber(argv)) >= 0) - { - if (parc < 3) - { - sendto_one(sptr, err_str(ERR_NEEDMOREPARAMS), - me.name, parv[0], "GLINE"); - return 0; - } - if (temporary_gline_time > (24 * 60 * 7)) - temporary_gline_time = (24 * 60 * 7); /* Max it at 1 week */ - - temporary_gline_time_seconds = - (gtime_t) temporary_gline_time *(gtime_t) 60; - - /* turn it into minutes */ - argv = parv[2]; - parc--; - time_specified = 1; - } - else - { - temporary_gline_time = 0; /* -1 minute klines are bad... :) - lucas */ - } - - if(strchr(argv, ' ')) - { - sendto_one(sptr, ":%s NOTICE %s :Poorly formatted hostname " - "(contains spaces). Be sure you are using the form: " - "/quote GLINE [time] <user@host/nick> :<reason>", - me.name, parv[0]); - return 0; - } - - - if ((host = strchr(argv, '@')) || *argv == '*') - { - /* Explicit user@host mask given */ - - if (host) /* Found user@host */ - { - user = argv; /* here is user part */ - *(host++) = '\0'; /* and now here is host */ - } - else - { - user = "*"; /* no @ found, assume its *@somehost */ - host = argv; - } - - if (!*host) /* duh. no host found, assume its '*' host */ - host = "*"; - strncpyzt(tempuser, user, USERLEN + 2); /* allow for '*' in front */ - strncpyzt(temphost, host, HOSTLEN); - user = tempuser; - host = temphost; - } - else - { - /* Try to find user@host mask from nick */ - - if (!(acptr = find_chasing(sptr, argv, NULL))) - return 0; - - if (!acptr->user) - return 0; - - if (IsServer(acptr)) - { - sendto_one(sptr, ":%s NOTICE %s :Can't GLINE a server, use @'s " - "where appropriate", me.name, parv[0]); - return 0; - } - /* - * turn the "user" bit into "*user", blow away '~' if found in - * original user name (non-idented) - */ - - tempuser[0] = '*'; - if (*acptr->user->username == '~') - strcpy(tempuser + 1, (char *) acptr->user->username + 1); - else - strcpy(tempuser + 1, acptr->user->username); - user = tempuser; - host = cluster(acptr->user->host); - } - - if (time_specified) - argv = parv[3]; - else - 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; - } - #endif - - if (parc > 2) - { - if (*argv) - reason = argv; - else - reason = "No reason"; - } - else - reason = "No reason"; - - if (!match(user, "akjhfkahfasfjd") && - !match(host, "ldksjfl.kss...kdjfd.jfklsjf")) - { - sendto_one(sptr, ":%s NOTICE %s :Can't G-Line *@*", me.name, - parv[0]); - return 0; - } - - /* we can put whatever we want in temp K: lines */ - if (temporary_gline_time == 0 && strchr(reason, ':')) - { - sendto_one(sptr, - ":%s NOTICE %s :Invalid character ':' in comment", - me.name, parv[0]); - return 0; - } - - if (temporary_gline_time == 0 && strchr(reason, '#')) - { - sendto_one(sptr, - ":%s NOTICE %s :Invalid character '#' in comment", - me.name, parv[0]); - return 0; - } - - ban = make_hostbased_ban(user, host); - if(!ban) - { - sendto_one(sptr, ":%s NOTICE %s :Malformed ban %s@%s", me.name, parv[0], - user, host); - return 0; - } - - if ((oban = find_userban_exact(ban, 0))) - { - char *gtype = (oban->flags & UBAN_GLINE) ? - NETWORK_GLINE_NAME : NETWORK_GLINNED_NAME; - - sendto_one(sptr, ":%s NOTICE %s :[%s@%s] already %s for %s", - me.name, parv[0], user, host, gtype, - oban->reason ? oban->reason : "<No Reason>"); - - userban_free(ban); - return 0; - } - - current_date = smalldate((gtime_t) 0); - ircsprintf(buffer, "%s (%s)", reason, current_date); - - ban->flags |= UBAN_GLINE; - ban->reason = (char *) MyMalloc(strlen(buffer) + 1); - strcpy(ban->reason, buffer); - - if (temporary_gline_time) - { - ban->flags |= UBAN_TEMPORARY; - ban->timeset = timeofday; - ban->duration = temporary_gline_time_seconds; - } - - if(user_match_ban(sptr, ban)) - { - sendto_one(sptr, ":%s NOTICE %s :You attempted to add a ban [%s@%s]" - " which would affect yourself. Aborted.", - me.name, parv[0], user, host); - userban_free(ban); - return 0; - } - - add_hostbased_userban(ban); - - /* Check local users against it */ - - userban_sweep(ban); - - host = get_userban_host(ban, fbuf, 512); - - if(temporary_gline_time) - { - sendto_realops("%s added temporary %d min. "NETWORK_GLINE_NAME" for" - " [%s@%s] [%s]", parv[0], temporary_gline_time, user, - host, reason); - return 0; - } - - /* from here on, we're dealing with a perm gline */ - - filename = configfile; - - sendto_one(sptr, ":%s NOTICE %s :Added G-Line [%s@%s] to server " - "configfile", me.name, parv[0], user, host); - - // We need to send glines information to servers ? -Sheik - sendto_serv_butone(cptr, ":%s GLINE %s@%s %l :%s", parv[0], user, host, reason); - - sendto_realops("%s added G-Line for [%s@%s] [%s]", - parv[0], user, host, reason); - - - #if defined(LOCKFILE) - if ((g = (struct pgl *) malloc(sizeof(struct pgl))) == NULL) - { - sendto_one(sptr, ":%s NOTICE %s :Problem allocating memory", - me.name, parv[0]); - return (0); - } - - ircsprintf(buffer, "/* %s!%s@%s Added kill for: %s@%s\n" - " * at %s */\n", - sptr->name, sptr->user->username, - sptr->user->host, user, host, current_date); - - if ((g->comment = strdup(buffer)) == NULL) - { - free(k); - sendto_one(sptr, ":%s NOTICE %s :Problem allocating memory", - me.name, parv[0]); - return (0); - } - - ircsprintf(buffer, "kill {\n" - " mask \"%s@%s\";\n" - " reason \"%s\";\n" - "};\n\n", - user, host, reason); - - if ((g->gline = strdup(buffer)) == NULL) - { - free(k->comment); - free(k); - sendto_one(sptr, ":%s NOTICE %s :Problem allocating memory", - me.name, parv[0]); - return (0); - } - g->next = pending_glines; - pending_glines = g; - - do_pending_glines(); - return (0); - - #else /* LOCKFILE - MDP */ - - if ((out = open(filename, O_RDWR | O_APPEND | O_CREAT)) == -1) - { - sendto_one(sptr, ":%s NOTICE %s :Problem opening %s ", - me.name, parv[0], filename); - return 0; - } - - ircsprintf(buffer, "/* %s!%s@%s Added kill for: %s@%s\n" - " * at %s */\n", - sptr->name, sptr->user->username, - sptr->user->host, user, host, current_date); - - if (write(out, buffer, strlen(buffer)) <= 0) - { - sendto_one(sptr, ":%s NOTICE %s :Problem writing to %s", - me.name, parv[0], filename); - close(out); - return 0; - } - - ircsprintf(buffer, "kill {\n" - " mask \"%s@%s\";\n" - " reason \"%s\";\n" - "};\n\n", - user, host, reason); - - if (write(out, buffer, strlen(buffer)) <= 0) - { - sendto_one(sptr, ":%s NOTICE %s :Problem writing to %s", - me.name, parv[0], filename); - close(out); - return 0; - } - close(out); - - #ifdef USE_SYSLOG - syslog(LOG_NOTICE, "%s added G-Line for [%s@%s] [%s]", parv[0], - user, host, reason); - #endif - - return 0; - #endif /* LOCKFILE */ - } - #endif - - - #if 0 - /* - * * m_ungline - * Added Aug 31, 1997 - * common (Keith Fralick) fr...@ga... - * - * parv[0] = sender - * parv[1] = address to remove - * - * re-worked and cleanedup for use in hybrid-5 -Dianora - * - */ - int m_ungline(aClient *cptr, aClient *sptr, int parc, char *parv[]) - { - struct userBan *ban; - char *user, *host; - - if (!IsAnOper(sptr) || !OPCanUnGline(sptr)) - { - sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]); - return 0; - } - - if (parc < 2) - { - sendto_one(sptr, err_str(ERR_NEEDMOREPARAMS), - me.name, parv[0], "UNGLINE"); - return 0; - } - - if ((host = strchr(parv[1], '@')) || *parv[1] == '*') - { - /* Explicit user@host mask given */ - - if (host) /* Found user@host */ - { - user = parv[1]; /* here is user part */ - *(host++) = '\0'; /* and now here is host */ - } - else - { - user = "*"; /* no @ found, assume its *@somehost */ - host = parv[1]; - } - } - else - { - sendto_one(sptr, ":%s NOTICE %s :Invalid parameters", - me.name, parv[0]); - return 0; - } - - if ((user[0] == '*') && (user[1] == '\0') && (host[0] == '*') && - (host[1] == '\0')) - { - sendto_one(sptr, ":%s NOTICE %s :Cannot UNG-Line everyone", - me.name, parv[0]); - return 0; - } - - ban = make_hostbased_ban(user, host); - if(ban) - { - struct userBan *oban; - - ban->flags |= (UBAN_GLINE|UBAN_TEMPORARY); - if((oban = find_userban_exact(ban, UBAN_GLINE|UBAN_TEMPORARY))) - { - char tmp[512]; - - host = get_userban_host(oban, tmp, 512); - - remove_userban(oban); - glinestore_remove(oban); - userban_free(oban); - userban_free(ban); - - sendto_one(sptr, ":%s NOTICE %s :G-Line for [%s@%s] is removed", - me.name, parv[0], user, host); - // We need to send glines info to servers ? -Sheik - sendto_serv_butone(cptr, ":%s GLINE - %s@%s %l :%s", parv[0], user, host, 1); - - sendto_ops("%s has removed the G-Line for: [%s@%s] (%d matches)", - parv[0], user, host, 1); - - return 0; - } - userban_free(ban); - } - sendto_one(sptr, ":%s NOTICE %s :No Gline matches [%s@%s]", - me.name, parv[0], user, host); - return 0; - } - - #endif /* UNGLINE */ /* m_rehash */ --- 2485,2489 ---- Index: userban.c =================================================================== RCS file: /cvsroot/solidircd/solidircd-stable/src/userban.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** userban.c 4 Dec 2005 16:22:15 -0000 1.9 --- userban.c 26 Dec 2005 05:21:38 -0000 1.10 *************** *** 540,550 **** kset[0] = 'K'; } ! ! else if (ban->flags & UBAN_GLINE) ! { ! kset[0] = 'g'; ! } ! ! else if (ban->flags & UBAN_SHUN) { kset[0] = 's'; --- 540,548 ---- kset[0] = 'K'; } ! else if (ban->flags & UBAN_GLINE) ! { ! kset[0] = 'g'; ! } ! else if (ban->flags & UBAN_SHUN) { kset[0] = 's'; *************** *** 568,586 **** (ban->reason) ? ban->reason : "No reason"); } - else if (ban->flags & UBAN_SHUN) - { - sendto_one(cptr, ":%s SHUN %d %s@%s :%s", me.name, - (ban->flags & UBAN_TEMPORARY) ? ((ban->duration + ban->timeset) - NOW) : 0, - (ban->flags & UBAN_WILDUSER) ? "*" : ban->u, host, - (ban->reason) ? ban->reason : "No reason"); - } - else if (ban->flags & UBAN_GLINE) - { - sendto_one(cptr, ":%s GLINE %d %s@%s :%s", me.name, - (ban->flags & UBAN_TEMPORARY) ? ((ban->duration + ban->timeset) - NOW) : 0, - (ban->flags & UBAN_WILDUSER) ? "*" : ban->u, host, - (ban->reason) ? ban->reason : "No reason"); - } - bl = LIST_NEXT(bl, lp); } --- 566,569 ---- *************** *** 1619,1646 **** char *reason; char *btext; ! char *ntext; ! //char *gtext; ! //char *stext; int clientonly = 1; int i; ! //if (ban->flags & UBAN_NETWORK) ! if (ban->flags & (UBAN_NETWORK|UBAN_LOCAL|UBAN_GLINE)) ! { ! btext = NETWORK_BANNED_NAME; ntext = NETWORK_BAN_NAME; ! } ! ! else ! { btext = LOCAL_BANNED_NAME; ntext = LOCAL_BAN_NAME; ! ! btext = NETWORK_GLINNED_NAME; ! ntext = NETWORK_GLINE_NAME; ! } ! ! ! if (!(reason = ban->reason)) --- 1602,1619 ---- char *reason; char *btext; ! char *ntext; int clientonly = 1; int i; ! if (ban->flags & UBAN_NETWORK) { ! btext = NETWORK_BANNED_NAME; ntext = NETWORK_BAN_NAME; ! } else if (ban->flags & UBAN_GLINE) { /* Also, include glines now */ ! btext = NETWORK_GLINNED_NAME; ! ntext = NETWORK_GLINE_NAME; ! } else { btext = LOCAL_BANNED_NAME; ntext = LOCAL_BAN_NAME; ! } if (!(reason = ban->reason)) *************** *** 1666,1672 **** sendto_ops("%s active for %s", btext, get_client_name(acptr, FALSE)); - //Send the information to servers. - sendto_serv_butone("%s active for %s", btext, - get_client_name(acptr, FALSE)); exit_client(acptr, acptr, &me, rbuf); i--; --- 1639,1642 ---- *************** *** 1827,1831 **** } ! static inline void sync_me(aClient *cptr, uBanEnt *bl) { --- 1797,1801 ---- } ! /* Revised for shuns and g-lines */ static inline void sync_me(aClient *cptr, uBanEnt *bl) { *************** *** 1838,1844 **** if (ban->flags & UBAN_SHUN) ! sendto_one(cptr, ":%s SHUN %d %s@%s :%s", me.name, ban->duration, ban->u ? ban->u : "*", ban->h ? ban->h : "*", ban->reason); - bl = bln; } --- 1808,1816 ---- if (ban->flags & UBAN_SHUN) ! sendto_one(cptr, ":%s SHUN %l %s@%s :%s", me.name, ban->duration, ! ban->u ? ban->u : "*", ban->h ? ban->h : "*", ban->reason); ! else if (ban->flags & UBAN_GLINE) ! sendto_one(cptr, ":%s GLINE %l %s@%s :%s", me.name, ban->duration, ban->u ? ban->u : "*", ban->h ? ban->h : "*", ban->reason); bl = bln; } Index: ircd.c =================================================================== RCS file: /cvsroot/solidircd/solidircd-stable/src/ircd.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ircd.c 4 Sep 2005 05:24:13 -0000 1.6 --- ircd.c 26 Dec 2005 05:21:38 -0000 1.7 *************** *** 145,148 **** --- 145,152 ---- time_t nextbanexpire = 1; /* next time to expire the throttles/userbans */ + #ifdef TOYS + extern void init_chef(); + #endif + #ifdef PROFILING extern void _start, etext; *************** *** 851,855 **** initclass(); ! if(initconf(configfile) == -1) { --- 855,861 ---- initclass(); ! #ifdef TOYS ! init_chef(); /* siwwy wabbit, ewmew wont wowk widout initiawizing it fiwst! - tux */ ! #endif if(initconf(configfile) == -1) { Index: m_shun.c =================================================================== RCS file: /cvsroot/solidircd/solidircd-stable/src/m_shun.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** m_shun.c 27 Jun 2005 03:02:32 -0000 1.1.1.1 --- m_shun.c 26 Dec 2005 05:21:38 -0000 1.2 *************** *** 163,170 **** send_globops("Shun added for (%s@%s) by %s, expires in %d seconds (Reason: %s)", user, host, parv[0], shun_time, buffer); ! sendto_serv_butone(NULL, ":%s SHUN %d %s@%s :%s", me.name, shun_time, user, host, buffer); } else ! sendto_serv_butone(cptr, ":%s SHUN %d %s@%s :%s", me.name, shun_time, user, host, buffer); return 0; --- 163,170 ---- send_globops("Shun added for (%s@%s) by %s, expires in %d seconds (Reason: %s)", user, host, parv[0], shun_time, buffer); ! sendto_serv_butone(NULL, ":%s SHUN %d %s@%s :%s", parv[0], shun_time, user, host, buffer); } else ! sendto_serv_butone(cptr, ":%s SHUN %d %s@%s :%s", parv[0], shun_time, user, host, buffer); return 0; *************** *** 247,254 **** { send_globops("Shun for [%s@%s] removed by %s.", user, host, parv[0]); ! sendto_serv_butone(NULL, ":%s UNSHUN %s@%s", me.name, user, host); } else ! sendto_serv_butone(cptr, ":%s UNSHUN %s@%s", me.name, user, host); --- 247,254 ---- { send_globops("Shun for [%s@%s] removed by %s.", user, host, parv[0]); ! sendto_serv_butone(NULL, ":%s UNSHUN %s@%s", parv[0], user, host); } else ! sendto_serv_butone(cptr, ":%s UNSHUN %s@%s", parv[0], user, host); |