# Path: will/settings.py
# def auto_key():
# def import_settings(quiet=True):
#         DEPRECATED_BUT_MAPPED_SETTINGS = {
#             "USERNAME": "HIPCHAT_USERNAME",
#             "PASSWORD": "HIPCHAT_PASSWORD",
#             "V1_TOKEN": "HIPCHAT_V1_TOKEN",
#             "V2_TOKEN": "HIPCHAT_V2_TOKEN",
#             "TOKEN": "HIPCHAT_V1_TOKEN",
#             "ROOMS": "HIPCHAT_ROOMS",
#             "NAME": "HIPCHAT_NAME",
#             "HANDLE": "HIPCHAT_HANDLE",
#             "DEFAULT_ROOM": "HIPCHAT_DEFAULT_ROOM",
#             "SLACK_DEFAULT_ROOM": "SLACK_DEFAULT_CHANNEL",
#         }
#             IO_BACKENDS = []
# 
# Path: will/decorators.py
# def require_settings(*setting_names):
#     def wrap(f):
#         def wrapped_f(*args, **kwargs):
#             f(*args, **kwargs)
#         wrapped_f.will_fn_metadata = getattr(f, "will_fn_metadata", {})
#         wrapped_f.will_fn_metadata["required_settings"] = setting_names
#         return wrapped_f
#     return wrap
# 
# Path: will/acl.py
# def verify_acl(message, acl):
#     try:
#         if settings.DISABLE_ACL:
#             return True
# 
#         allowed = is_acl_allowed(message.sender.id, acl)
#         if allowed:
#             return True
#         if hasattr(message, "data") and hasattr(message.data, "backend_supports_acl"):
#             if not message.data.backend_supports_acl:
#                 logging.warning(
#                     "%s was just allowed to perform actions in %s because the backend does not support ACL.  This can be a security risk." % (
#                         message.sender.handle,
#                         acl,
#                     ) + "To fix this, set ACL groups in your config.py, or set DISABLE_ACL = True"
#                 )
#                 return True
#     except:
#         pass
# 
#     return False
# 
# Path: will/abstractions.py
# class Event(Bunch):
#     will_internal_type = "Event"
# 
#     REQUIRED_FIELDS = [
#         "type",
#         "version",
#     ]
# 
#     def __init__(self, *args, **kwargs):
#         super(Event, self).__init__(*args, **kwargs)
#         self.version = 1
# 
#         for f in self.REQUIRED_FIELDS:
#             if not f in kwargs and not hasattr(self, f):
#                 raise Exception("Missing %s in Event construction." % f)
# 
#         if "timestamp" in kwargs:
#             self.timestamp = kwargs["timestamp"]
#         else:
#             self.timestamp = datetime.datetime.now()
# 
#         h = hashlib.md5()
#         h.update(self.timestamp.strftime("%s").encode("utf-8"))
#         h.update(self.type.encode("utf-8"))
#         self.hash = h.hexdigest()
#         if not "original_incoming_event_hash" in kwargs:
#             if hasattr(self, "original_incoming_event") and hasattr(self.original_incoming_event, "hash"):
#                 self.original_incoming_event_hash = self.original_incoming_event.hash
#             else:
#                 self.original_incoming_event_hash = self.hash


