ejabberd-contrib/mod_irc
Badlop 5c94639bf2 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?
2019-01-21 14:55:31 +01:00
..
include Add mod_irc.hrl 2018-06-20 11:51:31 +03:00
sql Add SQL schemas for mod_irc 2018-06-20 11:47:48 +03:00
src mod_irc: Disable spurious vCard->WHOIS requests (thanks to Kousu)(#874) 2019-01-21 14:55:31 +01:00
README.md Move here mod_irc module from the main ejabberd repo 2018-06-20 11:38:22 +03:00

README.md

mod_irc

This module is an IRC transport that can be used to join channels on IRC servers.

End user information:

  • A XMPP client with groupchat 1.0 support or Multi-User Chat support ([XEP-0045][72]) is necessary to join IRC channels.

  • An IRC channel can be joined in nearly the same way as joining a XMPP Multi-User Chat room. The difference is that the room name will be channel%irc.example.org in case irc.example.org is the IRC server hosting channel. And of course the host should point to the IRC transport instead of the Multi-User Chat service.

  • You can register your nickame by sending IDENTIFY password to nickserver!irc.example.org@irc.jabberserver.org.

  • Entering your password is possible by sending LOGIN nick password to nickserver!irc.example.org@irc.jabberserver.org.

  • The IRC transport provides Ad-Hoc Commands ([XEP-0050][73]) to join a channel, and to set custom IRC username and encoding.

  • When using a popular XMPP server, it can occur that no connection can be achieved with some IRC servers because they limit the number of connections from one IP.

Options:

host: HostName: This option defines the Jabber ID of the service. If the host option is not specified, the Jabber ID will be the hostname of the virtual host with the prefix irc.. The keyword “@HOST@” is replaced at start time with the real virtual host name.

db_type: mnesia|sql|riak: Define the type of storage where the module will create the tables and store user information. The default is the storage defined by the global option default_db, or mnesia if omitted. If sql or riak value is defined, make sure you have defined the database, see database.

access: AccessName: This option can be used to specify who may use the IRC transport (default value: all).

default_encoding: Encoding: Set the default IRC encoding. Default value: iso8859-1

Examples:

  • In the first example, the IRC transport is available on (all) your virtual host(s) with the prefix irc.. Furthermore, anyone is able to use the transport. The default encoding is set to “iso8859-15”.

    modules:
      ...
      mod_irc:
        access: all
        default_encoding: "iso8859-15"
      ...
    
  • In next example the IRC transport is available with JIDs with prefix irc-t.net. Moreover, the transport is only accessible to two users of example.org, and any user of example.com:

    acl:
      paying_customers:
        user:
          - "customer1": "example.org"
          - "customer2": "example.org"
        server: "example.com"
    
    access_rules:
      irc_users:
        - allow: paying_customers
    
    modules:
      ...
      mod_irc:
        access: irc_users
        host: "irc.example.net"
      ...