summaryrefslogtreecommitdiff
path: root/src/helperfuncs.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-31 21:55:34 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-31 21:55:34 +0000
commit5feabe435758fda7348d352b4b3410b769e4cd26 (patch)
tree92472f62cb55c820d1e6ec843768b72f2c68deab /src/helperfuncs.cpp
parent69fffba1faaaae5dd253174780b0a7ca20836e62 (diff)
Key hiding when youre not on the channel
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2998 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/helperfuncs.cpp')
-rw-r--r--src/helperfuncs.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index d76c708b2..922d2b7f6 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -1000,7 +1000,7 @@ void purge_empty_chans(userrec* u)
}
-char* chanmodes(chanrec *chan)
+char* chanmodes(chanrec *chan, bool showkey)
{
static char scratch[MAXBUF];
static char sparam[MAXBUF];
@@ -1032,7 +1032,9 @@ char* chanmodes(chanrec *chan)
if (chan->binarymodes & CM_PRIVATE)
*offset++ = 'p';
if (*chan->key)
- snprintf(sparam,MAXBUF," %s",chan->key);
+ {
+ snprintf(sparam,MAXBUF," %s",showkey ? chan->key : "<key>");
+ }
if (chan->limit)
{
char foo[24];