Skip to content

Conversation

@jarrydpage
Copy link

When compiling the module against the latest znc cloned from git (znc/znc@78ea60e) 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
Copy link
Contributor

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

@cosmosified
Copy link
Contributor

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

it goes into infiinte recursion/loops for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants