diff options
author | Adam <Adam@anope.org> | 2013-02-25 00:26:49 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-02-25 00:26:49 -0500 |
commit | 8561941e222cfeef8d99e93782d7f7e146e60932 (patch) | |
tree | 3491edebd08d77ff8a62459704f8a03a7b9721e9 /modules/commands/os_session.cpp | |
parent | 5d4db2b85408202086ae35f38306e81f9216959e (diff) |
Don't enforce session limit on clients with no IP on Unreal, fix typo in /cs down syntax, fix os_session messages to reference ip
Diffstat (limited to 'modules/commands/os_session.cpp')
-rw-r--r-- | modules/commands/os_session.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/commands/os_session.cpp b/modules/commands/os_session.cpp index 949aabbe8..1edda00d6 100644 --- a/modules/commands/os_session.cpp +++ b/modules/commands/os_session.cpp @@ -652,7 +652,7 @@ class OSSession : public Module if (OperServ) { if (!Config->SessionLimitExceeded.empty()) - u->SendMessage(OperServ, Config->SessionLimitExceeded.c_str(), u->host.c_str()); + u->SendMessage(OperServ, Config->SessionLimitExceeded.c_str(), u->ip.c_str()); if (!Config->SessionLimitDetailsLoc.empty()) u->SendMessage(OperServ, "%s", Config->SessionLimitDetailsLoc.c_str()); } @@ -660,7 +660,7 @@ class OSSession : public Module ++session->hits; if (Config->MaxSessionKill && session->hits >= Config->MaxSessionKill && akills) { - const Anope::string &akillmask = "*@" + u->host; + const Anope::string &akillmask = "*@" + u->ip; XLine *x = new XLine(akillmask, Config->OperServ, Anope::CurTime + Config->SessionAutoKillExpiry, "Session limit exceeded", XLineManager::GenerateUID()); akills->AddXLine(x); akills->Send(NULL, x); @@ -693,7 +693,7 @@ class OSSession : public Module } if (!session) { - Log(LOG_DEBUG) << "Tried to delete non-existant session: " << u->host; + Log(LOG_DEBUG) << "Tried to delete non-existant session: " << u->ip; return; } @@ -712,6 +712,7 @@ class OSSession : public Module exception_type("Exception", Exception::Unserialize), ss(this), commandossession(this), commandosexception(this), akills("XLineManager", "xlinemanager/sgline") { this->SetAuthor("Anope"); + this->SetPermanent(true); Implementation i[] = { I_OnUserConnect, I_OnPreUserLogoff }; ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation)); |