]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_dccallow.cpp
Move _ext to replace the original, SVSSILENCE comes next
[user/henk/code/inspircd.git] / src / modules / m_dccallow.cpp
index 96e0798f55423e8853ba1c7e5be793cea39680a4..747616bc0a5d611fdfcfd733fbde91b3a30c4f16 100644 (file)
 
 static ConfigReader *Conf;
 
-class BannedFileList
+class BannedFileList : public classbase
 {
  public:
        std::string filemask;
        std::string action;
 };
 
-class DCCAllow
+class DCCAllow : public classbase
 {
  public:
        std::string nickname;
@@ -172,7 +172,7 @@ class CommandDccallow : public Command
                        
                                        if (length > 0)
                                        {
-                                               user->WriteNumeric(993, "%s %s :Added %s to DCCALLOW list for %d seconds", user->nick, user->nick, target->nick, length);
+                                               user->WriteNumeric(993, "%s %s :Added %s to DCCALLOW list for %ld seconds", user->nick, user->nick, target->nick, length);
                                        }
                                        else
                                        {
@@ -379,7 +379,7 @@ class ModuleDCCAllow : public Module
                                        dccallowlist::iterator iter2 = dl->begin();
                                        while (iter2 != dl->end())
                                        {
-                                               if ((iter2->set_on + iter2->length) <= ServerInstance->Time())
+                                               if (iter2->length != 0 && (iter2->set_on + iter2->length) <= ServerInstance->Time())
                                                {
                                                        u->WriteNumeric(997, "%s %s :DCCALLOW entry for %s has expired", u->nick, u->nick, iter2->nickname.c_str());
                                                        iter2 = dl->erase(iter2);