summaryrefslogtreecommitdiff
path: root/src/channel.c
diff options
context:
space:
mode:
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2013-01-16 18:30:52 +0000
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2013-01-16 18:30:52 +0000
commit83f7ffe7e5cb8110964209e86ce8e44b11f4088d (patch)
treefa1f4842002862f58a04f01dcf9675a1b206e5b2 /src/channel.c
parentb0f035dd5ef59e0f9096b5e716411bbb7b5afa24 (diff)
- Forward-port -r1750 [IMPORTANT: nick and topic lengths are now configurable
via ircd.conf. A max_nick_length, as well as a max_topic_length configuration option can now be found in the serverinfo{} block] - OpenSSL 0.9.8s and higher is now required in order to enable ssl support git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/trunk@1751 82007160-df01-0410-b94d-b575c5fd34c7
Diffstat (limited to 'src/channel.c')
-rw-r--r--src/channel.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/channel.c b/src/channel.c
index 5417278..9207f17 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -42,6 +42,7 @@
#include "event.h"
#include "memory.h"
#include "mempool.h"
+#include "s_misc.h"
struct config_channel_entry ConfigChannel;
dlink_list global_channel_list = { NULL, NULL, 0 };
@@ -857,9 +858,13 @@ check_splitmode(void *unused)
*/
void
set_channel_topic(struct Channel *chptr, const char *topic,
- const char *topic_info, time_t topicts)
+ const char *topic_info, time_t topicts, int local)
{
- strlcpy(chptr->topic, topic, sizeof(chptr->topic));
+ if (local)
+ strlcpy(chptr->topic, topic, IRCD_MIN(sizeof(chptr->topic), ServerInfo.max_topic_length + 1));
+ else
+ strlcpy(chptr->topic, topic, sizeof(chptr->topic));
+
strlcpy(chptr->topic_info, topic_info, sizeof(chptr->topic_info));
chptr->topic_time = topicts;
}