import imp
import logging
import signal
import traceback
from will import settings
from will.decorators import require_settings
from will.acl import verify_acl
from will.abstractions import Event
from multiprocessing import Process
                acl = [acl]

            allowed = True
            if len(acl) > 0:
                allowed = verify_acl(message, acl)

            if not allowed:
                acl_list = ""
                more_than_one_s = ""
                if len(acl) > 1:
                    more_than_one_s = "s"
                for i in range(0, len(acl)):
                    if i == 0:
                        acl_list = "%s" % acl[i]
                    elif i == len(acl) - 1:
                        acl_list = "%s or %s" % (acl_list, acl[i])
                    else:
                        acl_list = "%s, %s" % (acl_list, acl[i])
                explanation = "Sorry, but I don't have you listed in the %s group%s, which is required to do what you asked." % (acl_list, more_than_one_s)

                self.not_allowed(
                    message,
                    explanation
                )
                return

        if "say_content" in option.context:
            # We're coming from a generation engine like a chatterbot, which doesn't *do* things.
            self.bot.pubsub.publish(
                "message.outgoing.%s" % message.data.backend,

# Path: will/settings.py
# def auto_key():
# def import_settings(quiet=True):
#         DEPRECATED_BUT_MAPPED_SETTINGS = {
#             "USERNAME": "HIPCHAT_USERNAME",
#             "PASSWORD": "HIPCHAT_PASSWORD",
#             "V1_TOKEN": "HIPCHAT_V1_TOKEN",
#             "V2_TOKEN": "HIPCHAT_V2_TOKEN",
#             "TOKEN": "HIPCHAT_V1_TOKEN",
#             "ROOMS": "HIPCHAT_ROOMS",
#             "NAME": "HIPCHAT_NAME",
#             "HANDLE": "HIPCHAT_HANDLE",
#             "DEFAULT_ROOM": "HIPCHAT_DEFAULT_ROOM",
#             "SLACK_DEFAULT_ROOM": "SLACK_DEFAULT_CHANNEL",
#         }
#             IO_BACKENDS = []
# 
# Path: will/decorators.py
# def require_settings(*setting_names):
#     def wrap(f):
#         def wrapped_f(*args, **kwargs):
#             f(*args, **kwargs)
#         wrapped_f.will_fn_metadata = getattr(f, "will_fn_metadata", {})
#         wrapped_f.will_fn_metadata["required_settings"] = setting_names
#         return wrapped_f
#     return wrap
# 
# Path: will/acl.py
# def verify_acl(message, acl):
#     try:
#         if settings.DISABLE_ACL:
#             return True
# 
#         allowed = is_acl_allowed(message.sender.id, acl)
#         if allowed:
#             return True
#         if hasattr(message, "data") and hasattr(message.data, "backend_supports_acl"):
#             if not message.data.backend_supports_acl:
#                 logging.warning(
#                     "%s was just allowed to perform actions in %s because the backend does not support ACL.  This can be a security risk." % (
#                         message.sender.handle,
#                         acl,
#                     ) + "To fix this, set ACL groups in your config.py, or set DISABLE_ACL = True"
#                 )
#                 return True
#     except:
#         pass
# 
#     return False
# 
# Path: will/abstractions.py
# class Event(Bunch):
#     will_internal_type = "Event"
# 
#     REQUIRED_FIELDS = [
#         "type",
#         "version",
#     ]
# 
#     def __init__(self, *args, **kwargs):
#         super(Event, self).__init__(*args, **kwargs)
#         self.version = 1
# 
#         for f in self.REQUIRED_FIELDS:
#             if not f in kwargs and not hasattr(self, f):
#                 raise Exception("Missing %s in Event construction." % f)
# 
#         if "timestamp" in kwargs:
#             self.timestamp = kwargs["timestamp"]
#         else:
#             self.timestamp = datetime.datetime.now()
# 
#         h = hashlib.md5()
#         h.update(self.timestamp.strftime("%s").encode("utf-8"))
#         h.update(self.type.encode("utf-8"))
#         self.hash = h.hexdigest()
#         if not "original_incoming_event_hash" in kwargs:
#             if hasattr(self, "original_incoming_event") and hasattr(self.original_incoming_event, "hash"):
#                 self.original_incoming_event_hash = self.original_incoming_event.hash
#             else:
#                 self.original_incoming_event_hash = self.hash


# Path: will/backends/execution/base.py
import imp
import logging
import signal
import traceback
from will import settings
from will.decorators import require_settings
from will.acl import verify_acl
from will.abstractions import Event
from multiprocessing import Process

                acl = [acl]

            allowed = True
            if len(acl) > 0:
                allowed = verify_acl(message, acl)

            if not allowed:
                acl_list = ""
                more_than_one_s = ""
                if len(acl) > 1:
                    more_than_one_s = "s"
                for i in range(0, len(acl)):
                    if i == 0:
                        acl_list = "%s" % acl[i]
                    elif i == len(acl) - 1:
                        acl_list = "%s or %s" % (acl_list, acl[i])
                    else:
                        acl_list = "%s, %s" % (acl_list, acl[i])
                explanation = "Sorry, but I don't have you listed in the %s group%s, which is required to do what you asked." % (acl_list, more_than_one_s)

                self.not_allowed(
                    message,
                    explanation
                )
                return

        if "say_content" in option.context:
            # We're coming from a generation engine like a chatterbot, which doesn't *do* things.
            self.bot.pubsub.publish(
                "message.outgoing.%s" % message.data.backend,

                Event(