From e84e5f182f2bb9ea0511a32339780493e1ca30ba Mon Sep 17 00:00:00 2001 From: Fish <> Date: Sat, 31 Jan 2004 07:27:20 +0000 Subject: [PATCH] duh, so stupid --- dl/statserv/statserv.c | 11 ++++++++--- exclude.c | 13 +++++++------ server.c | 1 + 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/dl/statserv/statserv.c b/dl/statserv/statserv.c index fa33e8cf..2a3390fa 100644 --- a/dl/statserv/statserv.c +++ b/dl/statserv/statserv.c @@ -649,12 +649,13 @@ static void makemap(char *uplink, User * u, int level) hash_scan_begin(&hs, sh); while ((sn = hash_scan_next(&hs))) { s = hnode_get(sn); - if (StatServ.exclusions && IsExcluded(s)) { - makemap(s->name, u, level); - } ss = findstats(s->name); if ((level == 0) && (s->uplink[0] == 0)) { /* its the root server */ +printf("locallevel %s\n", s->name); + if (StatServ.exclusions && IsExcluded(s)) { + makemap(s->name, u, level); + } prefmsg(u->nick, s_StatServ, "\2%-45s [ %d/%d ] [ %d/%d ] [ %ld/%ld ]", ss->name, ss->users, (int)ss->maxusers, @@ -662,6 +663,10 @@ static void makemap(char *uplink, User * u, int level) ss->highest_ping); makemap(s->name, u, level + 1); } else if ((level > 0) && !ircstrcasecmp(uplink, s->uplink)) { +printf("highlevel %s\n", s->name); + if (StatServ.exclusions && IsExcluded(s)) { + makemap(s->name, u, level); + } /* its not the root server */ buf[0]='\0'; for (i = 1; i < level; i++) { diff --git a/exclude.c b/exclude.c index 1cf85cf5..25f63756 100644 --- a/exclude.c +++ b/exclude.c @@ -244,14 +244,14 @@ void ns_do_exclude_user(User *u) { e = lnode_get(en); if (e->type == NS_EXCLUDE_HOST) { if (match(e->pattern, u->hostname)) { - u->flags &= ~NS_FLAGS_EXCLUDED; + u->flags |= NS_FLAGS_EXCLUDED; return; } } en = list_next(exclude_list, en); } /* if we are here, there is no match */ - u->flags |= NS_FLAGS_EXCLUDED; + u->flags &= ~NS_FLAGS_EXCLUDED; } /* @brief check if a server is matched against a exclusion @@ -272,14 +272,14 @@ void ns_do_exclude_server(Server *s) { e = lnode_get(en); if (e->type == NS_EXCLUDE_SERVER) { if (match(e->pattern, s->name)) { - s->flags &= ~NS_FLAGS_EXCLUDED; + s->flags |= NS_FLAGS_EXCLUDED; return; } } en = list_next(exclude_list, en); } /* if we are here, there is no match */ - s->flags |= NS_FLAGS_EXCLUDED; + s->flags &= ~NS_FLAGS_EXCLUDED; } @@ -301,12 +301,13 @@ void ns_do_exclude_chan(Chans *c) { e = lnode_get(en); if (e->type == NS_EXCLUDE_CHAN) { if (match(e->pattern, c->name)) { - c->flags &= ~NS_FLAGS_EXCLUDED; + c->flags |= NS_FLAGS_EXCLUDED; return; } } en = list_next(exclude_list, en); } /* if we are here, there is no match */ - c->flags |= NS_FLAGS_EXCLUDED; + c->flags &= ~NS_FLAGS_EXCLUDED; } + diff --git a/server.c b/server.c index 7f9721bf..3e375926 100644 --- a/server.c +++ b/server.c @@ -158,6 +158,7 @@ ServerDump (void) while ((sn = hash_scan_next (&ss)) != NULL) { s = hnode_get (sn); debugtochannel("Server Entry: %s Flags: %lx", s->name, s->flags); + debugtochannel("uplink: %s", s->uplink); } debugtochannel("End of Listing."); }