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:
J-P Nurmi
2015-08-29 21:07:55 +02:00
parent 263f278a11
commit d2c462ae03

View File

@@ -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