]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/extra/m_sslrehashsignal.cpp
Allow 'tls' to be used in /REHASH.
[user/henk/code/inspircd.git] / src / modules / extra / m_sslrehashsignal.cpp
index fea32326a29fe209406b32f247ee9a499acb297a..e5b7fe9a5cac8157f15c02533710d4651c93390f 100644 (file)
@@ -1,8 +1,7 @@
 /*
  * InspIRCd -- Internet Relay Chat Daemon
  *
- *   Copyright (C) 2018 Peter Powell <petpow@saberuk.com>
- *   Copyright (C) 2016 Attila Molnar <attilamolnar@hush.com>
+ *   Copyright (C) 2018-2019 Sadie Powell <sadie@witchery.services>
  *
  * 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
@@ -33,31 +32,31 @@ class ModuleSSLRehashSignal : public Module
  public:
        ~ModuleSSLRehashSignal()
        {
-               signal(SIGUSR1, SIG_DFL);
+               signal(SIGUSR1, SIG_IGN);
        }
 
-       void init()
+       void init() CXX11_OVERRIDE
        {
                signal(SIGUSR1, SignalHandler);
        }
 
-       void OnBackgroundTimer(time_t)
+       void OnBackgroundTimer(time_t) CXX11_OVERRIDE
        {
                if (!signaled)
                        return;
 
-               const std::string feedbackmsg = "Got SIGUSR1, reloading SSL credentials";
+               const std::string feedbackmsg = "Got SIGUSR1, reloading TLS (SSL) credentials";
                ServerInstance->SNO->WriteGlobalSno('a', feedbackmsg);
                ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, feedbackmsg);
 
-               const std::string str = "ssl";
+               const std::string str = "tls";
                FOREACH_MOD(OnModuleRehash, (NULL, str));
                signaled = 0;
        }
 
-       Version GetVersion()
+       Version GetVersion() CXX11_OVERRIDE
        {
-               return Version("Reloads SSL credentials on SIGUSR1", VF_VENDOR);
+               return Version("Allows the SIGUSR1 signal to be sent to the server to reload TLS (SSL) certificates.", VF_VENDOR);
        }
 };