diff options
-rw-r--r-- | include/inspircd.h | 2 | ||||
-rw-r--r-- | src/commands/cmd_version.cpp | 2 | ||||
-rw-r--r-- | src/server.cpp | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/include/inspircd.h b/include/inspircd.h index 5f8fb1992..a9a1af482 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -734,7 +734,7 @@ class CoreExport InspIRCd /** Returns the full version string of this ircd * @return The version string */ - std::string GetVersionString(); + std::string GetVersionString(bool rawversion = false); /** Attempt to write the process id to a given file * @param filename The PID file to attempt to write to diff --git a/src/commands/cmd_version.cpp b/src/commands/cmd_version.cpp index b16107fd0..3064c9440 100644 --- a/src/commands/cmd_version.cpp +++ b/src/commands/cmd_version.cpp @@ -48,7 +48,7 @@ class CommandVersion : public Command CmdResult CommandVersion::Handle (const std::vector<std::string>&, User *user) { - user->WriteNumeric(RPL_VERSION, "%s :%s",user->nick.c_str(),ServerInstance->GetVersionString().c_str()); + user->WriteNumeric(RPL_VERSION, "%s :%s",user->nick.c_str(),ServerInstance->GetVersionString(IS_OPER(user)).c_str()); ServerInstance->Config->Send005(user); return CMD_SUCCESS; } diff --git a/src/server.cpp b/src/server.cpp index c5e784a1c..339beff7a 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -59,10 +59,10 @@ void RehashHandler::Call(const std::string &reason) } } -std::string InspIRCd::GetVersionString() +std::string InspIRCd::GetVersionString(bool operstring) { char versiondata[MAXBUF]; - if (!Config->CustomVersion.empty()) + if (!operstring && !Config->CustomVersion.empty()) { snprintf(versiondata,MAXBUF,"InspIRCd-2.0 %s :%s",Config->ServerName.c_str(),Config->CustomVersion.c_str()); } |