- std::string plist;
- for (int j = 0; j < (int)parameters.size(); j++)
- plist.append(std::string(" ")+parameters[j]);
-
- ServerInstance->Logs->Log("m_operlog",DEFAULT,"OPERLOG: [%s!%s@%s] %s%s",user->nick,user->ident,user->host,command.c_str(),plist.c_str());
+ std::string line;
+ if (!parameters.empty())
+ line = irc::stringjoiner(" ", parameters, 0, parameters.size() - 1).GetJoined();
+ std::string msg = "[" + user->GetFullRealHost() + "] " + command + " " + line;
+ ServerInstance->Logs->Log("m_operlog", DEFAULT, "OPERLOG: " + msg);
+ if (tosnomask)
+ ServerInstance->SNO->WriteGlobalSno('r', msg);