mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Fix yet another startup failure with awaynick & simple_away
The detection whether simple_away is already on the list of loaded modules failed when the simple_away load line contained arguments. Close #954
This commit is contained in:
@@ -422,7 +422,13 @@ bool CIRCNetwork::ParseConfig(CConfig *pConfig, CString& sError, bool bUpgrade)
|
||||
// XXX The awaynick module was retired in 1.6 (still available as external module)
|
||||
if (sModName == "awaynick") {
|
||||
// load simple_away instead, unless it's already on the list
|
||||
if (std::find(vsList.begin(), vsList.end(), "simple_away") == vsList.end()) {
|
||||
bool bFound = false;
|
||||
for (const CString& sLoadMod : vsList) {
|
||||
if (sLoadMod.Token(0).Equals("simple_away")) {
|
||||
bFound = true;
|
||||
}
|
||||
}
|
||||
if (!bFound) {
|
||||
sNotice = "Loading network module [simple_away] instead";
|
||||
sModName = "simple_away";
|
||||
// not a fatal error if simple_away is not available
|
||||
|
||||
Reference in New Issue
Block a user