X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmodules%2Fm_cloaking.cpp;h=3f1774e7b88e1c7704893e2b5c5ac3447c6a8ec1;hb=3151d60c1ecc9462e4c335282ee6c31672f45111;hp=83e5f2f09c138d5de268e86a2913bf7808b74f2b;hpb=4a6fedd9324d87349a806c9c1d0ae6e7d3c1fd38;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index 83e5f2f09..3f1774e7b 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -6,7 +6,7 @@ * Copyright (C) 2016 Adam * Copyright (C) 2014 Thomas Fargeix * Copyright (C) 2013, 2018 Attila Molnar - * Copyright (C) 2013, 2016-2019 Sadie Powell + * Copyright (C) 2013, 2016-2020 Sadie Powell * Copyright (C) 2012 Robby * Copyright (C) 2011 jackmcbarn * Copyright (C) 2009-2010 Daniel De Graaf @@ -146,8 +146,16 @@ class CloakUser : public ModeHandler if (!cloaks) { /* Force creation of missing cloak */ - creator->OnUserConnect(user); - cloaks = ext.get(user); + try + { + creator->OnUserConnect(user); + cloaks = ext.get(user); + } + catch (CoreException& modexcept) + { + ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Exception caught when generating cloak: " + modexcept.GetReason()); + return MODEACTION_DENY; + } } // If we have a cloak then set the hostname.