muc filter - xnamed/isida4 GitHub Wiki

Principle of operation

Description of the principle of work for self-implementation on the server side:

  • in the conference configurator the text field "Filter messages from unaffiliated users through Jabber ID" is added;
  • in this field the JID of the filtering bot with the resource is entered;
  • if this JID is not in the conference - the filter is disabled;
  • if JID is present in the conference, then all messages and presences from participants with affiliation none are passed to the filtering JID:
  • form of message transmission:
       <iq to="[email protected]/res" from="[email protected]" id="id">
           <query xmlns="http://jabber.ru/muc-filter">
               <message>...</message> # Original stanza with message
           </query>
       </iq>
  • answer:
       <iq to="[email protected]" from="[email protected]/res" type="result" id="id">
           <query xmlns="http://jabber.ru/muc-filter">
               <message>...</message> # Modified stanza with a message
           </query>
       </iq>
  • the form of the transfer of the Presence:
       <iq to="[email protected]/res" from="[email protected]" id="id">
           <query xmlns="http://jabber.ru/muc-filter">
               <presence>...</presence> # Original stanza with a presence
           </query>
       </iq>
  • answer:
       <iq to="[email protected]" from="[email protected]/res" type="result" id="id">
           <query xmlns="http://jabber.ru/muc-filter">
               <presence>...</presence> # Modified stanza with presence
           </query>
       </iq>
  • The result is transferred to the conference after processing
  • The result may not return to the conference
  • On the filtration, there are no pre-events about leaving the conference
  • if the conference is filtered at the entrance from the conference, the notification "This room is filtered by external service"

Configuring the bot

Table of Contents

Basic settings for the Muc filter

  • muc_filter Muc-filter. Enabling the filter
    • Recommended: True
    • Configuration options: True, False
    • Default: False

Muc filter for beginners

  • muc_filter_newbie Suppress messages from newbies

    • Recommended: True
    • Configuration options: True, False
    • Default: False
  • muc_filter_newbie_repeat Number of messages for the beginner

    • Recommended: 3
    • Configuration options: Digital value
    • Default: 3
  • muc_filter_newbie_time Age in seconds, during which the participant is considered a newcomer

    • Recommended: 60
    • Configuration options: Digital value
    • Default: 60
  • muc_filter_newbie_repeat_action The action when the number of messages from the beginner is used

    • Recommended: ban
    • Configuration options: off, kick, ban
    • Default: off

Muc filter for hash actions

  • muc_filter_hash Hash. Activity Verification

    • Recommended: True
    • Configuration options: True, False
    • Default: False
  • muc_filter_hash_ban_server_by_rejoin_notify_jid Hash. Jid'y for notifications about the server bath

    • Recommended: jid'y of conference owners, separated by spaces
    • Configuration options: Text value
    • Default:
  • muc_filter_hash_ban_by_rejoin Hash. Ban with hash activity

    • Recommended: True
    • Configuration options: True, False
    • Default: True
  • muc_filter_deny_hash Inhibit input by hash

    • Recommended: True
    • Configuration options: True, False
    • Default: False
  • muc_filter_hash_ban_by_rejoin_timeout Hash. Timeout in seconds between connections for a hash ban

    • Recommended: 600
    • Configuration options: Digital value
    • Default: 600
  • muc_filter_hash_action_current Hash. Action for already connected

    • Recommended: kick
    • Configuration options: off, kick, ban
    • Default: off
  • muc_filter_hash_action_time Hash. Turn-off time

    • Recommended: 1800
    • Configuration options: Digital value
    • Default: 1800
  • muc_filter_hash_ban_server_by_rejoin_exception Hash. An exception for the server ban

    • Recommended: enter the server through a space, from which it is guaranteed there will be no attacks
    • Configuration options: Text value
    • Default: empty
  • muc_filter_hash_ban_server_by_rejoin_rejoins Hash. Number of connections for the server ban

    • Recommended: 5
    • Configuration options: Digital value
    • Default: 5
  • muc_filter_hash_time Hash. Verification period

    • Recommended: 20
    • Configuration options: Digital value
    • Default: 20
  • muc_filter_hash_action Hash. Activity type with activity

    • Recommended: whitelist
    • Configuration options: whitelist, lock by hash
    • Default: whitelist
  • muc_filter_hash_events Hash. Number of events

    • Recommended: 10
    • Configuration options: Digital value
    • Default: 10
  • muc_filter_hash_ban_server_by_rejoin Hash. Banning a server with hash activity

    • Recommended: True
    • Configuration options: True, False
    • Default: True
  • muc_filter_deny_hash_list List of banned hashes

    • Recommended: to enter the forbidden hashes through a blank. for example: kkszQWHbfKh+UjiKFVp4yA== M5zTueiXDkT2Wg1M4IiTcQ==
    • Configuration options: Text box
    • Default: empty
  • muc_filter_hash_ban_server_by_rejoin_timeout Hash. Timeout for connections from the server to the ban

    • Recommended: 60
    • Configuration options: Digital value
    • Default: 60

