]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_timedbans.cpp
Gah, im forgetting to SetMode!
[user/henk/code/inspircd.git] / src / modules / m_timedbans.cpp
index 190f89f0eda71dc8575c52dcc771c3a82bcdf8df..b1b0de25f7ebaac3292f818e01d209ad4f9bbefa 100644 (file)
@@ -62,8 +62,8 @@ class cmd_tban : public command_t
                                }
                                for (timedbans::iterator i = TimedBanList.begin(); i < TimedBanList.end(); i++)
                                {
-                                       irc::string listitem = i->mask.c_str();
-                                       irc::string target = parameters[2];
+                                       irc::string listitem = i->mask.c_str();
+                                       irc::string target = parameters[2];
                                        irc::string listchan = i->channel.c_str();
                                        irc::string targetchan = parameters[0];
                                        if ((listitem == target) && (listchan == targetchan))
@@ -129,16 +129,16 @@ class ModuleTimedBans : public Module
 
        virtual int OnDelBan(userrec* source, chanrec* chan, const std::string &banmask)
        {
-                for (timedbans::iterator i = TimedBanList.begin(); i < TimedBanList.end(); i++)
-                {
-                        irc::string listitem = banmask.c_str();
-                        irc::string target = i->mask.c_str();
-                        if (listitem == target)
-                        {
-                                TimedBanList.erase(i);
-                                break;
-                        }
-                }
+               for (timedbans::iterator i = TimedBanList.begin(); i < TimedBanList.end(); i++)
+               {
+                       irc::string listitem = banmask.c_str();
+                       irc::string target = i->mask.c_str();
+                       if (listitem == target)
+                       {
+                               TimedBanList.erase(i);
+                               break;
+                       }
+               }
                return 0;
        }
 
@@ -170,7 +170,7 @@ class ModuleTimedBans : public Module
                                                temp->fd = FD_MAGIC_NUMBER;
                                                temp->server = "";
                                                Srv->SendMode(setban,3,temp);
-                                               delete temp;
+                                               DELETE(temp);
                                        }
                                        // we used to delete the item here, but we dont need to as the servermode above does it for us,
                                        break;