1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-01 16:46:37 +02:00

Various bug fixes

This commit is contained in:
codemastr
2001-07-16 17:51:18 +00:00
parent c4d4754511
commit acf66442e8
4 changed files with 13 additions and 21 deletions
+2
View File
@@ -702,3 +702,5 @@ seen. gmtime warning still there
- Made it so unreal searches harder for SSL headers and libraries
- Fixed possible bug with allowing :'s in +k/+L ..
- Added a credit
- Fixed a typo in /stats and a /chatops bug found by Cas
- Made oper {} (and vhost {}) allow you to enter an IP even if your host resolves by request of Cas
+3 -2
View File
@@ -333,7 +333,7 @@ int m_vhost(aClient *cptr, aClient *sptr, int parc, char *parv[])
{
ConfigItem_vhost *vhost;
ConfigItem_oper_from *from;
char *user, *pwd, *host;
char *user, *pwd, *host, *host2;
if (parc < 3)
{
@@ -360,8 +360,9 @@ int m_vhost(aClient *cptr, aClient *sptr, int parc, char *parv[])
return 0;
}
host = make_user_host(sptr->user->username, sptr->user->realhost);
host2 = make_user_host(sptr->user->username, (char *)inet_ntoa(sptr->ip));
for (from = (ConfigItem_oper_from *)vhost->from; from; from = (ConfigItem_oper_from *)from->next) {
if (!match(from->name, host))
if (!match(from->name, host) || !match(from->name, host2))
break;
}
if (!from) {
+5 -17
View File
@@ -2925,7 +2925,7 @@ int m_stats(cptr, sptr, parc, parv)
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0],
"E - Send the except ban block list");
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0],
"F - Send the deny dcc block list list");
"F - Send the deny dcc block list");
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0],
"G - Report TKL information (G:lines/Shuns)");
sendto_one(sptr, rpl_str(RPL_STATSHELP), me.name, parv[0],
@@ -3667,23 +3667,11 @@ int m_chatops(cptr, sptr, parc, parv)
me.name, parv[0], "CHATOPS");
return 0;
}
if (ALLOW_CHATOPS == 1)
if (MyClient(sptr))
{
if (MyClient(sptr) && !IsAnOper(sptr))
{
sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name,
parv[0]);
return 0;
}
}
else
{
if (MyClient(sptr))
{
sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name,
parv[0]);
return 0;
}
sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name,
parv[0]);
return 0;
}
sendto_serv_butone_token(IsServer(cptr) ? cptr : NULL,
parv[0], MSG_CHATOPS, TOK_CHATOPS, ":%s", message);
+3 -2
View File
@@ -3653,7 +3653,7 @@ int m_oper(cptr, sptr, parc, parv)
{
ConfigItem_oper *aconf;
ConfigItem_oper_from *oper_from;
char *name, *password, *encr, *nuhhost;
char *name, *password, *encr, *nuhhost, *nuhhost2;
#ifdef CRYPT_OPER_PASSWORD
char salt[3];
extern char *crypt();
@@ -3709,9 +3709,10 @@ int m_oper(cptr, sptr, parc, parv)
return 0;
}
nuhhost = make_user_host(sptr->user->username, sptr->user->realhost);
nuhhost2 = make_user_host(sptr->user->username, (char *)inet_ntoa(sptr->ip));
for (oper_from = (ConfigItem_oper_from *) aconf->from;
oper_from; oper_from = (ConfigItem_oper_from *) oper_from->next)
if (!match(oper_from->name, nuhhost))
if (!match(oper_from->name, nuhhost) || !match(oper_from->name, nuhhost2))
break;
if (!oper_from)
{