Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not log channel messages with znc 1.7 #6

Open
Jay2k1 opened this issue May 20, 2018 · 3 comments
Open

Does not log channel messages with znc 1.7 #6

Jay2k1 opened this issue May 20, 2018 · 3 comments

Comments

@Jay2k1
Copy link

Jay2k1 commented May 20, 2018

ZNC 1.7 recently became stable, and because I am using teward's ubuntu PPA, I suddenly had upgraded from 1.6.3 without really knowing.

Ever since, channel messages aren't being logged anymore. Actions are, and I also see joins, quits and other things. I tried to debug this, but I just couldn't find out what's wrong. I don't get any errors.

@Jay2k1
Copy link
Author

Jay2k1 commented May 20, 2018

After lots and lots of debugging (which I find pretty hard, because as it seems python does not print errors anywhere when used in znc modules), I found out that changing chr to str here:

return chr(realUser.GetPermChar())

fixes this. God knows why.

Actually, removing chr() from it makes it work too. I noticed though that the DB field user_mode used to be NULL when the user doesn't have a mode, now it's an empty string. Maybe the return value of CNick::GetPermChar() changed or something

@buxxi
Copy link
Owner

buxxi commented May 28, 2018

I've had the same experience debugging, it's really annoying to find out what's wrong, so usually I just wrap it with a try-catch and output the exception with self.PutModule() while debugging. Not the most effective way probably.

I prefer staying on LTS-releases of Ubuntu and haven't upgraded to 18.04 yet so my ZNC is still on 1.6.3 and after upgrading I still wont have 1.7.0+ until another 2 years, so it will be a long time before I can debug this :)

But there seems to have been a change in ZNC where it returns an signed char instead of unsigned char: znc/znc@a2470b3#diff-1d7bbb426d52e7e9fcfdf2eaa18e702a

So maybe if we check the value against '\0'

if realUser.GetPermChar() == 0:
  return None
else:
  return chr(realUser.GetPermChar())

@Jay2k1
Copy link
Author

Jay2k1 commented May 28, 2018

I prefer staying on LTS-releases of Ubuntu and haven't upgraded to 18.04 yet so my ZNC is still on 1.6.3 and after upgrading I still wont have 1.7.0+ until another 2 years

I am on 16.04 LTS too, but for some reason, I didn't install znc from distro packages but added teward's ppa (I believe on the previous OS version I had (14.04 LTS maybe), znc was too old for my taste, hence the ppa). See https://wiki.znc.in/Installation#Install_via_PPA

I might try your proposed fix some day :)

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

No branches or pull requests

2 participants