summaryrefslogtreecommitdiff
path: root/modules/encryption
diff options
context:
space:
mode:
Diffstat (limited to 'modules/encryption')
-rw-r--r--modules/encryption/bcrypt.cpp12
-rw-r--r--modules/encryption/md5.cpp2
-rw-r--r--modules/encryption/none.cpp2
-rw-r--r--modules/encryption/old.cpp3
-rw-r--r--modules/encryption/sha1.cpp2
-rw-r--r--modules/encryption/sha256.cpp2
6 files changed, 12 insertions, 11 deletions
diff --git a/modules/encryption/bcrypt.cpp b/modules/encryption/bcrypt.cpp
index 622fef745..3375e4bee 100644
--- a/modules/encryption/bcrypt.cpp
+++ b/modules/encryption/bcrypt.cpp
@@ -906,7 +906,7 @@ class EBCRYPT : public Module
EventReturn OnEncrypt(const Anope::string &src, Anope::string &dest) override
{
dest = "bcrypt:" + Generate(src, Salt());
- Log(LOG_DEBUG_2) << "(enc_bcrypt) hashed password from [" << src << "] to [" << dest << "]";
+ logger.Debug2("hashed password from {0} to {1}", src, dest);
return EVENT_ALLOW;
}
@@ -941,7 +941,7 @@ class EBCRYPT : public Module
}
catch (const ConvertException &)
{
- Log(this) << "Could not get the round size of a hash. This is probably a bug. Hash: " << nc->GetPassword();
+ logger.Log("Could not get the round size of a hash. This is probably a bug. Hash: {0}", nc->GetPassword());
}
if (ModuleManager::FindFirstOf(ENCRYPTION) != this || (hashrounds && hashrounds != rounds))
@@ -962,20 +962,20 @@ class EBCRYPT : public Module
if (rounds == 0)
{
rounds = 10;
- Log(this) << "Rounds can't be 0! Setting ignored.";
+ logger.Log("Rounds can't be 0! Setting ignored.");
}
else if (rounds < 10)
{
- Log(this) << "10 to 12 rounds is recommended.";
+ logger.Log("10 to 12 rounds is recommended.");
}
else if (rounds >= 32)
{
rounds = 10;
- Log(this) << "The maximum number of rounds supported is 31. Ignoring setting and using 10.";
+ logger.Log("The maximum number of rounds supported is 31. Ignoring setting and using 10.");
}
else if (rounds >= 14)
{
- Log(this) << "Are you sure you want to use " << stringify(rounds) << " in your bcrypt settings? This is very CPU intensive! Recommended rounds is 10-12.";
+ logger.Log("Are you sure you want to use {0} in your bcrypt settings? This is very CPU intensive! Recommended rounds is 10-12.", rounds);
}
}
};
diff --git a/modules/encryption/md5.cpp b/modules/encryption/md5.cpp
index ca3bfcc9a..7dd92d92f 100644
--- a/modules/encryption/md5.cpp
+++ b/modules/encryption/md5.cpp
@@ -376,7 +376,7 @@ class EMD5 : public Module
Anope::string buf = "md5:" + Anope::Hex(reinterpret_cast<const char *>(hash.first), hash.second);
- Log(LOG_DEBUG_2) << "(enc_md5) hashed password from [" << src << "] to [" << buf << "]";
+ logger.Debug2("hashed password from [{0}] to [{1}]", src, buf);
dest = buf;
return EVENT_ALLOW;
}
diff --git a/modules/encryption/none.cpp b/modules/encryption/none.cpp
index 3b1f49d33..2e0ae8636 100644
--- a/modules/encryption/none.cpp
+++ b/modules/encryption/none.cpp
@@ -38,7 +38,7 @@ class ENone : public Module
Anope::string cpass;
Anope::B64Encode(src, cpass);
buf += cpass;
- Log(LOG_DEBUG_2) << "(enc_none) hashed password from [" << src << "] to [" << buf << "]";
+ logger.Debug2("hashed password from [{0}] to [{1}]", src, buf);
dest = buf;
return EVENT_ALLOW;
}
diff --git a/modules/encryption/old.cpp b/modules/encryption/old.cpp
index bfe7131bc..22065e441 100644
--- a/modules/encryption/old.cpp
+++ b/modules/encryption/old.cpp
@@ -92,7 +92,8 @@ class EOld : public Module
Anope::string buf = "oldmd5:" + Anope::Hex(digest2, sizeof(digest2));
- Log(LOG_DEBUG_2) << "(enc_old) hashed password from [" << src << "] to [" << buf << "]";
+ logger.Debug2("hashed password from [{0}] to [{1}]", src, buf);
+
dest = buf;
delete context;
return EVENT_ALLOW;
diff --git a/modules/encryption/sha1.cpp b/modules/encryption/sha1.cpp
index ea108f49c..1dcb2dc5e 100644
--- a/modules/encryption/sha1.cpp
+++ b/modules/encryption/sha1.cpp
@@ -238,7 +238,7 @@ class ESHA1 : public Module
Anope::string buf = "sha1:" + Anope::Hex(reinterpret_cast<const char *>(hash.first), hash.second);
- Log(LOG_DEBUG_2) << "(enc_sha1) hashed password from [" << src << "] to [" << buf << "]";
+ logger.Debug2("hashed password from [{0}] to [{1}]", src, buf);
dest = buf;
return EVENT_ALLOW;
}
diff --git a/modules/encryption/sha256.cpp b/modules/encryption/sha256.cpp
index e05629a50..8226cb792 100644
--- a/modules/encryption/sha256.cpp
+++ b/modules/encryption/sha256.cpp
@@ -302,7 +302,7 @@ class ESHA256 : public Module
std::stringstream buf;
buf << "sha256:" << Anope::Hex(reinterpret_cast<const char *>(hash.first), hash.second) << ":" << GetIVString();
- Log(LOG_DEBUG_2) << "(enc_sha256) hashed password from [" << src << "] to [" << buf.str() << " ]";
+ logger.Debug2("hashed password from [{0}] to [{1}]", src, buf.str());
dest = buf.str();
return EVENT_ALLOW;
}