diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/coremods/core_oper/cmd_die.cpp | 6 | ||||
-rw-r--r-- | src/coremods/core_oper/cmd_restart.cpp | 4 | ||||
-rw-r--r-- | src/coremods/core_oper/core_oper.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_cgiirc.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_chanlog.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_shun.cpp | 3 | ||||
-rw-r--r-- | src/server.cpp | 5 |
7 files changed, 15 insertions, 13 deletions
diff --git a/src/coremods/core_oper/cmd_die.cpp b/src/coremods/core_oper/cmd_die.cpp index 4bc6c25db..5fe643520 100644 --- a/src/coremods/core_oper/cmd_die.cpp +++ b/src/coremods/core_oper/cmd_die.cpp @@ -26,7 +26,7 @@ CommandDie::CommandDie(Module* parent) : Command(parent, "DIE", 1) { flags_needed = 'o'; - syntax = "<password>"; + syntax = "<server>"; } static void QuitAll() @@ -64,7 +64,7 @@ CmdResult CommandDie::Handle (const std::vector<std::string>& parameters, User * { { std::string diebuf = "*** DIE command from " + user->GetFullHost() + ". Terminating."; - ServerInstance->Logs->Log("COMMAND", LOG_SPARSE, diebuf); + ServerInstance->Logs->Log(MODNAME, LOG_SPARSE, diebuf); DieRestart::SendError(diebuf); } @@ -73,7 +73,7 @@ CmdResult CommandDie::Handle (const std::vector<std::string>& parameters, User * } else { - ServerInstance->Logs->Log("COMMAND", LOG_SPARSE, "Failed /DIE command from %s", user->GetFullRealHost().c_str()); + ServerInstance->Logs->Log(MODNAME, LOG_SPARSE, "Failed /DIE command from %s", user->GetFullRealHost().c_str()); ServerInstance->SNO->WriteGlobalSno('a', "Failed DIE Command from %s.", user->GetFullRealHost().c_str()); return CMD_FAILURE; } diff --git a/src/coremods/core_oper/cmd_restart.cpp b/src/coremods/core_oper/cmd_restart.cpp index 3e219727f..f76fd098d 100644 --- a/src/coremods/core_oper/cmd_restart.cpp +++ b/src/coremods/core_oper/cmd_restart.cpp @@ -25,12 +25,12 @@ CommandRestart::CommandRestart(Module* parent) : Command(parent, "RESTART", 1, 1) { flags_needed = 'o'; - syntax = "<password>"; + syntax = "<server>"; } CmdResult CommandRestart::Handle (const std::vector<std::string>& parameters, User *user) { - ServerInstance->Logs->Log("COMMAND", LOG_DEFAULT, "Restart: %s",user->nick.c_str()); + ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Restart: %s", user->nick.c_str()); if (DieRestart::CheckPass(user, parameters[0], "restartpass")) { ServerInstance->SNO->WriteGlobalSno('a', "RESTART command from %s, restarting server.", user->GetFullRealHost().c_str()); diff --git a/src/coremods/core_oper/core_oper.cpp b/src/coremods/core_oper/core_oper.cpp index 0fc82df8f..a6b2abd81 100644 --- a/src/coremods/core_oper/core_oper.cpp +++ b/src/coremods/core_oper/core_oper.cpp @@ -27,7 +27,7 @@ namespace DieRestart ConfigTag* tag = ServerInstance->Config->ConfValue("power"); // The hash method for *BOTH* the die and restart passwords const std::string hash = tag->getString("hash"); - const std::string correctpass = tag->getString(confentry); + const std::string correctpass = tag->getString(confentry, ServerInstance->Config->ServerName); return ServerInstance->PassCompare(user, correctpass, inputpass, hash); } } diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp index 721d6ba08..09d6e5fdf 100644 --- a/src/modules/m_cgiirc.cpp +++ b/src/modules/m_cgiirc.cpp @@ -255,7 +255,7 @@ public: { if (type == "webirc" && password.empty()) { - ServerInstance->Logs->Log("CONFIG", LOG_DEFAULT, "m_cgiirc: Missing password in config: %s", hostmask.c_str()); + ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Missing password in config: %s", hostmask.c_str()); } else { @@ -271,7 +271,7 @@ public: else { cgitype = PASS; - ServerInstance->Logs->Log("CONFIG", LOG_DEFAULT, "Invalid <cgihost:type> value in config: %s, setting it to \"pass\"", type.c_str()); + ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Invalid <cgihost:type> value in config: %s, setting it to \"pass\"", type.c_str()); } cmd.Hosts.push_back(CGIhost(hostmask, cgitype, password)); @@ -279,7 +279,7 @@ public: } else { - ServerInstance->Logs->Log("CONFIG", LOG_DEFAULT, "Invalid <cgihost:mask> value in config: %s", hostmask.c_str()); + ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Invalid <cgihost:mask> value in config: %s", hostmask.c_str()); continue; } } diff --git a/src/modules/m_chanlog.cpp b/src/modules/m_chanlog.cpp index 0624b4a86..f618a539c 100644 --- a/src/modules/m_chanlog.cpp +++ b/src/modules/m_chanlog.cpp @@ -44,7 +44,7 @@ class ModuleChanLog : public Module if (channel.empty() || snomasks.empty()) { - ServerInstance->Logs->Log("CONFIG", LOG_DEFAULT, "Malformed chanlog tag, ignoring"); + ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Malformed chanlog tag, ignoring"); continue; } diff --git a/src/modules/m_shun.cpp b/src/modules/m_shun.cpp index 5388bb485..022726524 100644 --- a/src/modules/m_shun.cpp +++ b/src/modules/m_shun.cpp @@ -44,6 +44,9 @@ public: if (InspIRCd::Match(u->GetFullHost(), matchtext) || InspIRCd::Match(u->GetFullRealHost(), matchtext) || InspIRCd::Match(u->nick+"!"+u->ident+"@"+u->GetIPString(), matchtext)) return true; + if (InspIRCd::MatchCIDR(u->GetIPString(), matchtext, ascii_case_insensitive_map)) + return true; + return false; } diff --git a/src/server.cpp b/src/server.cpp index 932be319e..2feb08f96 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -165,13 +165,13 @@ void ISupportManager::Build() tokens["AWAYLEN"] = ConvToStr(ServerInstance->Config->Limits.MaxAway); tokens["CASEMAPPING"] = "rfc1459"; + tokens["CHANLIMIT"] = InspIRCd::Format("#:%u", ServerInstance->Config->MaxChans); tokens["CHANMODES"] = ServerInstance->Modes->GiveModeList(MODETYPE_CHANNEL); tokens["CHANNELLEN"] = ConvToStr(ServerInstance->Config->Limits.ChanMax); tokens["CHANTYPES"] = "#"; tokens["ELIST"] = "MU"; tokens["KICKLEN"] = ConvToStr(ServerInstance->Config->Limits.MaxKick); tokens["MAXBANS"] = "64"; // TODO: make this a config setting. - tokens["MAXCHANNELS"] = ConvToStr(ServerInstance->Config->MaxChans); tokens["MAXTARGETS"] = ConvToStr(ServerInstance->Config->MaxTargets); tokens["MODES"] = ConvToStr(ServerInstance->Config->Limits.MaxModes); tokens["NETWORK"] = ServerInstance->Config->Network; @@ -179,8 +179,7 @@ void ISupportManager::Build() tokens["PREFIX"] = ServerInstance->Modes->BuildPrefixes(); tokens["STATUSMSG"] = ServerInstance->Modes->BuildPrefixes(false); tokens["TOPICLEN"] = ConvToStr(ServerInstance->Config->Limits.MaxTopic); - - tokens["FNC"] = tokens["VBANLIST"]; + tokens["VBANLIST"]; // Modules can add new tokens and also edit or remove existing tokens FOREACH_MOD(On005Numeric, (tokens)); |