X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fusers.cpp;h=3e1b4a8d46dc76aa0826424c43bceaa2ae9994f9;hb=7b47de3c194f239c5fea09a0e49696c9af017d51;hp=0d5d2a7d70c509f883cc15c0f5ee504f0cec7924;hpb=d5d1311145b5eb5dbf4efd12f73d48150b1f9689;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/users.cpp b/src/users.cpp index 0d5d2a7d7..3e1b4a8d4 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -121,7 +121,6 @@ const std::string& User::MakeHost() if (!this->cached_makehost.empty()) return this->cached_makehost; - // XXX: Is there really a need to cache this? this->cached_makehost = ident + "@" + GetRealHost(); return this->cached_makehost; } @@ -131,7 +130,6 @@ const std::string& User::MakeHostIP() if (!this->cached_hostip.empty()) return this->cached_hostip; - // XXX: Is there really a need to cache this? this->cached_hostip = ident + "@" + this->GetIPString(); return this->cached_hostip; } @@ -141,7 +139,6 @@ const std::string& User::GetFullHost() if (!this->cached_fullhost.empty()) return this->cached_fullhost; - // XXX: Is there really a need to cache this? this->cached_fullhost = nick + "!" + ident + "@" + GetDisplayedHost(); return this->cached_fullhost; } @@ -151,7 +148,6 @@ const std::string& User::GetFullRealHost() if (!this->cached_fullrealhost.empty()) return this->cached_fullrealhost; - // XXX: Is there really a need to cache this? this->cached_fullrealhost = nick + "!" + ident + "@" + GetRealHost(); return this->cached_fullrealhost; } @@ -167,7 +163,7 @@ bool LocalUser::HasModePermission(const ModeHandler* mh) const return false; const unsigned char mode = mh->GetModeChar(); - if (ModeParser::IsModeChar(mode)) + if (!ModeParser::IsModeChar(mode)) return false; return ((mh->GetModeType() == MODETYPE_USER ? oper->AllowedUserModes : oper->AllowedChanModes))[(mode - 'A')]; @@ -368,7 +364,7 @@ void User::Oper(OperInfo* info) if (info->oper_block) opername = info->oper_block->getString("name"); - ServerInstance->SNO->WriteToSnoMask('o',"%s (%s@%s) is now an IRC operator of type %s (using oper '%s')", + ServerInstance->SNO->WriteToSnoMask('o', "%s (%s@%s) is now a server operator of type %s (using oper '%s')", nick.c_str(), ident.c_str(), GetRealHost().c_str(), oper->name.c_str(), opername.c_str()); this->WriteNumeric(RPL_YOUAREOPER, InspIRCd::Format("You are now %s %s", strchr("aeiouAEIOU", oper->name[0]) ? "an" : "a", oper->name.c_str()));