]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_ircv3.cpp
Sync helpop chmodes s and p with docs
[user/henk/code/inspircd.git] / src / modules / m_ircv3.cpp
index 14b1cf8a161ee46ca601fd4a74352fb5348f4c93..e23999045934fe66e83c97e275d62254e7625410 100644 (file)
@@ -1,7 +1,8 @@
 /*
  * InspIRCd -- Internet Relay Chat Daemon
  *
- *   Copyright (C) 2012 Attila Molnar <attilamolnar@hush.com>
+ *   Copyright (C) 2013, 2018-2019 Sadie Powell <sadie@witchery.services>
+ *   Copyright (C) 2012-2013, 2015, 2018 Attila Molnar <attilamolnar@hush.com>
  *
  * This file is part of InspIRCd.  InspIRCd is free software: you can
  * redistribute it and/or modify it under the terms of the GNU General Public
@@ -50,10 +51,10 @@ class JoinHook : public ClientProtocol::EventHook
        ClientProtocol::Events::Join extendedjoinmsg;
 
  public:
-       const std::string asterisk;
+       const std::string asterisk;
        ClientProtocol::EventProvider awayprotoev;
        AwayMessage awaymsg;
-       Cap::Capability extendedjoincap;
+       Cap::Capability extendedjoincap;
        Cap::Capability awaycap;
 
        JoinHook(Module* mod)
@@ -139,6 +140,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);
@@ -172,7 +176,7 @@ class ModuleIRCv3
 
        Version GetVersion() CXX11_OVERRIDE
        {
-               return Version("Provides support for extended-join, away-notify and account-notify CAP capabilities", VF_VENDOR);
+               return Version("Provides the IRCv3 account-notify, away-notify, and extended-join client capabilities.", VF_VENDOR);
        }
 };