banned/src/roles/cursed.py
Em Barry 28f26e181b Add the new User containers (#316)
- Add the new User containers for easier handling of users throughout the codebase
- Remove the swap_player event (replaced by User.swap, made possible thanks to the containers)
- Remove the cli argument from several events
- Remove !frole (a replacement will follow)
- Remove the ALLOWED_NORMAL_MODE_COMMANDS config option

Plus a couple of small fixes here and there.
2018-04-13 13:37:04 -07:00

27 lines
728 B
Python

import re
import random
import itertools
import math
from collections import defaultdict
import botconfig
import src.settings as var
from src.utilities import *
from src import users, channels, debuglog, errlog, plog
from src.decorators import cmd, event_listener
from src.containers import UserList, UserSet, UserDict
from src.messages import messages
from src.events import Event
@event_listener("see")
def on_see(evt, var, nick, victim):
if users._get(victim) in var.ROLES["cursed villager"]: # FIXME
evt.data["role"] = "wolf"
@event_listener("wolflist")
def on_wolflist(evt, var, player, wolf):
if player in var.ROLES["cursed villager"]:
evt.data["tags"].add("cursed")
# vim: set sw=4 expandtab: