dctrwatson / znc-fish

ZNC FiSH module
15 stars 15 forks source link

changed CClient type to align with znc-git/1.5 #10

Open jarrydpage opened 10 years ago

jarrydpage commented 10 years ago

When compiling the module against the latest znc cloned from git (znc/znc@78ea60e226e2b0f15b7e8d896ff18a22d0c59e2c) built with gcc-4.8, results in these errors:

$ znc-buildmod fish.cpp Building "fish.so" for ZNC 1.5... fish.cpp: In member function ‘virtual CModule::EModRet CFishMod::OnUserMsg(CString&, CString&)’: fish.cpp:332:62: error: invalid initialization of reference of type ‘std::vector<CClient>&’ from expression of type ‘const std::vector<CClient>’ vector<CClient>& vClients = this->m_pNetwork->GetClients(); ^ fish.cpp: In member function ‘virtual CModule::EModRet CFishMod::OnUserAction(CString&, CString&)’: fish.cpp:366:62: error: invalid initialization of reference of type ‘std::vector<CClient>&’ from expression of type ‘const std::vector<CClient>’ vector<CClient>& vClients = this->m_pNetwork->GetClients(); ^ fish.cpp: In member function ‘virtual CModule::EModRet CFishMod::OnUserNotice(CString&, CString&)’: fish.cpp:400:62: error: invalid initialization of reference of type ‘std::vector<CClient>&’ from expression of type ‘const std::vector<CClient>’ vector<CClient*>& vClients = this->m_pNetwork->GetClients(); ^ [ !! ] Error while building "fish.so"

Simple fix, but it fixes all the above errors.

DanielOaks commented 9 years ago

This fixes building on for ZNC 1.6.0 for me, awesome!

cosmosified commented 9 years ago

This builds and works on 1.6.0 try doing a /msg *fish listkeys

it goes into infiinte recursion/loops for me.