summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2019-08-01 00:11:12 +0100
committerPeter Powell <petpow@saberuk.com>2019-08-01 00:11:12 +0100
commit4e3d655dff6f8a5aed626475fbf19c2a7119c20b (patch)
tree9e0372da3f33f800d5ed1f77ad1599520a152477 /src
parentc6b5da1f6fdb1bc54ebe97ebe3666ad9ae85e99b (diff)
Only send ACCOUNT and CHGHOST to clients that have sent NICK/USER.
Closes #1657.
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_ircv3.cpp3
-rw-r--r--src/modules/m_ircv3_chghost.cpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/modules/m_ircv3.cpp b/src/modules/m_ircv3.cpp
index 14b1cf8a1..d65cd8695 100644
--- a/src/modules/m_ircv3.cpp
+++ b/src/modules/m_ircv3.cpp
@@ -139,6 +139,9 @@ class ModuleIRCv3
void OnAccountChange(User* user, const std::string& newaccount) CXX11_OVERRIDE
{
+ if (!(user->registered & REG_NICKUSER))
+ return;
+
// Logged in: 1 parameter which is the account name
// Logged out: 1 parameter which is a "*"
ClientProtocol::Message msg("ACCOUNT", user);
diff --git a/src/modules/m_ircv3_chghost.cpp b/src/modules/m_ircv3_chghost.cpp
index d78689178..289f05753 100644
--- a/src/modules/m_ircv3_chghost.cpp
+++ b/src/modules/m_ircv3_chghost.cpp
@@ -28,6 +28,9 @@ class ModuleIRCv3ChgHost : public Module
void DoChgHost(User* user, const std::string& ident, const std::string& host)
{
+ if (!(user->registered & REG_NICKUSER))
+ return;
+
ClientProtocol::Message msg("CHGHOST", user);
msg.PushParamRef(ident);
msg.PushParamRef(host);