diff options
author | Adam <Adam@anope.org> | 2012-10-27 08:12:04 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-10-27 08:12:04 -0400 |
commit | d6e1b92059688c8b59df0eedccfb16781d193591 (patch) | |
tree | e61ace0908bae241ea4cac18331a99b441981dad /modules/commands | |
parent | bb5f4555dce8bdfa7124db87c72a084c9d9416a1 (diff) |
Add a module log type
Diffstat (limited to 'modules/commands')
-rw-r--r-- | modules/commands/ms_rsend.cpp | 2 | ||||
-rw-r--r-- | modules/commands/ns_register.cpp | 2 | ||||
-rw-r--r-- | modules/commands/os_defcon.cpp | 6 | ||||
-rw-r--r-- | modules/commands/os_dns.cpp | 16 | ||||
-rw-r--r-- | modules/commands/os_module.cpp | 2 | ||||
-rw-r--r-- | modules/commands/os_reload.cpp | 2 | ||||
-rw-r--r-- | modules/commands/os_session.cpp | 2 |
7 files changed, 16 insertions, 16 deletions
diff --git a/modules/commands/ms_rsend.cpp b/modules/commands/ms_rsend.cpp index 9b6545f7f..9c47b9f53 100644 --- a/modules/commands/ms_rsend.cpp +++ b/modules/commands/ms_rsend.cpp @@ -44,7 +44,7 @@ class CommandMSRSend : public Command source.Reply(ACCESS_DENIED); else if (Config->MSMemoReceipt > 2 || Config->MSMemoReceipt == 0) { - Log() << "MSMemoReceipt is set misconfigured to " << Config->MSMemoReceipt; + Log(this->owner) << "MSMemoReceipt is set misconfigured to " << Config->MSMemoReceipt; source.Reply(_("Sorry, RSEND has been disabled on this network.")); } else diff --git a/modules/commands/ns_register.cpp b/modules/commands/ns_register.cpp index f7675ca60..0413f8cc8 100644 --- a/modules/commands/ns_register.cpp +++ b/modules/commands/ns_register.cpp @@ -307,7 +307,7 @@ class CommandNSResend : public Command Log(LOG_COMMAND, source, this) << "to resend registration verification code"; } else - Log() << "Unable to resend registration verification code for " << source.GetNick(); + Log(this->owner) << "Unable to resend registration verification code for " << source.GetNick(); } return; diff --git a/modules/commands/os_defcon.cpp b/modules/commands/os_defcon.cpp index 1d684bc27..ad08ba77c 100644 --- a/modules/commands/os_defcon.cpp +++ b/modules/commands/os_defcon.cpp @@ -282,7 +282,7 @@ class OSDefcon : public Module { if (cm->Type == MODE_STATUS || cm->Type == MODE_LIST || !cm->CanSet(NULL)) { - Log() << "DefConChanModes mode character '" << mode << "' cannot be locked"; + Log(this) << "DefConChanModes mode character '" << mode << "' cannot be locked"; continue; } else if (add) @@ -296,7 +296,7 @@ class OSDefcon : public Module if (!ss.GetToken(param)) { - Log() << "DefConChanModes mode character '" << mode << "' has no parameter while one is expected"; + Log(this) << "DefConChanModes mode character '" << mode << "' has no parameter while one is expected"; continue; } @@ -321,7 +321,7 @@ class OSDefcon : public Module { DConfig.DefConModesOn.UnsetFlag(CMODE_REDIRECT); - Log() << "DefConChanModes must lock mode +l as well to lock mode +L"; + Log(this) << "DefConChanModes must lock mode +l as well to lock mode +L"; } } diff --git a/modules/commands/os_dns.cpp b/modules/commands/os_dns.cpp index d0a56e1e4..e304050b3 100644 --- a/modules/commands/os_dns.cpp +++ b/modules/commands/os_dns.cpp @@ -430,7 +430,7 @@ class ModuleDNS : public Module if (dns && !dns->Pooled() && !dns->GetIPs().empty() && dns->GetLimit() < s->Users) { dns->Pool(true); - Log() << "Pooling server " << s->GetName(); + Log(this) << "Pooling server " << s->GetName(); } } } @@ -442,7 +442,7 @@ class ModuleDNS : public Module if (dns && dns->Pooled()) { dns->Pool(false); - Log() << "Depooling delinked server " << s->GetName(); + Log(this) << "Depooling delinked server " << s->GetName(); } } @@ -454,7 +454,7 @@ class ModuleDNS : public Module /* Check for user limit reached */ if (s && s->GetLimit() && s->Pooled() && u->server->Users >= s->GetLimit()) { - Log() << "Depooling full server " << s->GetName() << ": " << u->server->Users << " users"; + Log(this) << "Depooling full server " << s->GetName() << ": " << u->server->Users << " users"; s->Pool(false); } } @@ -471,7 +471,7 @@ class ModuleDNS : public Module /* Check for dropping under userlimit */ if (s->GetLimit() && !s->Pooled() && s->GetLimit() > u->server->Users) { - Log() << "Pooling server " << s->GetName(); + Log(this) << "Pooling server " << s->GetName(); s->Pool(true); } @@ -489,7 +489,7 @@ class ModuleDNS : public Module /* Check for very fast user drops */ if (diff <= this->user_drop_time) { - Log() << "Depooling server " << s->GetName() << ": dropped " << this->user_drop_mark << " users in " << diff << " seconds"; + Log(this) << "Depooling server " << s->GetName() << ": dropped " << this->user_drop_mark << " users in " << diff << " seconds"; s->repool = Anope::CurTime + this->user_drop_readd_time; s->Pool(false); } @@ -498,7 +498,7 @@ class ModuleDNS : public Module { s->Pool(true); s->repool = 0; - Log() << "Pooling server " << s->GetName(); + Log(this) << "Pooling server " << s->GetName(); } } } @@ -540,7 +540,7 @@ class ModuleDNS : public Module if (last_warn + 60 < Anope::CurTime) { last_warn = Anope::CurTime; - Log() << "os_dns: Warning! There are no pooled servers!"; + Log(this) << "os_dns: Warning! There are no pooled servers!"; } /* Something messed up, just return them all and hope one is available */ @@ -564,7 +564,7 @@ class ModuleDNS : public Module if (packet->answers.empty()) { - Log() << "os_dns: Error! There are no servers with any IPs. At all."; + Log(this) << "os_dns: Error! There are no servers with any IPs. At all."; /* Send back an empty answer anyway */ } } diff --git a/modules/commands/os_module.cpp b/modules/commands/os_module.cpp index 1d3c1d30a..e7e0e2c16 100644 --- a/modules/commands/os_module.cpp +++ b/modules/commands/os_module.cpp @@ -141,7 +141,7 @@ class CommandOSModUnLoad : public Command return; } - Log() << "Trying to unload module [" << mname << "]"; + Log(this->owner) << "Trying to unload module [" << mname << "]"; ModuleReturn status = ModuleManager::UnloadModule(m, source.GetUser()); diff --git a/modules/commands/os_reload.cpp b/modules/commands/os_reload.cpp index 8b7da60f9..e7a07054f 100644 --- a/modules/commands/os_reload.cpp +++ b/modules/commands/os_reload.cpp @@ -36,7 +36,7 @@ class CommandOSReload : public Command catch (const ConfigException &ex) { Config = old_config; - Log() << "Error reloading configuration file: " << ex.GetReason(); + Log(this->owner) << "Error reloading configuration file: " << ex.GetReason(); source.Reply(_("Error reloading configuration file: ") + ex.GetReason()); } diff --git a/modules/commands/os_session.cpp b/modules/commands/os_session.cpp index a1396f293..ef11462b8 100644 --- a/modules/commands/os_session.cpp +++ b/modules/commands/os_session.cpp @@ -689,7 +689,7 @@ class OSSession : public Module if (!session) { if (debug) - Log() << "session: Tried to delete non-existant session: " << u->host; + Log(this) << "Tried to delete non-existant session: " << u->host; return; } |