mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 02:59:01 -04:00
Removed references to connection.cpp and servers.cpp
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1948 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
5cb26fde8d
commit
f8d06e13c6
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user