Add an option to disable the adulterated CTCP VERSION response #546

Open
opened 2026-10-05 04:28:58 +02:00 by adam · 21 comments
Owner

Lately I have noticed znc adds “via ZNC - http://znc.in” to my CTCP VERSION responses. I would like to have an option to disable such behaviour.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/25160747-add-an-option-to-disable-the-adulterated-ctcp-version-response?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github).
Lately I have noticed znc adds “via ZNC - http://znc.in” to my CTCP VERSION responses. I would like to have an option to disable such behaviour. ## <bountysource-plugin> --- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/25160747-add-an-option-to-disable-the-adulterated-ctcp-version-response?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github). </bountysource-plugin> <!-- github-sync-id:98140611 -->
Author
Owner

Maybe making the suffix configurable would be better behavior as then you could add a custom Suffix which would default to the via ZNC - http://znc.in

Maybe making the suffix configurable would be better behavior as then you could add a custom Suffix which would default to the `via ZNC - http://znc.in` <!-- github-comment-id:126278026 -->
Author
Owner

@t3chguy I don’t see how a configurable suffix would be of use to any user, but that would be a good idea as well.

@t3chguy I don’t see how a configurable suffix would be of use to any user, but that would be a good idea as well. <!-- github-comment-id:126280366 -->
Author
Owner

Could be useful if you did want to keep the ZNC Suffix but wanted to make it coloured or something

Could be useful if you did want to keep the ZNC Suffix but wanted to make it coloured or something <!-- github-comment-id:126281001 -->
Author
Owner
https://github.com/znc/znc/blob/d39b20b505e1b44f5d565fc61ce5cf3fe2ca6283/src/znc.cpp#L118-L131 <!-- github-comment-id:126282134 -->
Author
Owner

You can put your wanted version reply to "CTCP replies", as reply to VERSION. Then "via ZNC" won't be appended.

You can put your wanted version reply to "CTCP replies", as reply to VERSION. Then "via ZNC" won't be appended. <!-- github-comment-id:126488563 -->
Author
Owner

But then the CTCP Request will not be passed through to the connected clients

But then the CTCP Request will not be passed through to the connected clients <!-- github-comment-id:126488730 -->
Author
Owner

@DarthGandalf this is not the resolution I expect. I don't want to have to hardcode a reply. I use several clients, sometimes connected at once.

@DarthGandalf this is not the resolution I expect. I don't want to have to hardcode a reply. I use several clients, sometimes connected at once. <!-- github-comment-id:126488807 -->
Author
Owner

@t3chguy Right, it won't. ZNC will reply itself with the configured reply.

@t3chguy Right, it won't. ZNC will reply itself with the configured reply. <!-- github-comment-id:126488881 -->
Author
Owner

@wodim So you want to show actual version of your clients, but not of ZNC?

@wodim So you want to show actual version of your clients, but not of ZNC? <!-- github-comment-id:126489089 -->
Author
Owner

@DarthGandalf exactly. I expect ZNC to sit in between the server and my clients, proxying the traffic, but not messing with it unless I explicitly tell it to do so.

@DarthGandalf exactly. I expect ZNC to sit in between the server and my clients, proxying the traffic, but not messing with it unless I explicitly tell it to do so. <!-- github-comment-id:126489633 -->
Author
Owner

I expect the same behavior as @wodim

I expect the same behavior as @wodim <!-- github-comment-id:126490110 -->
Author
Owner

You can copypaste actual client version to that field then.
Alternatively, you can write a module which hooks OnUserCTCPReply and removes the "via" part.

You can copypaste actual client version to that field then. Alternatively, you can write a module which hooks `OnUserCTCPReply` and removes the "via" part. <!-- github-comment-id:126491397 -->
Author
Owner

Your first solution wouldn't work with multiple connected clients @DarthGandalf

Your first solution wouldn't work with multiple connected clients @DarthGandalf <!-- github-comment-id:126492704 -->
Author
Owner

I am not happy with the resolution, I guess I have hit a wall of chauvinism (I did not intend to be *that* rude).

I am not happy with the resolution, ~~I guess I have hit a wall of chauvinism~~ (I did not intend to be *that\* rude). <!-- github-comment-id:126493010 -->
Author
Owner

Second solution works though.

Second solution works though. <!-- github-comment-id:126493462 -->
Author
Owner

Ok, let's close this issue when someone writes such module and puts link to wiki as an external.

Ok, let's close this issue when someone writes such module and puts link to wiki as an external. <!-- github-comment-id:126494289 -->
Author
Owner

I know this is an old issue but it doesn't seem to be fixed in 2020... I'm going to try to write a plugin for this

I know this is an old issue but it doesn't seem to be fixed in 2020... I'm going to try to write a plugin for this <!-- github-comment-id:707224791 -->
Author
Owner

I know this is an old issue but it doesn't seem to be fixed in 2020...

Perhaps everyone is satisfied with the solution of using the CTCP response defined by user?

I'm going to try to write a plugin for this

Okay. Come to #znc-dev if you need help with it

> I know this is an old issue but it doesn't seem to be fixed in 2020... Perhaps everyone is satisfied with the solution of using the CTCP response defined by user? > I'm going to try to write a plugin for this Okay. Come to #znc-dev if you need help with it <!-- github-comment-id:707283132 -->
Author
Owner

Or maybe those who are bothered by it are not bothered enough to write a plugin. (I count myself there)

Or maybe those who are bothered by it are not bothered enough to write a plugin. (I count myself there) <!-- github-comment-id:707311036 -->
Author
Owner

Currently Bugged
https://github.com/pythonmcpi/CustomCTCPVersion.py
Requires modpython
If anyone knows how to get the client nickname in Modpython please let me know so I can fix the bug

**Currently Bugged** https://github.com/pythonmcpi/CustomCTCPVersion.py Requires modpython If anyone knows how to get the client nickname in Modpython please let me know so I can fix the bug <!-- github-comment-id:707368386 -->
Author
Owner

@pythonmcpi in C++, I would guess this->GetClient()->GetNick(), so my python-guess is self.GetClient().GetNick()

@pythonmcpi in C++, I would guess `this->GetClient()->GetNick()`, so my python-guess is `self.GetClient().GetNick()` <!-- github-comment-id:707796606 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#546