1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-08 14:03:12 +02:00

Fixed /stats to work fully with newconf

This commit is contained in:
codemastr
2001-06-25 20:13:37 +00:00
parent 740084b6d9
commit e604a72114
6 changed files with 61 additions and 45 deletions
+1
View File
@@ -605,3 +605,4 @@ seen. gmtime warning still there
- Moved m_svsmode and m_svs2mode to m_svsmode.so and updated modulize a bit
- Moved m_swhois and m_svsmotd to modules
- Fixed a bug where configure would pick both -ldescrypt and -lcrypt
- Fixed /stats to work fully with newconf
+4 -4
View File
@@ -60,10 +60,10 @@ void start_auth(cptr)
struct SOCKADDR_IN sock;
int addrlen = sizeof(struct SOCKADDR_IN);
#ifdef NO_IDENT_CHECKING
cptr->flags &= ~(FLAGS_WRAUTH | FLAGS_AUTH);
return;
#endif
if (IDENT_CHECK == 0) {
cptr->flags &= ~(FLAGS_WRAUTH | FLAGS_AUTH);
return;
}
Debug((DEBUG_NOTICE, "start_auth(%x) slot=%d, fd=%d, status=%d",
cptr, cptr->slot, cptr->fd, cptr->status));
if ((cptr->authfd = socket(AFINET, SOCK_STREAM, 0)) == -1)
+21 -23
View File
@@ -2078,9 +2078,6 @@ int _conf_set(ConfigFile *conf, ConfigEntry *ce)
else if (!strcmp(cepp->ce_varname, "hide-ulines")) {
HIDE_ULINES = 1;
}
else if (!strcmp(cepp->ce_varname, "enable-chatops")) {
ALLOW_CHATOPS = 1;
}
else if (!strcmp(cepp->ce_varname, "no-stealth")) {
NO_OPER_HIDING = 1;
}
@@ -2090,6 +2087,9 @@ int _conf_set(ConfigFile *conf, ConfigEntry *ce)
else if (!strcmp(cepp->ce_varname, "identd-check")) {
IDENT_CHECK = 1;
}
else if (!strcmp(cepp->ce_varname, "show-opers")) {
SHOWOPERS = 1;
}
}
}
else if (!strcmp(cep->ce_varname, "maxchannelsperuser")) {
@@ -3664,18 +3664,18 @@ void report_dynconf(aClient *sptr)
sptr->name, KLINE_ADDRESS);
sendto_one(sptr, ":%s %i %s :modes-on-connect: %s", me.name, RPL_TEXT,
sptr->name, get_modestr(CONN_MODES));
sendto_one(sptr, ":%s %i %s :SHOWOPERS: %d", me.name, RPL_TEXT,
sendto_one(sptr, ":%s %i %s :options::show-opers: %d", me.name, RPL_TEXT,
sptr->name, SHOWOPERS);
sendto_one(sptr, ":%s %i %s :options::show-opermotd: %d", me.name, RPL_TEXT,
sptr->name, SHOWOPERMOTD);
sendto_one(sptr, ":%s %i %s :options::hide-ulines: %d", me.name, RPL_TEXT,
sptr->name, HIDE_ULINES);
sendto_one(sptr, ":%s %i %s :options::enable-chatops: %d", me.name, RPL_TEXT,
sptr->name, ALLOW_CHATOPS);
sendto_one(sptr, ":%s %i %s :options::webtv-support: %d", me.name, RPL_TEXT,
sptr->name, WEBTV_SUPPORT);
sendto_one(sptr, ":%s %i %s :options::no-stealth: %d", me.name, RPL_TEXT,
sptr->name, NO_OPER_HIDING);
sendto_one(sptr, ":%s %i %s :options::identd-check: %d", me.name, RPL_TEXT,
sptr->name, IDENT_CHECK);
sendto_one(sptr, ":%s %i %s :socks::ban-message: %s", me.name, RPL_TEXT,
sptr->name, iConf.socksbanmessage);
sendto_one(sptr, ":%s %i %s :socks::quit-message: %s", me.name, RPL_TEXT,
@@ -3701,37 +3701,35 @@ void report_network(aClient *sptr)
{
sendto_one(sptr, ":%s %i %s :*** Network Configuration Report ***",
me.name, RPL_TEXT, sptr->name);
sendto_one(sptr, ":%s %i %s :NETWORK: %s", me.name, RPL_TEXT,
sendto_one(sptr, ":%s %i %s :network-name: %s", me.name, RPL_TEXT,
sptr->name, ircnetwork);
sendto_one(sptr, ":%s %i %s :DEFAULT_SERVER: %s", me.name, RPL_TEXT,
sendto_one(sptr, ":%s %i %s :default-server: %s", me.name, RPL_TEXT,
sptr->name, defserv);
sendto_one(sptr, ":%s %i %s :SERVICES_NAME: %s", me.name, RPL_TEXT,
sendto_one(sptr, ":%s %i %s :services-server: %s", me.name, RPL_TEXT,
sptr->name, SERVICES_NAME);
sendto_one(sptr, ":%s %i %s :OPER_HOST: %s", me.name, RPL_TEXT,
sendto_one(sptr, ":%s %i %s :hosts::global: %s", me.name, RPL_TEXT,
sptr->name, oper_host);
sendto_one(sptr, ":%s %i %s :ADMIN_HOST: %s", me.name, RPL_TEXT,
sendto_one(sptr, ":%s %i %s :hosts::admin: %s", me.name, RPL_TEXT,
sptr->name, admin_host);
sendto_one(sptr, ":%s %i %s :LOCOP_HOST: %s", me.name, RPL_TEXT,
sendto_one(sptr, ":%s %i %s :hosts::local: %s", me.name, RPL_TEXT,
sptr->name, locop_host);
sendto_one(sptr, ":%s %i %s :SADMIN_HOST: %s", me.name, RPL_TEXT,
sendto_one(sptr, ":%s %i %s :hosts::servicesadmin: %s", me.name, RPL_TEXT,
sptr->name, sadmin_host);
sendto_one(sptr, ":%s %i %s :NETADMIN_HOST: %s", me.name, RPL_TEXT,
sendto_one(sptr, ":%s %i %s :hosts::netadmin: %s", me.name, RPL_TEXT,
sptr->name, netadmin_host);
sendto_one(sptr, ":%s %i %s :COADMIN_HOST: %s", me.name, RPL_TEXT,
sendto_one(sptr, ":%s %i %s :hosts::coadmin: %s", me.name, RPL_TEXT,
sptr->name, coadmin_host);
sendto_one(sptr, ":%s %i %s :TECHADMIN_HOST: %s", me.name, RPL_TEXT,
sendto_one(sptr, ":%s %i %s :hosts::techadmin: %s", me.name, RPL_TEXT,
sptr->name, techadmin_host);
sendto_one(sptr, ":%s %i %s :HIDDEN_HOST: %s", me.name, RPL_TEXT,
sendto_one(sptr, ":%s %i %s :hiddenhost-prefix: %s", me.name, RPL_TEXT,
sptr->name, hidden_host);
sendto_one(sptr, ":%s %i %s :NETDOMAIN: %s", me.name, RPL_TEXT,
sptr->name, netdomain);
sendto_one(sptr, ":%s %i %s :HELPCHAN: %s", me.name, RPL_TEXT,
sendto_one(sptr, ":%s %i %s :help-channel: %s", me.name, RPL_TEXT,
sptr->name, helpchan);
sendto_one(sptr, ":%s %i %s :STATS_SERVER: %s", me.name, RPL_TEXT,
sendto_one(sptr, ":%s %i %s :stats-server: %s", me.name, RPL_TEXT,
sptr->name, STATS_SERVER);
sendto_one(sptr, ":%s %i %s :INAH: %i", me.name, RPL_TEXT, sptr->name,
sendto_one(sptr, ":%s %i %s :hosts::host-on-oper-up: %i", me.name, RPL_TEXT, sptr->name,
iNAH);
sendto_one(sptr, ":%s %i %s :KEYCRC: %X", me.name, RPL_TEXT, sptr->name,
sendto_one(sptr, ":%s %i %s :cloak-keys: %X", me.name, RPL_TEXT, sptr->name,
CLOAK_KEYCRC);
}
-4
View File
@@ -307,10 +307,6 @@ int channel_canjoin(aClient *sptr, char *name)
return 1;
}
void vhost_report(aClient *sptr)
{
}
int m_vhost(aClient *cptr, aClient *sptr, int parc, char *parv[])
{
+26 -6
View File
@@ -2645,8 +2645,11 @@ int m_stats(cptr, sptr, parc, parv)
}
break;
}
case 'M':
case 'm':
EventStatus(sptr);
break;
case 'M':
for (i = 0; i <= 255; i++)
for (mptr = CommandHash[i]; mptr; mptr = mptr->next)
if (mptr->count)
@@ -2784,10 +2787,19 @@ int m_stats(cptr, sptr, parc, parv)
}
break;
}
case 'r':
/* FIXME: cr_report(sptr); */
case 'r': {
ConfigItem_deny_channel *dchans;
ConfigItem_allow_channel *achans;
for (dchans = conf_deny_channel; dchans; dchans = (ConfigItem_deny_channel *) dchans->next) {
sendto_one(sptr, ":%s %i %s :deny %s %s", me.name, RPL_TEXT, sptr->name,
dchans->channel, dchans->reason);
}
for (achans = conf_allow_channel; achans; achans = (ConfigItem_allow_channel *) achans->next) {
sendto_one(sptr, ":%s %i %s :allow %s", me.name, RPL_TEXT, sptr->name,
achans->channel);
}
break;
}
case 't':
{
ConfigItem_tld *tld;
@@ -2835,9 +2847,17 @@ int m_stats(cptr, sptr, parc, parv)
}
break;
}
case 'V':
EventStatus(sptr);
case 'V': {
ConfigItem_vhost *vhosts;
for(vhosts = conf_vhost; vhosts; vhosts = (ConfigItem_vhost *) vhosts->next) {
for (oper_p_from = (ConfigItem_oper_from *)vhosts->from; oper_p_from; oper_p_from = (ConfigItem_oper_from *)oper_p_from->next) {
sendto_one(sptr, ":%s %i %s :vhost %s%s%s %s %s", me.name, RPL_TEXT, sptr->name,
vhosts->virtuser ? vhosts->virtuser : "", vhosts->virtuser ? "@" : "",
vhosts->virthost, vhosts->login, oper_p_from->name);
}
}
break;
}
case 'X':
case 'x':
for (link_p = conf_link; link_p; link_p = (ConfigItem_link *) link_p->next)
+9 -8
View File
@@ -771,14 +771,15 @@ static int register_user(cptr, sptr, nick, username, umode, virthost)
char temp[USERLEN + 1];
strncpyzt(temp, username, USERLEN + 1);
#ifdef NO_IDENT_CHECKING
strncpy(user->username, temp, USERLEN);
user->username[USERLEN] = '\0';
#else
*user->username = '~';
(void)strncpy(&user->username[1], temp, USERLEN);
user->username[USERLEN] = '\0';
#endif
if (IDENT_CHECK == 0) {
strncpy(user->username, temp, USERLEN);
user->username[USERLEN] = '\0';
}
else {
*user->username = '~';
(void)strncpy(&user->username[1], temp, USERLEN);
user->username[USERLEN] = '\0';
}
#ifdef HOSTILENAME
noident = 1;
#endif