summaryrefslogtreecommitdiff
path: root/modules/core
diff options
context:
space:
mode:
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) ?