mirror of
https://github.com/anope/anope.git
synced 2026-07-05 05:53:13 +02:00
try/catch cs_access AccessUnserialize just incase, don't crash if ns_ajoin is loaded before the protocol module
This commit is contained in:
@@ -25,7 +25,7 @@ class AccessChanAccess : public ChanAccess
|
||||
public:
|
||||
int level;
|
||||
|
||||
AccessChanAccess(AccessProvider *p) : ChanAccess(p)
|
||||
AccessChanAccess(AccessProvider *p) : ChanAccess(p), level(0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -41,7 +41,13 @@ class AccessChanAccess : public ChanAccess
|
||||
|
||||
void AccessUnserialize(const Anope::string &data) anope_override
|
||||
{
|
||||
this->level = convertTo<int>(data);
|
||||
try
|
||||
{
|
||||
this->level = convertTo<int>(data);
|
||||
}
|
||||
catch (const ConvertException &)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
bool operator>(const ChanAccess &other) const anope_override
|
||||
|
||||
@@ -252,7 +252,7 @@ class NSAJoin : public Module
|
||||
ajoinentry_type("AJoinEntry", AJoinEntry::Unserialize)
|
||||
{
|
||||
|
||||
if (!IRCD->CanSVSJoin)
|
||||
if (!IRCD || !IRCD->CanSVSJoin)
|
||||
throw ModuleException("Your IRCd does not support SVSJOIN");
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user