mirror of
https://github.com/pissnet/pissircd.git
synced 2025-07-27 05:22:24 +01:00
- Fixed an old bug where allow::hostname localhost (or *@localhost) didn't work (#0001115).
This commit is contained in:
parent
0475c6b874
commit
8bfcc56c9e
2 changed files with 18 additions and 0 deletions
1
Changes
1
Changes
|
@ -2395,3 +2395,4 @@ seen. gmtime warning still there
|
|||
- Fixed a double OperOverride notice bug reported by DukePyrolator (#0001180).
|
||||
- Doc fixes/updates reported by Angrywolf (#0001163, #0001176).
|
||||
- Fixed a /rehash crash regarding badword all & regex badwords, reported by Angrywolf (#0001230).
|
||||
- Fixed an old bug where allow::hostname localhost (or *@localhost) didn't work (#0001115).
|
||||
|
|
17
src/s_conf.c
17
src/s_conf.c
|
@ -2246,6 +2246,23 @@ int AllowClient(aClient *cptr, struct hostent *hp, char *sockhost)
|
|||
(void)strncat(uhost, sockhost, sizeof(uhost) - strlen(uhost));
|
||||
if (!match(aconf->ip, uhost))
|
||||
goto attach;
|
||||
|
||||
/* Hmm, localhost is a special case, hp == NULL and sockhost contains
|
||||
* 'localhost' instead of an ip... -- Syzop. */
|
||||
if (!strcmp(sockhost, "localhost"))
|
||||
{
|
||||
if (index(aconf->hostname, '@'))
|
||||
{
|
||||
strcpy(uhost, cptr->username);
|
||||
strcat(uhost, "@localhost");
|
||||
}
|
||||
else
|
||||
strcpy(uhost, "localhost");
|
||||
|
||||
if (!match(aconf->hostname, uhost))
|
||||
goto attach;
|
||||
}
|
||||
|
||||
continue;
|
||||
attach:
|
||||
/* if (index(uhost, '@')) now flag based -- codemastr */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue