* ---------------------------------------------------
*/
+using namespace std;
+
#include "inspircd.h"
#include "inspircd_io.h"
#include "inspircd_util.h"
#include <sys/errno.h>
#include <sys/ioctl.h>
#include <sys/utsname.h>
+
#ifdef USE_KQUEUE
#include <sys/types.h>
#include <sys/event.h>
#include <sys/time.h>
#endif
+
+#ifdef USE_EPOLL
+#include <sys/epoll.h>
+#endif
+
#include <cstdio>
#include <time.h>
#include <string>
#include "helperfuncs.h"
#include "hashcomp.h"
-using namespace std;
-
#ifdef USE_KQUEUE
extern int kq;
#endif
+#ifdef USE_EPOLL
+int ep;
+#endif
+
extern int MODCOUNT;
-extern std::vector<Module*, __single_client_alloc> modules;
-extern std::vector<ircd_module*, __single_client_alloc> factory;
+extern std::vector<Module*> modules;
+extern std::vector<ircd_module*> factory;
extern int LogLevel;
extern char ServerName[MAXBUF];
extern time_t TIME;
-extern std::vector<std::string, __single_client_alloc> module_names;
+extern std::vector<std::string> module_names;
extern char MyExecutable[1024];
extern int boundPortCount;
const long duration_w = duration_d * 7;
const long duration_y = duration_w * 52;
-typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> user_hash;
-typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> chan_hash;
-typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, irc::InAddr_HashComp, __single_client_alloc> address_cache;
-typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, irc::StrHashComp, __single_client_alloc> whowas_hash;
-typedef std::deque<command_t, __single_client_alloc> command_table;
+typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp> user_hash;
+typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp> chan_hash;
+typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, irc::InAddr_HashComp> address_cache;
+typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, irc::StrHashComp> whowas_hash;
+typedef std::deque<command_t> command_table;
extern user_hash clientlist;
extern file_cache RULES;
extern address_cache IP;
-extern std::vector<userrec*, __single_client_alloc> all_opers;
+extern std::vector<userrec*> all_opers;
// This table references users by file descriptor.
// its an array to make it VERY fast, as all lookups are referenced
{
log(DEBUG,"kqueue: Failed to remove user from queue!");
}
+#endif
+#ifdef USE_EPOLL
+ struct epoll_event ev;
+ ev.events = EPOLLIN | EPOLLET;
+ ev.data.fd = user->fd;
+ int i = epoll_ctl(ep, EPOLL_CTL_DEL, user->fd, &ev);
+ if (i < 0)
+ {
+ log(DEBUG,"epoll: List deletion failure!");
+ }
#endif
shutdown(user->fd,2);
close(user->fd);