summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/commands.cpp6
-rw-r--r--src/commands/cmd_die.cpp2
-rw-r--r--src/commands/cmd_loadmodule.cpp2
-rw-r--r--src/commands/cmd_rehash.cpp2
-rw-r--r--src/commands/cmd_reloadmodule.cpp6
-rw-r--r--src/commands/cmd_restart.cpp4
-rw-r--r--src/commands/cmd_server.cpp2
-rw-r--r--src/commands/cmd_unloadmodule.cpp2
-rw-r--r--src/snomasks.cpp8
9 files changed, 17 insertions, 17 deletions
diff --git a/src/commands.cpp b/src/commands.cpp
index 69b361e99..b1e1be5df 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -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;
diff --git a/src/commands/cmd_die.cpp b/src/commands/cmd_die.cpp
index 7ff81987c..0a82c5b58 100644
--- a/src/commands/cmd_die.cpp
+++ b/src/commands/cmd_die.cpp
@@ -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;
diff --git a/src/commands/cmd_loadmodule.cpp b/src/commands/cmd_loadmodule.cpp
index 20b5300b6..a7f6d2b0d 100644
--- a/src/commands/cmd_loadmodule.cpp
+++ b/src/commands/cmd_loadmodule.cpp
@@ -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;
}
diff --git a/src/commands/cmd_rehash.cpp b/src/commands/cmd_rehash.cpp
index 036fb4a63..c5228148d 100644
--- a/src/commands/cmd_rehash.cpp
+++ b/src/commands/cmd_rehash.cpp
@@ -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));
diff --git a/src/commands/cmd_reloadmodule.cpp b/src/commands/cmd_reloadmodule.cpp
index 8d700308e..73617edc1 100644
--- a/src/commands/cmd_reloadmodule.cpp
+++ b/src/commands/cmd_reloadmodule.cpp
@@ -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;
}
diff --git a/src/commands/cmd_restart.cpp b/src/commands/cmd_restart.cpp
index 96217591a..701d7db61 100644
--- a/src/commands/cmd_restart.cpp
+++ b/src/commands/cmd_restart.cpp
@@ -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;
}
diff --git a/src/commands/cmd_server.cpp b/src/commands/cmd_server.cpp
index 446418dd3..f069e7713 100644
--- a/src/commands/cmd_server.cpp
+++ b/src/commands/cmd_server.cpp
@@ -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;
}
diff --git a/src/commands/cmd_unloadmodule.cpp b/src/commands/cmd_unloadmodule.cpp
index 135f9de3b..8f34fbec9 100644
--- a/src/commands/cmd_unloadmodule.cpp
+++ b/src/commands/cmd_unloadmodule.cpp
@@ -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
diff --git a/src/snomasks.cpp b/src/snomasks.cpp
index 136947107..02dfb7c2f 100644
--- a/src/snomasks.cpp
+++ b/src/snomasks.cpp
@@ -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 */