X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fserver.cpp;h=822b466241b0bc459f09480818ec891ccc0fc76a;hb=19963bd452eac3c9fc52b3ee60fbf1a81efed7d3;hp=57b853ebb1efdac7e616b021ddbd5efd84f430e9;hpb=585138e4a46a3c9f3ad3666f675d178922a81815;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/server.cpp b/src/server.cpp index 57b853ebb..822b46624 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -2,7 +2,7 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2009 InspIRCd Development Team + * InspIRCd: (C) 2002-2010 InspIRCd Development Team * See: http://wiki.inspircd.org/Credits * * This program is free but copyrighted software; see @@ -11,8 +11,6 @@ * --------------------------------------------------- */ -/* $Core */ - #include #include "exitcodes.h" #include "inspircd.h" @@ -59,17 +57,13 @@ void RehashHandler::Call(const std::string &reason) } } -std::string InspIRCd::GetVersionString() +std::string InspIRCd::GetVersionString(bool operstring) { char versiondata[MAXBUF]; - if (!Config->CustomVersion.empty()) - { - snprintf(versiondata,MAXBUF,"InspIRCd-2.0 %s :%s",Config->ServerName.c_str(),Config->CustomVersion.c_str()); - } + if (operstring) + snprintf(versiondata,MAXBUF,"%s %s :%s [%s,%s,%s]",VERSION,Config->ServerName.c_str(),SYSTEM,REVISION,SE->GetName().c_str(),Config->sid.c_str()); else - { - snprintf(versiondata,MAXBUF,"InspIRCd-2.0 %s :%s (%s) [FLAGS=%s,%s,%s]",Config->ServerName.c_str(),SYSTEM,VERSION,REVISION,SE->GetName().c_str(),Config->sid.c_str()); - } + snprintf(versiondata,MAXBUF,"InspIRCd-2.0 %s :%s",Config->ServerName.c_str(),Config->CustomVersion.c_str()); return versiondata; } @@ -78,7 +72,7 @@ void InspIRCd::BuildISupport() // the neatest way to construct the initial 005 numeric, considering the number of configure constants to go in it... std::stringstream v; v << "WALLCHOPS WALLVOICES MODES=" << Config->Limits.MaxModes - 1 << " CHANTYPES=# PREFIX=" << this->Modes->BuildPrefixes() << " MAP MAXCHANNELS=" << Config->MaxChans << " MAXBANS=60 VBANLIST NICKLEN=" << Config->Limits.NickMax - 1; - v << " CASEMAPPING=rfc1459 STATUSMSG=@" << (this->Config->AllowHalfop ? "%" : "") << "+ CHARSET=ascii TOPICLEN=" << Config->Limits.MaxTopic - 1 << " KICKLEN=" << Config->Limits.MaxKick - 1 << " MAXTARGETS=" << Config->MaxTargets - 1; + v << " CASEMAPPING=rfc1459 STATUSMSG=" << Modes->BuildPrefixes(false) << " CHARSET=ascii TOPICLEN=" << Config->Limits.MaxTopic - 1 << " KICKLEN=" << Config->Limits.MaxKick - 1 << " MAXTARGETS=" << Config->MaxTargets - 1; v << " AWAYLEN=" << Config->Limits.MaxAway - 1 << " CHANMODES=" << this->Modes->GiveModeList(MASK_CHANNEL) << " FNC NETWORK=" << Config->Network << " MAXPARA=32 ELIST=MU"; Config->data005 = v.str(); FOREACH_MOD(I_On005Numeric,On005Numeric(Config->data005));