summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf/modules.conf.example11
-rw-r--r--src/modules/m_cloaking.cpp5
-rw-r--r--src/modules/m_sakick.cpp10
3 files changed, 15 insertions, 11 deletions
diff --git a/conf/modules.conf.example b/conf/modules.conf.example
index a24db40db..fb238df3a 100644
--- a/conf/modules.conf.example
+++ b/conf/modules.conf.example
@@ -480,10 +480,13 @@
# lowercase - Display the cloaked hostnames in lowercase #
# characters instead of uppercase #
# #
-# <cloak key1="0x2AF39F40" #
-# key2="0x78E10B32" #
-# key3="0x4F2D2E82" #
-# key4="0x043A4C81" #
+# It is VERY IMPORTANT that you do not use the keys shown here. You #
+# MUST randomly create your own cloak keys. #
+# #
+# <cloak key1="0x01234567" #
+# key2="0x89ABCDEF" #
+# key3="0x01234567" #
+# key4="0x89ABCDEF" #
# prefix="mynet" #
# ipalways="false" #
# lowercase="false"> #
diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp
index 1b6d2b6bb..8bba9ceda 100644
--- a/src/modules/m_cloaking.cpp
+++ b/src/modules/m_cloaking.cpp
@@ -243,6 +243,11 @@ class CloakUser : public ModeHandler
throw ModuleException("You have not defined cloak keys for m_cloaking!!! THIS IS INSECURE AND SHOULD BE CHECKED! - " + detail);
}
+ else if (key1 == 0x01234567 || key2 == 0x01234567 || key3 == 0x01234567 || key4 = 0x01234567)
+ {
+ /* Simple test to see if the config was changed from the values in the example config, as these would be very insecure. */
+ throw ModuleException("You did not change the cloak keys for m_cloaking! You must randomly create your own keys in the <cloak> tag.");
+ }
}
};
diff --git a/src/modules/m_sakick.cpp b/src/modules/m_sakick.cpp
index cc8628c50..5755281d4 100644
--- a/src/modules/m_sakick.cpp
+++ b/src/modules/m_sakick.cpp
@@ -61,12 +61,7 @@ class CommandSakick : public Command
delete channel;
Channel *n = ServerInstance->FindChan(parameters[1]);
- if (!n || !n->HasUser(dest))
- {
- /* Success; send the global snomask */
- ServerInstance->PI->SendSNONotice("A", std::string(user->nick) + " SAKICKed " + dest->nick + " on " + parameters[0]);
- }
- else
+ if (n && n->HasUser(dest))
{
/* Sort-of-bug: If the command was issued remotely, this message won't be sent */
user->WriteServ("NOTICE %s :*** Unable to kick %s from %s", user->nick.c_str(), dest->nick.c_str(), parameters[0].c_str());
@@ -76,8 +71,9 @@ class CommandSakick : public Command
if (IS_LOCAL(user))
{
- /* Locally issued command; send the local snomask */
+ /* Locally issued command; send the snomasks */
ServerInstance->SNO->WriteToSnoMask('a', std::string(user->nick) + " SAKICKed " + dest->nick + " on " + parameters[0]);
+ ServerInstance->PI->SendSNONotice("A", std::string(user->nick) + " SAKICKed " + dest->nick + " on " + parameters[0]);
}
return CMD_SUCCESS;