It chooses which ExpandString() to call, of user or of network.
bool ClearNV(bool bWriteToDisk = true);
const CString& GetSavePath() const;
+ CString ExpandString(const CString& sStr) const;
+ CString& ExpandString(const CString& sStr, CString& sRet) const;
// Setters
void SetType(CModInfo::EModuleType eType) { m_eType = eType; }
return false;
if (!sChan.WildCmp(m_sChannelWildcard))
return false;
- if (!sMessage.WildCmp(m_pModule->GetUser()->ExpandString(m_sSearchWildcard)))
+ if (!sMessage.WildCmp(m_pModule->ExpandString(m_sSearchWildcard)))
return false;
return true;
}
VAttachIter it = m_vMatches.begin();
for (; it != m_vMatches.end(); ++it) {
if (it->GetHostMask() == attach.GetHostMask()
- && it->GetChans() == attach.GetChans())
+ && it->GetChans() == attach.GetChans()
+ && it->GetSearch() == attach.GetSearch())
return false;
}
void CModule::SetNetwork(CIRCNetwork* pNetwork) { m_pNetwork = pNetwork; }
void CModule::SetClient(CClient* pClient) { m_pClient = pClient; }
+CString CModule::ExpandString(const CString& sStr) const {
+ CString sRet;
+ return ExpandString(sStr, sRet);
+}
+
+CString& CModule::ExpandString(const CString& sStr, CString& sRet) const {
+ sRet = sStr;
+
+ if (m_pNetwork) {
+ return m_pNetwork->ExpandString(sRet, sRet);
+ }
+
+ if (m_pUser) {
+ return m_pUser->ExpandString(sRet, sRet);
+ }
+
+ return sRet;
+}
+
const CString& CModule::GetSavePath() const {
if (!CFile::Exists(m_sSavePath)) {
CDir::MakeDir(m_sSavePath);