Headless chatbot that detects spam and posts links to it to chatrooms for quick deletion.
Clone or download
Failed to load latest commit information.
.circleci Cache venv dependencies to speed up build times Mar 23, 2018
.github Move informational files to .github/ Sep 5, 2018
classes Update parser regex Sep 4, 2018
test unified _remove_pickle() in tests Sep 18, 2018
.codeclimate.yml Revert "Merge pull request #1347 from rjrudman/master" Dec 8, 2017
.gitattributes Add a .gitattribute file for easier merge Sep 13, 2018
.gitignore Move pickles to one folder Sep 18, 2018
.pullapprove.yml Fix PA again Sep 13, 2018
.travis.yml Add Python 3.4 to Travis Aug 2, 2018
Dockerfile Document plain except:'s, #1168 Aug 6, 2018
InspectionReference.txt Remove unnecessary inspect suppression, reference the inspections. Jul 26, 2017
LICENSE-APACHE no one noticed this until September? Sep 5, 2018
LICENSE-MIT no one noticed this until September? Sep 5, 2018
README.md Add Python 3.4 to README Sep 18, 2018
apigetpost.py Replace bare except's with proper exceptions, #2364 Aug 4, 2018
bad_keywords.txt Auto blacklist of `rapid\W?spot` by iBug --autopull Sep 18, 2018
blacklisted_usernames.txt Auto blacklist of `gs\W?jj.*patch(?:es)?` by iBug --autopull Sep 12, 2018
blacklisted_websites.txt Auto blacklist of `topsupplements\.co\.za` by iBug --autopull Sep 18, 2018
blacklists.py Exclude #-ed comments from watches Sep 14, 2018
bodyfetcher.py small change to debug messages Sep 1, 2018
chatcommands.py manually update code priv list Sep 18, 2018
chatcommunicate.py Strip multiline wrapper div, close #2384 --autopull Aug 27, 2018
chatexchange_extension.py Invalidate content_source on edit hack Jul 16, 2018
codecov.yml Require coverage to change before posting comment Apr 1, 2017
config.ci Fix CI errors due to config file missing Oct 21, 2016
config.sample Make time format in log messages customizable Sep 4, 2018
datahandling.py manually update code priv list Sep 18, 2018
deletionwatcher.py Remove unnecessary list comprehensions, just use generator expressions Aug 7, 2018
excepthook.py typo Sep 7, 2018
findspam.py Watch NS cloudns.net --autopull Sep 18, 2018
fix_pickles.py shebang for executable scripts Sep 7, 2018
flovis.py Fix flovis --autopull Aug 6, 2018
gitmanager.py Try comparing HEAD --autopull Sep 7, 2018
globalvars.py Merge pull request #2391 from Charcoal-SE/detect-ms-down --autopull Sep 8, 2018
helpers.py Fix typerror in file logging --autopull Sep 9, 2018
install_dependencies.sh Use `python3` instead of `python` Jun 14, 2018
metasmoke.py missing one catch Sep 13, 2018
nocrash.py shebang for executable scripts Sep 7, 2018
parsing.py HTTP with optional S --autopull Sep 4, 2018
queue_timings.py shebang for executable scripts Sep 7, 2018
requirements.txt Drop dulwich, use subprocess Jul 31, 2018
rooms.yml added Erik von Asmuth for SOCVR Sep 12, 2018
setup.sh use install_dependencies Mar 14, 2018
spamhandling.py Temorarily revert 81be303 Sep 8, 2018
tasks.py Various fixes Feb 17, 2018
tox.ini Enforce E722, close #1168 Aug 6, 2018
tox_classes.ini flake8 v3.5 Jun 14, 2018
tox_tests.ini flake8 v3.5 Jun 14, 2018
user_requirements.txt post_data.as_dict Jul 13, 2018
watched_keywords.txt Auto watch of `answiz\.com` by Glorfindel --autopull Sep 18, 2018
ws.py Merge utcdate into globalvars Sep 7, 2018



Build Status Circle CI Coverage Status Open issues Open PRs

Headless chatbot that detects spam and posts it to chatrooms. Uses ChatExchange, takes questions from the Stack Exchange realtime tab, and accesses answers via the Stack Exchange API.

Example chat post:

Example chat post

User documentation is in the wiki.

To set up, use

git config user.email "smokey@erwaysoftware.com"
git config user.name "SmokeDetector"

git clone https://github.com/Charcoal-SE/SmokeDetector.git
cd SmokeDetector
git checkout deploy
sudo pip3 install -r requirements.txt --upgrade
pip3 install --user -r user_requirements.txt --upgrade

Next, copy config.sample to a new file called config, and edit the values required.

To run, use python3 nocrash.py (preferably in a daemon-able mode, like a screen session.) You can also use python3 ws.py, but then SmokeDetector will be shut down after 6 hours; when running from nocrash.py, it will be restarted. (This is to be sure that closed websockets, if any, are reopened.)

SmokeDetector only supports Stack Exchange logins, and runs on Python 3.4 or higher, for now.


Licensed under either of

at your option.

Contribution Licensing

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.