* ---------------------------------------------------
*/
+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*> modules;
extern std::vector<ircd_module*> factory;
}
}
+void handle_commands(char **parameters, int pcnt, userrec *user)
+{
+ for (int i = 0; i < command_table.size(); i++)
+ {
+ WriteServ(user->fd,"902 %s :%s %s",user->nick,command_table[i].command,command_table[i].source);
+ }
+ WriteServ(user->fd,"903 %s :End of COMMANDS list");
+}
+
void handle_kick(char **parameters, int pcnt, userrec *user)
{
chanrec* Ptr = FindChan(parameters[0]);
{
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);