Permalink
Browse files

Support messages directed to specific user prefixes

Closes #195
  • Loading branch information...
1 parent 592b5d1 commit 721d6033833cb960ff3b62f66ef6bc7d82cde878 @kylef kylef committed Jul 27, 2012
Showing with 6 additions and 2 deletions.
  1. +1 −1 include/znc/IRCNetwork.h
  2. +5 −1 src/IRCNetwork.cpp
@@ -67,7 +67,7 @@ class CIRCNetwork {
bool PutModule(const CString& sModule, const CString& sLine, CClient* pClient = NULL, CClient* pSkipClient = NULL);
const std::vector<CChan*>& GetChans() const;
- CChan* FindChan(const CString& sName) const;
+ CChan* FindChan(CString sName) const;
bool AddChan(CChan* pChan);
bool AddChan(const CString& sName, bool bInConfig);
bool DelChan(const CString& sName);
View
@@ -606,7 +606,11 @@ bool CIRCNetwork::PutModule(const CString& sModule, const CString& sLine, CClien
const vector<CChan*>& CIRCNetwork::GetChans() const { return m_vChans; }
-CChan* CIRCNetwork::FindChan(const CString& sName) const {
+CChan* CIRCNetwork::FindChan(CString sName) const {
+ if (GetIRCSock()) {
+ sName.TrimLeft(GetIRCSock()->GetPerms());
+ }
+
for (unsigned int a = 0; a < m_vChans.size(); a++) {
CChan* pChan = m_vChans[a];
if (sName.Equals(pChan->GetName())) {

0 comments on commit 721d603

Please sign in to comment.