Bug 340748 - Disable auto-WHO for Twitch servers.
Summary: Disable auto-WHO for Twitch servers.
Status: RESOLVED FIXED
Alias: None
Product: konversation
Classification: Applications
Component: general (show other bugs)
Version: 1.5.1
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konversation Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-08 02:13 UTC by Chiitoo
Modified: 2019-11-21 19:49 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch to Disable Auto-WHO for Twitch (716 bytes, patch)
2014-11-08 02:13 UTC, Chiitoo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chiitoo 2014-11-08 02:13:34 UTC
Created attachment 89498 [details]
Patch to Disable Auto-WHO for Twitch

Teegrins!


Twitch (irc.twitch.tv) does not support many (most?) of the common IRC commands, WHO being one of them.  As such, the automagical WHO-command results into a

"WHO: Unknown command."

message every minute, which can get quite annoying.

I realise that this is definitely not the most common use for Konversation, or that it might even be beyond its intended use, but I can't imagine mending this having negative aspects to it.

The attached patch is something I managed put together to further demonstrate what I'm asking for, but being a true beginner what comes to code, it could very well break something, or be all kinds of wrong without me knowing!

From what I can tell, it has been working fine here on (x86_64) Gentoo.


Thanks!
Comment 1 Eike Hein 2014-11-08 11:24:06 UTC
The main thing that's wrong here is that it's just not reasonable to include a check for a particular server hostname to alter behavior :). I understand the problem, but we're going to have to come up with a better idea for a solution here.
Comment 2 Chiitoo 2014-11-08 23:54:53 UTC
Indeed.  The patch is after all only a result (and I guess a personal 'fix') of me hacking around, trying to see if I can even find where the WHO comes from in the first place.

I fully expected this not to be 'the fix' but that there would be a more proper way to do it.


Thanks for the comment!
Comment 3 Eike Hein 2017-06-15 12:54:53 UTC
So we get a 421 for the failing WHO from the Twitch server it turns out. I think we should catch it, and stop auto-WHO'ing in response. I think it's safe to assume that if you get a 421 the server won't start supporting the command within the same session, and it's pointless to keep trying then.
Comment 4 Chiitoo 2017-06-15 13:53:22 UTC
(In reply to Eike Hein from comment #3)
> So we get a 421 for the failing WHO from the Twitch server it turns out. I
> think we should catch it, and stop auto-WHO'ing in response. I think it's
> safe to assume that if you get a 421 the server won't start supporting the
> command within the same session, and it's pointless to keep trying then.
Seems like a plan.

I have been thinking of this issue now and then again, and have been meaning to see if I could come up with a more proper-like solution.  Unfortunately, I haven't managed to get to it yet.

Many thanks for the comment (and reminder).  :]
Comment 5 Johannes E. Krause 2019-10-08 23:32:35 UTC
Just chiming in here because i ran into this issue.

The above patch/hack didn't apply cleanly for me (source RPM from OpenSUSE 15.1), and i had to switch out the != check for an .endsWith("twitch.tv") call

as for a more general solution, my immediate idea was that, during connecting to a server there seems to be this step that says "checking the capabilities of the server", could this be adapted to check the twitch-specific protocol extensions/omissions and set a flag whether WHO is an accepted command?

then that (and a few other things) could be guarded by this flag?
Comment 6 Eike Hein 2019-10-11 20:14:39 UTC
Could be, if the Twitch server announces some sort of cap bit related to this.
Comment 7 Peter Simonsson 2019-10-27 12:44:41 UTC
Git commit e4085aed8e38b9d665aa1efd1c38fb0cfe593da7 by Peter Simonsson.
Committed on 27/10/2019 at 12:39.
Pushed by psn into branch 'master'.

Disable WHO requests for twitch.tv servers

twitch.tv's IRC servers doesn't  have support for the WHO command so  let's
disable all WHO requests for servers that requests twitch.tv capabilities

M  +3    -0    src/irc/channel.cpp
M  +20   -2    src/irc/server.cpp
M  +3    -0    src/irc/server.h

https://commits.kde.org/konversation/e4085aed8e38b9d665aa1efd1c38fb0cfe593da7
Comment 8 Chiitoo 2019-11-21 19:49:00 UTC
Many thanks for taking care of this!