1
0
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:
Adam
2013-11-12 19:19:21 -05:00
parent d1248d1249
commit c9f4c2db1f
2 changed files with 9 additions and 3 deletions
+8 -2
View File
@@ -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
+1 -1
View File
@@ -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");
}