summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/socketengine.h30
-rw-r--r--src/inspircd.cpp75
2 files changed, 1 insertions, 104 deletions
diff --git a/include/socketengine.h b/include/socketengine.h
index 33dc77894..9a4610f5f 100644
--- a/include/socketengine.h
+++ b/include/socketengine.h
@@ -280,20 +280,6 @@
printf("ERROR: could not initialise listening sockets in epoll list. Shutting down.\n"); \
Exit(ERROR); \
} \
- } \
- for (int t = 0; t != SERVERportCount; t++) \
- { \
- struct epoll_event ev; \
- log(DEBUG,"epoll: Add listening server socket to events, ep=%d socket=%d",sep,me[t]->fd); \
- ev.events = EPOLLIN | EPOLLET; \
- ev.data.fd = me[t]->fd; \
- int i = epoll_ctl(sep, EPOLL_CTL_ADD, me[t]->fd, &ev); \
- if (i == -1) \
- { \
- log(DEFAULT,"main: add server listen ports, epoll_ctl failed!"); \
- printf("ERROR: could not initialise server listening sockets in epoll list. Shutting down.\n"); \
- Exit(ERROR); \
- } \
}
#define kqueue_server_fill log(DEFAULT,"kqueue socket engine is enabled. Filling listen list."); \
@@ -309,22 +295,6 @@
printf("ERROR: could not initialise listening sockets in kqueue. Shutting down.\n"); \
Exit(ERROR); \
} \
- } \
- for (int t = 0; t != SERVERportCount; t++) \
- { \
- struct kevent ke; \
- if (me[t]) \
- { \
- log(DEBUG,"kqueue: Add listening SERVER socket to events, kq=%d socket=%d",skq,me[t]->fd); \
- EV_SET(&ke, me[t]->fd, EVFILT_READ, EV_ADD, 0, MaxConn, NULL); \
- int i = kevent(skq, &ke, 1, 0, 0, NULL); \
- if (i == -1) \
- { \
- log(DEFAULT,"main: add server listen ports to kqueue failed!"); \
- printf("ERROR: could not initialise listening server sockets in kqueue. Shutting down.\n"); \
- Exit(ERROR); \
- } \
- } \
}
#ifdef USE_EPOLL
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 17ad9d59d..50536099d 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -1555,61 +1555,7 @@ std::string GetVersionString()
void handle_version(char **parameters, int pcnt, userrec *user)
{
- if (!pcnt)
- {
- WriteServ(user->fd,"351 %s :%s",user->nick,GetVersionString().c_str());
- }
- else
- {
- if (!strcmp(parameters[0],"*"))
- {
- for (int j = 0; j < 32; j++)
- {
- if (me[j] != NULL)
- {
- for (unsigned int x = 0; x < me[j]->connectors.size(); x++)
- {
- WriteServ(user->fd,"351 %s :Server %d:%d (%s): %s",user->nick,j,x,me[j]->connectors[x].GetServerName().c_str(),me[j]->connectors[x].GetVersionString().c_str());
- }
- }
- }
- return;
- }
- if (match(ServerName,parameters[0]))
- {
- WriteServ(user->fd,"351 %s :%s",user->nick,GetVersionString().c_str());
- return;
- }
- bool displayed = false, found = false;
- for (int j = 0; j < 32; j++)
- {
- if (me[j] != NULL)
- {
- for (unsigned int x = 0; x < me[j]->connectors.size(); x++)
- {
- if (match(me[j]->connectors[x].GetServerName().c_str(),parameters[0]))
- {
- found = true;
- if ((me[j]->connectors[x].GetVersionString() != "") && (!displayed))
- {
- displayed = true;
- WriteServ(user->fd,"351 %s :%s",user->nick,me[j]->connectors[x].GetVersionString().c_str());
- }
- }
- }
- }
- }
- if ((!displayed) && (found))
- {
- WriteServ(user->fd,"402 %s %s :Server %s has no version information",user->nick,parameters[0],parameters[0]);
- return;
- }
- if (!found)
- {
- WriteServ(user->fd,"402 %s %s :No such server",user->nick,parameters[0]);
- }
- }
- return;
+ WriteServ(user->fd,"351 %s :%s",user->nick,GetVersionString().c_str());
}
@@ -2206,25 +2152,6 @@ bool LoadModule(const char* filename)
}
-bool GotServer(std::string name)
-{
- for (int j = 0; j < 32; j++)
- {
- if (me[j] != NULL)
- {
- for (unsigned int k = 0; k < me[j]->connectors.size(); k++)
- {
- if (name == me[j]->connectors[k].GetServerName())
- {
- return true;
- }
- }
- }
- }
- return false;
-}
-
-
int InspIRCd(char** argv, int argc)
{
struct sockaddr_in client,server;