1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-08 04:23:13 +02:00

Index: Changes

===================================================================
RCS file: /home/cmunk/ircsystems/cvsroot/unreal/Changes,v
retrieving revision 1.1.1.1.2.1.2.1.2.2422
diff -u -r1.1.1.1.2.1.2.1.2.2422 Changes
--- Changes	9 Jun 2007 18:00:05 -0000	1.1.1.1.2.1.2.1.2.2422
+++ Changes	9 Jun 2007 19:15:14 -0000
@@ -1745,3 +1745,4 @@
   directive which loads velcro modules
 - #0003382 reported by stealth regarding nested C-style comments messing
 - up example.conf parsing
+- #0003107 feature request by Sakkath regarding new WHO flag: +p <port>
This commit is contained in:
wolfsage
2007-06-09 19:15:18 +00:00
parent f4850d25c0
commit fcbb0fcd69
2 changed files with 30 additions and 0 deletions
+1
View File
@@ -1745,3 +1745,4 @@ MOTDs
directive which loads velcro modules
- #0003382 reported by stealth regarding nested C-style comments messing
- up example.conf parsing
- #0003107 feature request by Sakkath regarding new WHO flag: +p <port>
+29
View File
@@ -137,6 +137,8 @@ struct {
char *user;
int want_ip;
char *ip;
int want_port;
int port;
int want_umode;
int umodes_dontwant;
int umodes_want;
@@ -244,6 +246,8 @@ static void who_sendhelp(aClient *sptr)
" wildcards accepted",
"Flag i <ip>: user has string <ip> in his/her IP address,",
" wildcards accepted",
"Flag p <port>: user is connecting on port <port>,",
" local connections only",
"Flag m <usermodes>: user has <usermodes> set",
"Flag n <nick>: user has string <nick> in his/her nickname,",
" wildcards accepted",
@@ -370,6 +374,14 @@ int i = 1;
}
i++;
break;
case 'p':
REQUIRE_PARAM()
if (!IsAnOper(sptr))
break; /* oper-only */
wfl.port = atoi(argv[i]);
SET_OPTION(wfl.want_port);
i++;
break;
case 'M':
SET_OPTION(wfl.common_channels_only);
break;
@@ -495,6 +507,23 @@ char has_common_chan = 0;
}
}
/* if they only want people connecting on a certain port */
if (wfl.want_port != WHO_DONTCARE)
{
int port;
if (!MyClient(acptr))
return WHO_CANTSEE;
port = acptr->listener->port;
if (((wfl.want_port == WHO_WANT) && wfl.port != port) ||
((wfl.want_port == WHO_DONTWANT) && wfl.port == port))
{
return WHO_CANTSEE;
}
}
/* if they only want people with a certain nick.. */
if (wfl.want_nick != WHO_DONTCARE)
{