summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/core/m_join.c2
-rw-r--r--modules/core/m_nick.c5
-rw-r--r--modules/core/m_sjoin.c2
-rw-r--r--modules/m_tburst.c2
-rw-r--r--modules/m_topic.c2
5 files changed, 7 insertions, 6 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) ?
diff --git a/modules/m_tburst.c b/modules/m_tburst.c
index 43caef3..89e912c 100644
--- a/modules/m_tburst.c
+++ b/modules/m_tburst.c
@@ -94,7 +94,7 @@ ms_tburst(struct Client *client_p, struct Client *source_p,
int topic_differs = strncmp(chptr->topic, topic, sizeof(chptr->topic) - 1);
int hidden_server = (ConfigServerHide.hide_servers || IsHidden(source_p));
- set_channel_topic(chptr, topic, setby, remote_topic_ts);
+ set_channel_topic(chptr, topic, setby, remote_topic_ts, !!MyClient(source_p));
sendto_server(source_p, CAP_TBURST|CAP_TS6, NOCAPS,
":%s TBURST %s %s %s %s :%s",
diff --git a/modules/m_topic.c b/modules/m_topic.c
index fe4faea..d13c3b9 100644
--- a/modules/m_topic.c
+++ b/modules/m_topic.c
@@ -98,7 +98,7 @@ m_topic(struct Client *client_p, struct Client *source_p,
snprintf(topic_info, sizeof(topic_info), "%s!%s@%s", source_p->name,
source_p->username, source_p->host);
- set_channel_topic(chptr, parv[2], topic_info, CurrentTime);
+ set_channel_topic(chptr, parv[2], topic_info, CurrentTime, !!MyClient(source_p));
sendto_server(client_p, CAP_TS6, NOCAPS,
":%s TOPIC %s :%s",