summaryrefslogtreecommitdiff
path: root/modules/core
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 /modules/core
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 'modules/core')
-rw-r--r--modules/core/m_join.c2
-rw-r--r--modules/core/m_nick.c5
-rw-r--r--modules/core/m_sjoin.c2
3 files changed, 5 insertions, 4 deletions
diff --git a/modules/core/m_join.c b/modules/core/m_join.c
index 569663b..3eb6908 100644
--- a/modules/core/m_join.c
+++ b/modules/core/m_join.c
@@ -396,7 +396,7 @@ ms_join(struct Client *client_p, struct Client *source_p,
if (chptr->topic[0])
{
- set_channel_topic(chptr, "", "", 0);
+ set_channel_topic(chptr, "", "", 0, 0);
sendto_channel_local(ALL_MEMBERS, 0, chptr, ":%s TOPIC %s :",
(IsHidden(source_p) ||
ConfigServerHide.hide_servers) ?
diff --git a/modules/core/m_nick.c b/modules/core/m_nick.c
index 1250d2c..15d47af 100644
--- a/modules/core/m_nick.c
+++ b/modules/core/m_nick.c
@@ -43,6 +43,7 @@
#include "modules.h"
#include "packet.h"
#include "watch.h"
+#include "s_misc.h"
static void nick_from_server(struct Client *, struct Client *, int, char **,
@@ -211,7 +212,7 @@ mr_nick(struct Client *client_p, struct Client *source_p,
*s = '\0';
/* copy the nick and terminate it */
- strlcpy(nick, parv[1], sizeof(nick));
+ strlcpy(nick, parv[1], IRCD_MIN(sizeof(nick), ServerInfo.max_nick_length + 1));
/* check the nickname is ok */
if (!valid_nickname(nick, 1))
@@ -278,7 +279,7 @@ m_nick(struct Client *client_p, struct Client *source_p,
flood_endgrace(source_p);
/* terminate nick to NICKLEN */
- strlcpy(nick, parv[1], sizeof(nick));
+ strlcpy(nick, parv[1], IRCD_MIN(sizeof(nick), ServerInfo.max_nick_length + 1));
/* check the nickname is ok */
if (!valid_nickname(nick, 1))
diff --git a/modules/core/m_sjoin.c b/modules/core/m_sjoin.c
index c817c99..53e442f 100644
--- a/modules/core/m_sjoin.c
+++ b/modules/core/m_sjoin.c
@@ -239,7 +239,7 @@ ms_sjoin(struct Client *client_p, struct Client *source_p,
if (chptr->topic[0])
{
- set_channel_topic(chptr, "", "", 0);
+ set_channel_topic(chptr, "", "", 0, 0);
sendto_channel_local(ALL_MEMBERS, 0, chptr, ":%s TOPIC %s :",
(IsHidden(source_p) ||
ConfigServerHide.hide_servers) ?