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>
char *user;
int want_ip;
char *ip;
+ int want_port;
+ int port;
int want_umode;
int umodes_dontwant;
int umodes_want;
" 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",
}
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;
}
}
+ /* 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)
{