]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/xline.cpp
FIX channel user count stuff. next to do, order the user count list
[user/henk/code/inspircd.git] / src / xline.cpp
index 602b678356beb283dfd79f0e72ac81cccb0bded5..a718b809440c6fd11b9d4c4e201c22c89ceca677 100644 (file)
@@ -18,17 +18,7 @@ using namespace std;
 
 #include "inspircd_config.h"
 #include "inspircd.h"
-#include "inspircd_io.h"
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/errno.h>
-#include <time.h>
 #include <string>
-#ifdef GCC3
-#include <ext/hash_map>
-#else
-#include <hash_map>
-#endif
 #include <map>
 #include <sstream>
 #include <vector>
@@ -63,8 +53,8 @@ extern std::vector<userrec*> local_users;
  * very efficient. I have improved the efficiency of the algorithm in two ways:
  *
  * (1) There are now two lists of items for each linetype. One list holds temporary
- *     items, and the other list holds permenant items (ones which will expire).
- *     Items which are on the permenant list are NEVER checked at all by the
+ *     items, and the other list holds permanent items (ones which will expire).
+ *     Items which are on the permanent list are NEVER checked at all by the
  *     expire_lines() function.
  * (2) The temporary xline lists are always kept in strict numerical order, keyed by 
  *     current time + duration. This means that the line which is due to expire the
@@ -476,7 +466,7 @@ char* matches_exception(const char* host)
 }
 
 
-void gline_set_creation_time(char* host, time_t create_time)
+void gline_set_creation_time(const char* host, time_t create_time)
 {
        for (std::vector<GLine>::iterator i = glines.begin(); i != glines.end(); i++)
        {
@@ -497,7 +487,7 @@ void gline_set_creation_time(char* host, time_t create_time)
        return ;        
 }
 
-void eline_set_creation_time(char* host, time_t create_time)
+void eline_set_creation_time(const char* host, time_t create_time)
 {
        for (std::vector<ELine>::iterator i = elines.begin(); i != elines.end(); i++)
        {
@@ -518,7 +508,7 @@ void eline_set_creation_time(char* host, time_t create_time)
        return;
 }
 
-void qline_set_creation_time(char* nick, time_t create_time)
+void qline_set_creation_time(const char* nick, time_t create_time)
 {
        for (std::vector<QLine>::iterator i = qlines.begin(); i != qlines.end(); i++)
        {
@@ -539,7 +529,7 @@ void qline_set_creation_time(char* nick, time_t create_time)
        return;
 }
 
-void zline_set_creation_time(char* ip, time_t create_time)
+void zline_set_creation_time(const char* ip, time_t create_time)
 {
        for (std::vector<ZLine>::iterator i = zlines.begin(); i != zlines.end(); i++)
        {
@@ -721,7 +711,7 @@ void apply_lines(const int What)
        }
 
        Goners->Apply();
-       delete Goners;
+       DELETE(Goners);
 }
 
 void stats_k(userrec* user)
@@ -763,4 +753,3 @@ void stats_e(userrec* user)
        for (std::vector<ELine>::iterator i = pelines.begin(); i != pelines.end(); i++)
                WriteServ(user->fd,"223 %s :%s %d %d %s :%s",user->nick,i->hostmask,i->set_time,i->duration,i->source,i->reason);
 }
-