Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
5d888f2b
Commit
5d888f2b
authored
6 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Add word filter to muc
parent
f3229428
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone-app-xmpp
+13
-0
13 additions, 0 deletions
src/freedombone-app-xmpp
with
13 additions
and
0 deletions
src/freedombone-app-xmpp
+
13
−
0
View file @
5d888f2b
...
...
@@ -697,6 +697,17 @@ function upgrade_xmpp {
xmpp_contact_info /etc/prosody/prosody.cfg.lua
xmpp_server_blacklist /etc/prosody/prosody.cfg.lua
# add word filter to muc
if
!
grep
-q
'"filter_words"'
/etc/prosody/prosody.cfg.lua
;
then
sed
-i
'/"muc_limits"/a "filter_words";'
/etc/prosody/prosody.cfg.lua
sed
-i
's|"filter_words"| "filter_words"|g'
/etc/prosody/prosody.cfg.lua
xmpp_restart
=
1
fi
if
!
grep
-q
'filter_words ='
/etc/prosody/prosody.cfg.lua
;
then
echo
'filter_words = {}'
>>
/etc/prosody/prosody.cfg.lua
xmpp_restart
=
1
fi
# remove muc logging
if
grep
-q
'"muc_log"'
/etc/prosody/prosody.cfg.lua
;
then
sed
-i
'/"muc_log"/d'
/etc/prosody/prosody.cfg.lua
...
...
@@ -1258,6 +1269,7 @@ function xmpp_create_config {
echo
' name = "Chatrooms"'
;
echo
' modules_enabled = {'
;
echo
' "muc_limits";'
;
echo
' "filter_words";'
;
echo
' "muc_block_pm";'
;
echo
' "tls";'
;
echo
' "vcard_muc";'
;
...
...
@@ -1277,6 +1289,7 @@ function xmpp_create_config {
echo
" }"
;
}
>>
/etc/prosody/prosody.cfg.lua
fi
{
echo
'storage = { muc_log = "sql"; }'
;
echo
'filter_words = {}'
;
echo
'sql = { driver = "SQLite3", database = "prosody.sqlite" }'
;
echo
'muc_event_rate = 0.5;'
;
echo
'muc_burst_factor = 10;'
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment