diff --git a/README.md b/README.md index 31f34977..481e11a0 100644 --- a/README.md +++ b/README.md @@ -393,3 +393,21 @@ Or to unblock: ``` bash python3 epicyon.py --nickname yournick --domain yourdomain --unblock somenick@somedomain ``` + +## Filtering on words or phrases + +Blocking based upon the content of a message containing certain words or phrases is relatively crude and not always effective, but can help to reduce unwanted communications. + +To add a word or phrase to be filtered out: + +``` bash +python3 epicyon.py --nickname yournick --domain yourdomain --filter "this is a filtered phrase" +``` + +It can also be removed with: + +``` bash +python3 epicyon.py --nickname yournick --domain yourdomain --unfilter "this is a filtered phrase" +``` + +Like blocking, filters are per account and so different accounts on a server can have differing filter policies. diff --git a/epicyon.py b/epicyon.py index 2fa25284..fa7589c1 100644 --- a/epicyon.py +++ b/epicyon.py @@ -625,7 +625,7 @@ if args.filterStr: print('Please specify a nickname') sys.exit() if addFilter(baseDir,args.nickname,domain,args.filterStr): - print('Filter added: '+args.filterStr) + print('Filter added to '+args.nickname+': '+args.filterStr) sys.exit() if args.unfilterStr: @@ -633,7 +633,7 @@ if args.unfilterStr: print('Please specify a nickname') sys.exit() if removeFilter(baseDir,args.nickname,domain,args.unfilterStr): - print('Filter removed: '+args.unfilterStr) + print('Filter removed from '+args.nickname+': '+args.unfilterStr) sys.exit() if args.testdata: