From 8561941e222cfeef8d99e93782d7f7e146e60932 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 25 Feb 2013 00:26:49 -0500 Subject: 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 --- modules/protocol/unreal.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'modules/protocol/unreal.cpp') 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("*")) -- cgit