From c5a46583800374344d8676eccd7061a15a5ac1ce Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Thu, 16 May 2013 01:56:06 +0200 Subject: Allow spaces (and more) in oper types The spaces are converted to '_' characters in OPERTYPE for 2.0 servers Issue #533 suggested by @ankitkv --- src/users.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index 9f4060968..3fd558daf 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -402,7 +402,7 @@ bool LocalUser::HasPrivPermission(const std::string &privstr, bool noisy) } if (noisy) - this->WriteNotice("Oper type " + std::string(oper->NameStr()) + " does not have access to priv " + privstr); + this->WriteNotice("Oper type " + oper->name + " does not have access to priv " + privstr); return false; } @@ -551,10 +551,10 @@ void User::Oper(OperInfo* info) } ServerInstance->SNO->WriteToSnoMask('o',"%s (%s@%s) is now an IRC operator of type %s (using oper '%s')", - nick.c_str(), ident.c_str(), host.c_str(), oper->NameStr(), opername.c_str()); - this->WriteNumeric(381, "%s :You are now %s %s", nick.c_str(), strchr("aeiouAEIOU", oper->name[0]) ? "an" : "a", oper->NameStr()); + nick.c_str(), ident.c_str(), host.c_str(), oper->name.c_str(), opername.c_str()); + this->WriteNumeric(381, "%s :You are now %s %s", nick.c_str(), strchr("aeiouAEIOU", oper->name[0]) ? "an" : "a", oper->name.c_str()); - ServerInstance->Logs->Log("OPER", LOG_DEFAULT, "%s opered as type: %s", GetFullRealHost().c_str(), oper->NameStr()); + ServerInstance->Logs->Log("OPER", LOG_DEFAULT, "%s opered as type: %s", GetFullRealHost().c_str(), oper->name.c_str()); ServerInstance->Users->all_opers.push_back(this); // Expand permissions from config for faster lookup -- cgit v1.3.1-10-gc9f91