]>
Commit | Line | Data |
---|---|---|
1 | Only match nicks and channels when told to, and not when not told to. | |
2 | ||
3 | Previously things like /who account a%.. would be matched against a nick too | |
4 | and /who realname r% would be matched against nicks and channels | |
5 | (eg. when searching for users with a realname that's also a valid channel name, | |
6 | or happens to be also a nick that is in use). | |
7 | ||
8 | diff -r ebda89dbc5c9 ircd/m_who.c | |
9 | --- a/ircd/m_who.c Thu Jan 22 16:05:40 2009 +0100 | |
10 | +++ b/ircd/m_who.c Thu Jan 22 16:29:28 2009 +0100 | |
11 | @@ -300,8 +300,11 @@ | |
12 | who_marker = get_client_marker(); | |
13 | commas = (mask && strchr(mask, ',')); | |
14 | ||
15 | - /* First treat mask as a list of plain nicks/channels */ | |
16 | - if (mask) | |
17 | + /* First treat mask as a list of plain nicks/channels | |
18 | + * but only when told to match nicks (and channels) | |
19 | + * with WHO_FIELD_NIC or when we got a mask with commas | |
20 | + */ | |
21 | + if (mask && (matchsel & WHO_FIELD_NIC || commas)) | |
22 | { | |
23 | strcpy(mymask, mask); | |
24 | for (p = 0, nick = ircd_strtok(&p, mymask, ","); nick; |