Skip to content

Commit

Permalink
Add !!/clearbl command to clear blacklisted users
Browse files Browse the repository at this point in the history
!!/clearbl removes the list of blacklisted users
  • Loading branch information
thomas-daniels committed Dec 31, 2014
1 parent 69d14e3 commit 8007eda
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,14 @@ def watcher(ev,wrap2):
if(isPrivileged(ev_room, ev_user_id)):
ev.message.reply("Checking out to master and restarting...")
os._exit(8)
if(content_lower.startswith("!!/clearbl")):
if(isPrivileged(ev_room, ev_user_id)):
if(os.path.isfile("blacklistedUsers.txt")):
os.remove("blacklistedUsers.txt")
GlobalVars.blacklisted_users = []
ev.message.reply("Kaboom, blacklisted users cleared.")
else:
ev.message.reply("There are no blacklisted users at the moment.")
if(content_lower.startswith("!!/block")):
if(isPrivileged(ev_room, ev_user_id)):
ev.message.reply("blocked")
Expand Down

0 comments on commit 8007eda

Please sign in to comment.