- }
- this->SendError("CAPAB negotiation failed: "+reason);
- return false;
- }
- if (this->capab->OptModuleList != this->MyModules(VF_OPTCOMMON) && this->capab->OptModuleList.length())
- {
- std::string diffIneed = ListDifference(this->capab->OptModuleList, this->MyModules(VF_OPTCOMMON));
- std::string diffUneed = ListDifference(this->MyModules(VF_OPTCOMMON), this->capab->OptModuleList);
- if (diffIneed.length() == 0 && diffUneed.length() == 0)
- {
- reason = "Optional Module list in CAPAB is not alphabetically ordered, cannot compare lists.";
- }
- else if (Utils->AllowOptCommon)
- {
- ServerInstance->SNO->WriteToSnoMask('l',
- "Optional module lists do not match, some commands may not work globally.%s%s%s%s",
- diffIneed.length() ? " Not loaded here:" : "", diffIneed.c_str(),
- diffUneed.length() ? " Not loaded there:" : "", diffUneed.c_str());
- }
- else
- {
- reason = "Optional modules incorrectly matched on these servers, and options::allowmismatch not set.";
- if (diffIneed.length())
- reason += " Not loaded here:" + diffIneed;
- if (diffUneed.length())
- reason += " Not loaded there:" + diffUneed;