duh, so stupid
This commit is contained in:
parent
2ba67a8257
commit
e84e5f182f
3 changed files with 16 additions and 9 deletions
|
@ -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++) {
|
||||
|
|
13
exclude.c
13
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;
|
||||
}
|
||||
|
||||
|
|
1
server.c
1
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.");
|
||||
}
|
||||
|
|
Reference in a new issue