summaryrefslogtreecommitdiff
path: root/modules/commands/os_defcon.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-09-08 04:51:44 -0400
committerAdam <Adam@anope.org>2012-09-08 04:51:44 -0400
commitc4a1e1bb0c82c954657dc39c5abbc29978bef701 (patch)
tree8d440a2b8d8a2c35733ce5a100009386dedd4504 /modules/commands/os_defcon.cpp
parent7e3b5bed50b87d599fec25a018771ebce47f969f (diff)
Fixed os_defcon too
Diffstat (limited to 'modules/commands/os_defcon.cpp')
-rw-r--r--modules/commands/os_defcon.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/modules/commands/os_defcon.cpp b/modules/commands/os_defcon.cpp
index bc3265512..741eb9d43 100644
--- a/modules/commands/os_defcon.cpp
+++ b/modules/commands/os_defcon.cpp
@@ -536,7 +536,15 @@ class OSDefcon : public Module
if (!DConfig.sessionlimit || !session_service)
return;
- Session *session = session_service->FindSession(u->host);
+ Session *session;
+ try
+ {
+ session = session_service->FindSession(u->ip);
+ }
+ catch (const SocketException &)
+ {
+ return;
+ }
Exception *exception = session_service->FindException(u);
if (DConfig.Check(DEFCON_REDUCE_SESSION) && !exception)