Muc filter for actions by content

  • muc_filter_repeat_prs Blocking of the pre -flood

    • Recommended: kick
    • Configuration options: off, kick, ban, mute
    • Default: off
  • muc_filter_reduce_spaces_msg Suppress multiple spaces in messages

    • Recommended: True
    • Configuration options: True, False
    • Default: False
  • muc_filter_newline_msg Blocking messages with new rows

    • Recommended: replace
    • Configuration options: off, kick, ban, mute, replace
    • Default: off
  • muc_filter_match Blocking duplicates within messages

    • Recommended: kick
    • Configuration options: off, visitor, kick, ban, mute
    • Default: off
  • muc_filter_large_status Reaction to long statuses

    • Recommended: truncate
    • Configuration options: off, visitor, kick, ban, truncate, mute
    • Default: off
  • muc_filter_large_nick Reaction to long nicknames

    • Recommended: kick
    • Configuration options: off, visitor, kick, ban, truncate, mute
    • Default: off
  • muc_filter_rejoin Blocking multiple inputs

    • Recommended: True
    • Configuration options: True, False
    • Default: False
  • muc_filter_large Responding to large messages

    • Recommended: paste
    • Configuration options: off, visitor, kick, ban, paste, truncate, mute
    • Default: off
  • muc_filter_newline Locking statuses with new rows

    • Recommended: kick
    • Configuration options: off, kick, ban, mute, replace
    • Default: off
  • muc_filter_newline_msg_count Number of new rows in the message to block

    • Recommended: 2
    • Configuration options: Digital value
    • Default: 2
  • muc_filter_repeat Message Repeat Lock

    • Recommended: kick
    • Configuration options: off, visitor, kick, ban, mute
    • Default: off
  • muc_filter_newline_count Number of new lines in the presence for blocking

    • Recommended: 2
    • Configuration options: Digital value
    • Default: 2
  • muc_filter_reduce_spaces_prs Suppress multiple spaces in the presence

    • Recommended: True
    • Configuration options: True, False
    • Default: False

Muc filter for suspicious actions

  • muc_filter_adblock_prs_raw Blocking hidden advertising in the presence

    • Recommended: off
    • Configuration options: off, kick, ban, mute
    • Default: off
  • muc_filter_raw_percent Percent of short words for enabling hidden action checking

    • Recommended: 40
    • Configuration options: Digital value
    • Default: 40
  • muc_filter_censor_raw Censor blocking of hidden mat

    • Recommended: off
    • Configuration options: off, visitor, kick, ban, mute
    • Default: off
  • muc_filter_censor_prs_raw Blocking by the censor of the hidden mat in the presence

    • Recommended: off
    • Configuration options: off, kick, ban, mute
    • Default: off
  • muc_filter_adblock_raw Blocking hidden advertising

    • Recommended: off
    • Configuration options: off, visitor, kick, ban, mute
    • Default: off

Muc filter for censor/ad blocking

  • muc_filter_censor The actions of the muc-censor

    • Recommended: replace
    • Configuration options: off, visitor, kick, ban, replace, mute
    • Default: off
  • muc_filter_adblock_prs Blocking of advertisements in prezens

    • Recommended: replace
    • Configuration options: off, kick, ban, replace, mute
    • Default: off
  • muc_filter_censor_prs Censor for preenses

    • Recommended: replace
    • Configuration options: off, kick, ban, replace, mute
    • Default: off
  • muc_filter_adblock Ad blocking

    • Recommended: replace
    • Configuration options: off, visitor, kick, ban, replace, mute
    • Default: off

Muc filter for white/black lists

  • muc_filter_blacklist_rules_nick Black list. Rules for nicks

    • Recommended: enter a regular expression to describe the black list. for example: (^catru.*?|.*?russia.*?)
    • Configuration options: Text value
    • Default: empty
  • muc_filter_whitelist Whitelist

    • Recommended: False
    • Configuration options: True, False
    • Default: False
  • muc_filter_blacklist_rules_jid The black list. Rules for jid'ov

    • Recommended: enter a regular expression to describe the black list. for example: (^catru.*?|.*?russia.*?)
    • Configuration options: Text value
    • Default: empty
  • muc_filter_blacklist Black list

    • Recommended: True
    • Configuration options: True, False
    • Default: False

Muc filter for caps lists

  • muc_filter_caps_black Black list

    • Recommended: to enter through the blank unacceptable caps. the symbol "asterisk" means any symbols. for example: *tkabber*
    • Configuration options: Text value
    • Default: empty
  • muc_filter_caps_list List type

    • Recommended: black
    • Configuration options: off, black, white
    • Default: off
  • muc_filter_caps_white Whitelist

    • Recommended: fit the allowable caps through the space. the symbol "asterisk" means any symbols. for example: *tkabber*
    • Configuration options: Text value
    • Default: empty

Muc filter for checking the correctness of the elements

  • muc_filter_validate_caps_version Checking the version in the capsule

    • Recommended: True
    • Configuration options: True, False
    • Default: True
  • muc_filter_validate_resource Resource check

    • Recommended: True
    • Configuration options: True, False
    • Default: True
  • muc_filter_validate_count The number of incorrect elements

    • Recommended: 4
    • Configuration options: Digital value
    • Default: 4
  • muc_filter_validate_ban_server_notify_jid Jid for notifying about the server ban

    • Recommended: enter the jid of the conference
    • Configuration options: Text value
    • Default:
  • muc_filter_validate_caps_node Checking the node in the caps

    • Recommended: True
    • Configuration options: True, False
    • Default: True
  • muc_filter_validate_action The action for the incorrect elements

    • Recommended: ban
    • Configuration options: off, ban, ban server
    • Default: ban
  • muc_filter_validate_ban_server_exception Banning servers for a ban

    • Recommended: enter through a space server, from which it is guaranteed there will be no attacks
    • Configuration options: Text value
    • Default:
  • muc_filter_validate_nick Checking the nickname

    • Recommended: True
    • Configuration options: True, False
    • Default: True
  • muc_filter_validate_login Login verification

    • Recommended: True
    • Configuration options: True, False
    • Default: True
⚠️ **GitHub.com Fallback** ⚠️