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

Added usermode +p 'hide channels in whois'

This commit is contained in:
codemastr
2003-03-21 21:43:38 +00:00
parent fe1dcfb6c2
commit f006ffe3c9
5 changed files with 17 additions and 5 deletions
+2
View File
@@ -1992,3 +1992,5 @@ seen. gmtime warning still there
- (Hopefully) fixed some Ziplinks problems
- Added missing except tkl {} documentation
- Documentation update and cleanup
- Added umode +p (hide channels in whois). For opers, channels are shown as "!#chan" to indicate
that the user is +p and the channel is only shown because you are an oper.
+4
View File
@@ -2018,6 +2018,10 @@ Set {
<td><div align="center">W</div></td>
<td>Lets you see when people do a /whois on you (IRCops Only)</td>
</tr>
<tr>
<td><div align="center">p</div></td>
<td>Hides the channels you are in in a /whois reply</td>
</tr>
</table>
<p></p></div>
<p><font size="+2"><b>6 &#8211; User & Oper Commands Table<a name="useropercommands" id="useropercommands"></a></b></font></p><div class="desc">
+1 -1
View File
@@ -429,7 +429,7 @@ extern long UMODE_DEAF; /* 0x10000000 Deaf */
extern long UMODE_HIDEOPER; /* 0x20000000 Hide oper mode */
extern long UMODE_SETHOST; /* 0x40000000 used sethost */
extern long UMODE_STRIPBADWORDS; /* 0x80000000 */
extern long UMODE_HIDEWHOIS; /* hides channels in /whois */
extern long AllUmodes, SendUmodes;
#ifndef HAVE_STRLCPY
+8 -4
View File
@@ -238,6 +238,8 @@ DLLFUNC int m_whois(aClient *cptr, aClient *sptr, int parc, char *parv[])
if (IsAnOper(sptr))
#endif
showchannel = 1;
if ((acptr->umodes & UMODE_HIDEWHOIS) && !IsMember(sptr, chptr) && !IsAnOper(sptr))
showchannel = 0;
if (IsServices(acptr) && !IsNetAdmin(sptr))
showchannel = 0;
if (acptr == sptr)
@@ -256,13 +258,15 @@ DLLFUNC int m_whois(aClient *cptr, aClient *sptr, int parc, char *parv[])
len = 0;
}
#ifdef SHOW_SECRET
if (!(acptr == sptr) && IsAnOper(sptr)
if (IsAnOper(sptr)
#else
if (!(acptr == sptr)
&& IsNetAdmin(sptr)
if (IsNetAdmin(sptr)
#endif
&& SecretChannel(chptr))
&& SecretChannel(chptr) && !IsMember(sptr, chptr))
*(buf + len++) = '~';
if (acptr->umodes & UMODE_HIDEWHOIS && !IsMember(sptr, chptr)
&& IsAnOper(sptr))
*(buf + len++) = '!';
if (is_chanowner(acptr, chptr))
*(buf + len++) = '*';
else if (is_chanprot(acptr, chptr))
+2
View File
@@ -72,6 +72,7 @@ long UMODE_DEAF = 0L; /* Deaf */
long UMODE_HIDEOPER = 0L; /* Hide oper mode */
long UMODE_SETHOST = 0L; /* Used sethost */
long UMODE_STRIPBADWORDS = 0L; /* Strip badwords */
long UMODE_HIDEWHOIS = 0L; /* Hides channels in /whois */
long AllUmodes; /* All umodes */
long SendUmodes; /* All umodes which are sent to other servers (global umodes) */
@@ -114,6 +115,7 @@ void umode_init(void)
UMODE_HIDEOPER = umode_gget('H'); /* 0x20000000 Hide oper mode */
UMODE_SETHOST = umode_gget('t'); /* 0x40000000 used sethost */
UMODE_STRIPBADWORDS = umode_gget('G'); /* 0x80000000 */
UMODE_HIDEWHOIS = umode_gget('p'); /* Hides channels in /whois */
}
void make_umodestr(void)