fix up html segv in statserv when we have no clientversions and make hostserv not set vhosts for Opers when using hiddenhost feature
This commit is contained in:
parent
48b59ab882
commit
5d649df84c
3 changed files with 20 additions and 12 deletions
|
@ -42,6 +42,8 @@ NeoStats ChangeLog - Anything we add/remove/fix/change is in here (even our rant
|
|||
- Fixed a bug with Non-Zero counts with StatServ when loading up. (F)
|
||||
- Tidy up Jupe Command. Now echo's a message back to the user when the jupe is done (F)
|
||||
- Fix up a Segv_inmodule error in the dns stuff. Its a hack, but works (F)
|
||||
- Don't set hidden hosts for opers (F)
|
||||
- Statserv HTML fix for clientversions when its empty
|
||||
|
||||
* NeoStats * Fish * Version 2.5.5
|
||||
- Module API version number
|
||||
|
|
|
@ -692,6 +692,10 @@ int hs_mode(char **av, int ac) {
|
|||
u = finduser(av[0]);
|
||||
if (!u) /* User not found */
|
||||
return 1;
|
||||
if (is_oper(u))
|
||||
/* don't set a opers vhost. Most likely already done */
|
||||
return 1;
|
||||
|
||||
if (u->moddata[hs_cfg.modnum] != NULL) {
|
||||
nlog(LOG_DEBUG2, LOG_MOD, "not setting hidden host on %s", av[0]);
|
||||
return -1;
|
||||
|
|
|
@ -441,21 +441,23 @@ void get_clientstats()
|
|||
list_sort(Vhead, topversions);
|
||||
}
|
||||
cn = list_first(Vhead);
|
||||
cv = lnode_get(cn);
|
||||
fprintf(opf,
|
||||
"<table border = 0><tr><th>Version</th><th align=right>Count</th></tr>");
|
||||
for (i = 0; i <= 10; i++) {
|
||||
if (cn) {
|
||||
cv = lnode_get(cn);
|
||||
fprintf(opf,
|
||||
"<tr><td>%s</td><td align=right>%d</td></tr>\n",
|
||||
cv->name, cv->count);
|
||||
cn = list_next(Vhead, cn);
|
||||
if (cn) {
|
||||
cv = lnode_get(cn);
|
||||
} else {
|
||||
break;
|
||||
"<table border = 0><tr><th>Version</th><th align=right>Count</th></tr>");
|
||||
for (i = 0; i <= 10; i++) {
|
||||
fprintf(opf,
|
||||
"<tr><td>%s</td><td align=right>%d</td></tr>\n",
|
||||
cv->name, cv->count);
|
||||
cn = list_next(Vhead, cn);
|
||||
if (cn) {
|
||||
cv = lnode_get(cn);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
fprintf(opf, "</table>");
|
||||
}
|
||||
fprintf(opf, "</table>");
|
||||
}
|
||||
|
||||
void get_tldmap()
|
||||
|
|
Reference in a new issue