summaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp75
1 files changed, 1 insertions, 74 deletions
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;