]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_shun.cpp
Add a snotice when a user tries to use WEBIRC without matching any configured blocks.
[user/henk/code/inspircd.git] / src / modules / m_shun.cpp
index 5527bd6ad5f312c0c49c33e6b8adaaf144d157a9..1127d397dbf27aa65fab9f587adeefb69b90c431 100644 (file)
@@ -54,7 +54,7 @@ public:
 
        void DisplayExpiry()
        {
-               ServerInstance->SNO->WriteToSnoMask('x',"Expiring timed shun %s (set by %s %ld seconds ago)", this->matchtext.c_str(), this->source, this->duration);
+               ServerInstance->SNO->WriteToSnoMask('x',"Removing expired shun %s (set by %s %ld seconds ago)", this->matchtext.c_str(), this->source, (long int)(ServerInstance->Time() - this->set_time));
        }
 
        const char* Displayable()
@@ -243,7 +243,8 @@ class ModuleShun : public Module
 
                if (i == ShunEnabledCommands.end())
                {
-                       user->WriteServ("NOTICE %s :*** Command %s not processed, as you have been blocked from issuing commands (SHUN)", user->nick.c_str(), command.c_str());
+                       if (NotifyOfShun)
+                               user->WriteServ("NOTICE %s :*** Command %s not processed, as you have been blocked from issuing commands (SHUN)", user->nick.c_str(), command.c_str());
                        return 1;
                }