Mercurial > prosody-wiki
annotate mod_muc_restrict_rooms.wiki @ 506:ad9071a3062c
Created wiki page through web user interface.
author | NKNeumann@gmail.com |
---|---|
date | Fri, 20 Feb 2015 18:30:17 +0000 |
parents | |
children | 77f510e2dc5b |
rev | line source |
---|---|
506
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
1 #summary Regexp based room restriction module |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
2 |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
3 = Introduction = |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
4 |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
5 This module allows disabling room creation based on regexp patterns defined in configuration. |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
6 |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
7 = Dependencies = |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
8 |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
9 This module depends on *muc/rooms* module. If *muc/rooms* is not loaded, this module won't work. |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
10 |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
11 = How to load the module = |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
12 |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
13 Copy the module to the prosody modules/plugins directory. |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
14 |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
15 In Prosody's configuration file, under the desired host section, add: |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
16 {{{ |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
17 modules_enabled = { |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
18 ... |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
19 "mod_muc_restrict_rooms"; |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
20 ... |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
21 } |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
22 }}} |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
23 |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
24 = Configuration = |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
25 |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
26 *mod_muc_restrict_rooms* has several variables which let you configure the patterns for room names you want to ban, establish exceptions for those patterns and even deciding whether admins can or not bypass the prohibition. |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
27 |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
28 || *Name* || *Description* || *Example* || *Default value* || |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
29 || muc_restrict_matching || Table in the key/value format (keys for patterns and values for reasons) that determines which rooms shouldn't be created. The key is a regexp and must be specified between quotation marks (see example). Room names will be evaluated always lowercase, so define your patterns taking this into consideration. || muc_restrict_matching = { ["^admin"] = "Rooms that start with 'admin' are reserved for staff use only" } || {} || |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
30 || muc_restrict_exceptions || String format table that contains exceptions to the above defined rules. Room names specified here will bypass the **muc_restrict_matching** restrictions and will be available for anyone || muc_restrict_exceptions = { "admins_are_good", "admins_rocks" } || {} || |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
31 || muc_restrict_allow_admins || Boolean that determines whether users in the *admin* table are able to bypass any room restriction. If ser to _true_, they will be able to bypass those rules. || muc_restrict_allow_admins = true || false || |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
32 |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
33 = Compatibility = |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
34 |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
35 || 0.9 || Works || |
ad9071a3062c
Created wiki page through web user interface.
NKNeumann@gmail.com
parents:
diff
changeset
|
36 || 0.8 || Should work || |