simple_away not setting away on lastclientdisconnect #32

Closed
opened 2026-10-05 03:54:56 +02:00 by adam · 5 comments
Owner

This is on edaa20e59e

For some reason I can't get simple_away to work. I've gone all the way down to add a DEBUG line right above line 171 of modules/simple_away.cpp to at least prove that ZNC gets there and attempts to set the away status (it does).

However the away message is never sent (in the debug log I never see ZNC -> IRC saying away).

I've also connected directly to the IRC server to see for sure if my ZNC server wasn't setting away and it wasn't (and yes I was the last client to disconnect)

Ironically when I reconnect to ZNC I see ZNC -> IRC setting me back from away, though as stated I was not previously away.

Maybe it's just me?

This is on edaa20e59eabd8483b4043491ae499b9c920bb94 For some reason I can't get simple_away to work. I've gone all the way down to add a DEBUG line right above line 171 of modules/simple_away.cpp to at least prove that ZNC gets there and attempts to set the away status (it does). However the away message is never sent (in the debug log I never see ZNC -> IRC saying away). I've also connected directly to the IRC server to see for sure if my ZNC server wasn't setting away and it wasn't (and yes I was the last client to disconnect) Ironically when I reconnect to ZNC I see ZNC -> IRC setting me back from away, though as stated I was not previously away. Maybe it's just me? <!-- github-sync-id:1855262 -->
adam closed this issue 2026-10-05 03:54:56 +02:00
Author
Owner

Huh.
No, it's not just you...
simple_away seems to be loaded as user module for you, and when the timer fires, there's no m_pNetwork anymore.

It can be fixed in simple_away... But I suspect that many similar bugs are in many different places.
We really should do something about the way how to determine current user/network from different stuff like timers and sockets...

Huh. No, it's not just you... simple_away seems to be loaded as user module for you, and when the timer fires, there's no m_pNetwork anymore. It can be fixed in simple_away... But I suspect that many similar bugs are in many different places. We really should do something about the way how to determine current user/network from different stuff like timers and sockets... <!-- github-comment-id:2335711 -->
Author
Owner

I cleaned up my original message a bit. It seemed confusing in some parts.

Thanks for the reply. I realize you've pretty much just overhauled the network code as I just finished fixing an external module (notifo-push) to work with m_pNetwork in .203. So I understand it's no where near complete. It's just more fun to stay on bleeding edge than stable :-)

Great work overall.

I cleaned up my original message a bit. It seemed confusing in some parts. Thanks for the reply. I realize you've pretty much just overhauled the network code as I just finished fixing an external module (notifo-push) to work with m_pNetwork in .203. So I understand it's no where near complete. It's just more fun to stay on bleeding edge than stable :-) Great work overall. <!-- github-comment-id:2335800 -->
Author
Owner

I did want to add that the module autoreply works perfectly. Which is also a user module.

I'm wondering if the function handle could be converted to work with simple_away. I will have to try this and see.

I did want to add that the module autoreply works perfectly. Which is also a user module. I'm wondering if the function handle could be converted to work with simple_away. I will have to try this and see. <!-- github-comment-id:2383441 -->
Author
Owner

I have fixed another bug in this module where you will not become away if you are attached from another network. I made this module a network module in the same patch so it will fix the issue you are having.

As @DarthGandalf says, I think we should still explore the idea of another solution so user modules can use a CIRCNetwork.

I have fixed another bug in this module where you will not become away if you are attached from another network. I made this module a network module in the same patch so it will fix the issue you are having. As @DarthGandalf says, I think we should still explore the idea of another solution so user modules can use a CIRCNetwork. <!-- github-comment-id:2453560 -->
Author
Owner

Whoooo! Thanks Kyle! It works again

Whoooo! Thanks Kyle! It works again <!-- github-comment-id:2462771 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#32