mod_irc: Disable spurious vCard->WHOIS requests (thanks to Kousu)(#874)

It makes sense that vCard in XMPP roughly maps to WHOIS in IRC,
but there is no code that actually handles receiving WHOISes properly:
they just get passed through as plain messages coming from user!ircserver@irc.xmppserver.tld.
I suppose sometimes you want to manually be able to run a WHOIS and see the results,
so I don't want them banned entirely, but I don't want them on each run.

Sending spurious WHOISes pisses off Xabber, which overenthusiastically sends "get vCard"
IQ stanzas on every single presence change (even "unavailable"); this has the horrible
side effect of spawning a huge number of private chats with users I have never talked to,
and buzzing my phone uncontrollably for a good minute, whenever I join a channel with more
than 50 people in it, and the same every time someone's connection drops.

Disabling this scratches an itch for me and patches over what is arguably Xabber's problem,
but in fact, this code was already half-disabled: *even though it sends IRC commands* it
returns ?ERR_FEATURE_NOT_IMPLEMENTED.  Was this an oversight?
This commit is contained in:
Badlop 2019-01-21 14:55:31 +01:00
parent cfad261cf4
commit 5c94639bf2
1 changed files with 4 additions and 2 deletions

View File

@ -407,8 +407,10 @@ handle_info({route_chan, Channel, Resource,
Err = xmpp:err_feature_not_implemented(),
ejabberd_router:route_error(Packet, Err);
?NS_VCARD ->
Res = io_lib:format("WHOIS ~s \r\n", [Resource]),
_ = (?SEND(Res)),
%% TODO: catch WHOIS replies and translate their details to something resembling vCards
%% For now this just errors out.
%% Res = io_lib:format("WHOIS ~s \r\n", [Resource]),
%% _ = (?SEND(Res)),
Err = xmpp:err_feature_not_implemented(),
ejabberd_router:route_error(Packet, Err);
_ ->