mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-07 08:23:12 +02:00
- Added /who *.host.com support (ircop only), this was already possible via /who -h <host>
but most ppl expect it to work this way too.
This commit is contained in:
+22
-3
@@ -667,6 +667,8 @@ static void make_who_status(aClient *sptr, aClient *acptr, aChannel *channel,
|
||||
|
||||
static void do_other_who(aClient *sptr, char *mask)
|
||||
{
|
||||
int oper = IsAnOper(sptr);
|
||||
|
||||
/* wildcard? */
|
||||
if (strchr(mask, '*') || strchr(mask, '?'))
|
||||
{
|
||||
@@ -682,9 +684,26 @@ static void do_other_who(aClient *sptr, char *mask)
|
||||
char *channel;
|
||||
int flg;
|
||||
|
||||
if (match(mask, acptr->name))
|
||||
continue;
|
||||
|
||||
if (!oper) {
|
||||
if (match(mask, acptr->name))
|
||||
continue;
|
||||
} else {
|
||||
/* I could have done this with chinese logic, but I prefered
|
||||
* to do it a bit more clean (ahem :P), like this. -- Syzop
|
||||
*/
|
||||
if (!match(mask, acptr->name))
|
||||
goto matchok;
|
||||
if (!oper)
|
||||
continue;
|
||||
if (!acptr->user)
|
||||
continue;
|
||||
if (!match(mask, acptr->user->realhost))
|
||||
goto matchok;
|
||||
if (IsHidden(acptr) && !match(mask, acptr->user->virthost))
|
||||
goto matchok;
|
||||
continue;
|
||||
matchok:
|
||||
}
|
||||
if ((cansee = can_see(sptr, acptr, NULL)) & WHO_CANTSEE)
|
||||
continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user