diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/commands/cs_updown.cpp | 2 | ||||
-rw-r--r-- | modules/commands/os_session.cpp | 7 | ||||
-rw-r--r-- | modules/protocol/unreal.cpp | 19 |
3 files changed, 16 insertions, 12 deletions
diff --git a/modules/commands/cs_updown.cpp b/modules/commands/cs_updown.cpp index 85eeb0af1..27e1984d1 100644 --- a/modules/commands/cs_updown.cpp +++ b/modules/commands/cs_updown.cpp @@ -100,7 +100,7 @@ class CommandCSDown : public Command CommandCSDown(Module *creator) : Command(creator, "chanserv/down", 0, 2) { this->SetDesc(_("Removes a selected nicks status from a channel")); - this->SetSyntax(_("[\037channel\037 ]\037nick\037]]")); + this->SetSyntax(_("[\037channel\037 [\037nick\037]]")); } void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override 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)); diff --git a/modules/protocol/unreal.cpp b/modules/protocol/unreal.cpp index 01141b6a3..b7cd2e322 100644 --- a/modules/protocol/unreal.cpp +++ b/modules/protocol/unreal.cpp @@ -778,17 +778,20 @@ struct IRCDMessageNick : IRCDMessage { if (params.size() == 11) { - Anope::string decoded_ip; - Anope::B64Decode(params[9], decoded_ip); - Anope::string ip; - try + if (params[9] != "*") { - sockaddrs ip_addr; - ip_addr.ntop(params[9].length() == 8 ? AF_INET : AF_INET6, decoded_ip.c_str()); - ip = ip_addr.addr(); + Anope::string decoded_ip; + Anope::B64Decode(params[9], decoded_ip); + + try + { + sockaddrs ip_addr; + ip_addr.ntop(params[9].length() == 8 ? AF_INET : AF_INET6, decoded_ip.c_str()); + ip = ip_addr.addr(); + } + catch (const SocketException &ex) { } } - catch (const SocketException &ex) { } Anope::string vhost = params[8]; if (vhost.equals_cs("*")) |