- ServerInstance->Logs->Log("m_operlog",DEFAULT,"OPERLOG: [%s!%s@%s] %s %s",user->nick.c_str(), user->ident.c_str(), user->host.c_str(), command.c_str(), irc::stringjoiner(" ", parameters, 0, parameters.size() - 1).GetJoined().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", LOG_DEFAULT, "OPERLOG: " + msg);
+ if (tosnomask)
+ ServerInstance->SNO->WriteGlobalSno('r', msg);
+ }