mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 11:09:04 -04:00
Start converting WriteOpers calls into snomask 'O' -- generic oper notices.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8727 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
1e5728d84c
commit
932e069f28
@ -45,7 +45,7 @@ bool InspIRCd::HostMatchesEveryone(const std::string &mask, User* user)
|
||||
float percent = ((float)matches / (float)clientlist->size()) * 100;
|
||||
if (percent > (float)atof(itrigger))
|
||||
{
|
||||
WriteOpers("*** \2WARNING\2: %s tried to set a G/K/E line mask of %s, which covers %.2f%% of the network!",user->nick,mask.c_str(),percent);
|
||||
SNO->WriteToSnoMask('O', "\2WARNING\2: %s tried to set a G/K/E line mask of %s, which covers %.2f%% of the network!",user->nick,mask.c_str(),percent);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -74,7 +74,7 @@ bool InspIRCd::IPMatchesEveryone(const std::string &ip, User* user)
|
||||
float percent = ((float)matches / (float)clientlist->size()) * 100;
|
||||
if (percent > (float)atof(itrigger))
|
||||
{
|
||||
WriteOpers("*** \2WARNING\2: %s tried to set a Z line mask of %s, which covers %.2f%% of the network!",user->nick,ip.c_str(),percent);
|
||||
SNO->WriteToSnoMask('O', "\2WARNING\2: %s tried to set a Z line mask of %s, which covers %.2f%% of the network!",user->nick,ip.c_str(),percent);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -103,7 +103,7 @@ bool InspIRCd::NickMatchesEveryone(const std::string &nick, User* user)
|
||||
float percent = ((float)matches / (float)clientlist->size()) * 100;
|
||||
if (percent > (float)atof(itrigger))
|
||||
{
|
||||
WriteOpers("*** \2WARNING\2: %s tried to set a Q line mask of %s, which covers %.2f%% of the network!",user->nick,nick.c_str(),percent);
|
||||
SNO->WriteToSnoMask('O', "\2WARNING\2: %s tried to set a Q line mask of %s, which covers %.2f%% of the network!",user->nick,nick.c_str(),percent);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -38,7 +38,7 @@ CmdResult CommandDie::Handle (const char** parameters, int pcnt, User *user)
|
||||
else
|
||||
{
|
||||
ServerInstance->Log(SPARSE, "Failed /DIE command from %s!%s@%s", user->nick, user->ident, user->host);
|
||||
ServerInstance->WriteOpers("*** Failed DIE Command from %s!%s@%s.",user->nick,user->ident,user->host);
|
||||
ServerInstance->SNO->WriteToSnoMask('O', "Failed DIE Command from %s!%s@%s.",user->nick,user->ident,user->host);
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
return CMD_SUCCESS;
|
||||
|
@ -25,7 +25,7 @@ CmdResult CommandLoadmodule::Handle (const char** parameters, int, User *user)
|
||||
{
|
||||
if (ServerInstance->Modules->Load(parameters[0]))
|
||||
{
|
||||
ServerInstance->WriteOpers("*** NEW MODULE: %s loaded %s",user->nick, parameters[0]);
|
||||
ServerInstance->SNO->WriteToSnoMask('O', "NEW MODULE: %s loaded %s",user->nick, parameters[0]);
|
||||
user->WriteServ("975 %s %s :Module successfully loaded.",user->nick, parameters[0]);
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ CmdResult CommandRehash::Handle (const char** parameters, int pcnt, User *user)
|
||||
}
|
||||
else
|
||||
{
|
||||
ServerInstance->WriteOpers("*** %s is rehashing config file %s",user->nick,ServerConfig::CleanFilename(ServerInstance->ConfigFileName));
|
||||
ServerInstance->SNO->WriteToSnoMask('O', "%s is rehashing config file %s",user->nick,ServerConfig::CleanFilename(ServerInstance->ConfigFileName));
|
||||
ServerInstance->CloseLog();
|
||||
if (!ServerInstance->OpenLog(ServerInstance->Config->argv, ServerInstance->Config->argc))
|
||||
user->WriteServ("*** NOTICE %s :ERROR: Could not open logfile %s: %s", user->nick, ServerInstance->Config->logpath.c_str(), strerror(errno));
|
||||
|
@ -23,16 +23,16 @@ CmdResult CommandReloadmodule::Handle (const char** parameters, int, User *user)
|
||||
{
|
||||
if (ServerInstance->Modules->Unload(parameters[0]))
|
||||
{
|
||||
ServerInstance->WriteOpers("*** RELOAD MODULE: %s unloaded %s",user->nick, parameters[0]);
|
||||
ServerInstance->SNO->WriteToSnoMask('O', "RELOAD MODULE: %s unloaded %s",user->nick, parameters[0]);
|
||||
if (ServerInstance->Modules->Load(parameters[0]))
|
||||
{
|
||||
ServerInstance->WriteOpers("*** RELOAD MODULE: %s reloaded %s",user->nick, parameters[0]);
|
||||
ServerInstance->SNO->WriteToSnoMask('O', "RELOAD MODULE: %s reloaded %s",user->nick, parameters[0]);
|
||||
user->WriteServ("975 %s %s :Module successfully reloaded.",user->nick, parameters[0]);
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
ServerInstance->WriteOpers("*** RELOAD MODULE: %s unsuccessfully reloaded %s",user->nick, parameters[0]);
|
||||
ServerInstance->SNO->WriteToSnoMask('O', "RELOAD MODULE: %s unsuccessfully reloaded %s",user->nick, parameters[0]);
|
||||
user->WriteServ("975 %s %s :%s",user->nick, parameters[0], ServerInstance->Modules->LastError().c_str());
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ CmdResult CommandRestart::Handle (const char** parameters, int, User *user)
|
||||
ServerInstance->Log(DEFAULT,"Restart: %s",user->nick);
|
||||
if (!strcmp(parameters[0],ServerInstance->Config->restartpass))
|
||||
{
|
||||
ServerInstance->WriteOpers("*** RESTART command from %s!%s@%s, restarting server.",user->nick,user->ident,user->host);
|
||||
ServerInstance->SNO->WriteToSnoMask('O', "RESTART command from %s!%s@%s, restarting server.",user->nick,user->ident,user->host);
|
||||
|
||||
try
|
||||
{
|
||||
@ -38,7 +38,7 @@ CmdResult CommandRestart::Handle (const char** parameters, int, User *user)
|
||||
}
|
||||
else
|
||||
{
|
||||
ServerInstance->WriteOpers("*** Failed RESTART Command from %s!%s@%s.",user->nick,user->ident,user->host);
|
||||
ServerInstance->SNO->WriteToSnoMask('O', "Failed RESTART Command from %s!%s@%s.",user->nick,user->ident,user->host);
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,6 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
|
||||
CmdResult CommandServer::Handle (const char**, int, User *user)
|
||||
{
|
||||
user->WriteServ("666 %s :You cannot identify as a server, you are a USER. IRC Operators informed.",user->nick);
|
||||
ServerInstance->WriteOpers("*** WARNING: %s attempted to issue a SERVER command and is registered as a user!",user->nick);
|
||||
ServerInstance->SNO->WriteToSnoMask('O', "WARNING: %s attempted to issue a SERVER command and is registered as a user!", user->nick);
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ CmdResult CommandUnloadmodule::Handle (const char** parameters, int, User *user)
|
||||
{
|
||||
if (ServerInstance->Modules->Unload(parameters[0]))
|
||||
{
|
||||
ServerInstance->WriteOpers("*** MODULE UNLOADED: %s unloaded %s", user->nick, parameters[0]);
|
||||
ServerInstance->SNO->WriteToSnoMask('O', "MODULE UNLOADED: %s unloaded %s", user->nick, parameters[0]);
|
||||
user->WriteServ("973 %s %s :Module successfully unloaded.",user->nick, parameters[0]);
|
||||
}
|
||||
else
|
||||
|
@ -29,7 +29,6 @@ SnomaskManager::~SnomaskManager()
|
||||
|
||||
void SnomaskManager::FlushSnotices()
|
||||
{
|
||||
// stub.. not yet written XXX
|
||||
for (std::map<char, Snomask *>::iterator i = SnoMasks.begin(); i != SnoMasks.end(); i++)
|
||||
{
|
||||
i->second->Flush();
|
||||
@ -89,13 +88,14 @@ bool SnomaskManager::IsEnabled(char letter)
|
||||
void SnomaskManager::SetupDefaults()
|
||||
{
|
||||
this->EnableSnomask('c',"CONNECT"); /* Local connect notices */
|
||||
this->EnableSnomask('C',"REMOTECONNECT"); /* Remote connect notices */
|
||||
this->EnableSnomask('C',"REMOTECONNECT"); /* Remote connect notices */
|
||||
this->EnableSnomask('q',"QUIT"); /* Local quit notices */
|
||||
this->EnableSnomask('Q',"REMOTEQUIT"); /* Remote quit notices */
|
||||
this->EnableSnomask('Q',"REMOTEQUIT"); /* Remote quit notices */
|
||||
this->EnableSnomask('k',"KILL"); /* Kill notices */
|
||||
this->EnableSnomask('K',"REMOTEKILL"); /* Remote kill notices */
|
||||
this->EnableSnomask('K',"REMOTEKILL"); /* Remote kill notices */
|
||||
this->EnableSnomask('l',"LINK"); /* Link notices */
|
||||
this->EnableSnomask('o',"OPER"); /* Oper up/down notices */
|
||||
this->EnableSnomask('O',"ALLOPERS"); /* WriteOpers() - generic notices to all opers */
|
||||
this->EnableSnomask('d',"DEBUG"); /* Debug notices */
|
||||
this->EnableSnomask('x',"XLINE"); /* Xline notice (g/z/q/k/e) */
|
||||
this->EnableSnomask('t',"STATS"); /* Local or remote stats request */
|
||||
|
Loading…
x
Reference in New Issue
Block a user