summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/inspircd.h2
-rw-r--r--src/commands.cpp4
-rw-r--r--src/inspircd.cpp4
-rw-r--r--src/servers.cpp2
4 files changed, 6 insertions, 6 deletions
diff --git a/include/inspircd.h b/include/inspircd.h
index 6cd4c6350..dfe01cd00 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -102,7 +102,7 @@ void force_nickchange(userrec* user,const char* newnick);
void kill_link(userrec *user,const char* r);
void kill_link_silent(userrec *user,const char* r);
void call_handler(const char* commandname,char **parameters, int pcnt, userrec *user);
-long GetRevision();
+std::string GetRevision();
int loop_call(handlerfunc fn, char **parameters, int pcnt, userrec *u, int start, int end, int joins);
void kick_channel(userrec *src,userrec *user, chanrec *Ptr, char* reason);
void AddWhoWas(userrec* u);
diff --git a/src/commands.cpp b/src/commands.cpp
index 87d6db0f0..5ba8440d9 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -3283,9 +3283,9 @@ void handle_link_packet(char* tcp_msg, char* tcp_host, serverrec *serv,char* tcp
return;
}
- if (atoi(revision) != GetRevision())
+ if (std::string(revision) != GetRevision())
{
- WriteOpers("CONNECT aborted: Could not link to %s, is an incompatible version %s, our version is %d",servername,revision,GetRevision());
+ WriteOpers("CONNECT aborted: Could not link to %s, is an incompatible version %s, our version is %s",servername,revision,GetRevision().c_str());
char buffer[MAXBUF];
snprintf(buffer,MAXBUF,"E :Version number mismatch");
serv->SendPacket(buffer,tcp_host);
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 5862400ce..ef9835fd4 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -188,7 +188,7 @@ void DeleteOper(userrec* user)
}
}
-long GetRevision()
+std::string GetRevision()
{
char Revision[] = "$Revision$";
char *s1 = Revision;
@@ -197,7 +197,7 @@ long GetRevision()
s1 = savept;
v2 = strtok_r(s1," ",&savept);
s1 = savept;
- return (long)(atof(v2)*10000);
+ return std::string(v2);
}
diff --git a/src/servers.cpp b/src/servers.cpp
index 440a01e38..fe29948bc 100644
--- a/src/servers.cpp
+++ b/src/servers.cpp
@@ -157,7 +157,7 @@ bool serverrec::BeginLink(char* targethost, int newport, char* password, char* s
// targethost has been turned into an ip...
// we dont want this as the server name.
connector.SetServerName(servername);
- snprintf(connect,MAXBUF,"S %s %s %lu %lu :%s",getservername().c_str(),password,(unsigned long)myport,(unsigned long)GetRevision(),getserverdesc().c_str());
+ snprintf(connect,MAXBUF,"S %s %s %lu %s :%s",getservername().c_str(),password,(unsigned long)myport,GetRevision().c_str(),getserverdesc().c_str());
connector.SetState(STATE_NOAUTH_OUTBOUND);
connector.SetHostAndPort(targethost, newport);
this->connectors.push_back(connector);