Index: matrix-eno-bot_0.0~git20240903/bot_commands.py
===================================================================
--- matrix-eno-bot_0.0~git20240903.orig/bot_commands.py
+++ matrix-eno-bot_0.0~git20240903/bot_commands.py
@@ -15,7 +15,7 @@ Don't change tabbing, spacing, or format
 file is automatically linted and beautified.
 
 """
-
+import sys
 import getpass
 import logging
 import os
@@ -24,9 +24,11 @@ import subprocess
 from sys import platform
 import traceback
 import time
+
 from chat_functions import send_text_to_room
 
 logger = logging.getLogger(__name__)
+logging.basicConfig(level=logging.DEBUG)
 
 SERVER_ERROR_MSG = "Bot encountered an error. Here is the stack trace: \n"
 
@@ -73,7 +75,7 @@ class Command(object):
 
         logger.debug(
             f"bot_commands :: Command.process: processing '" +
-            re.sub('^data:(\w+)/(\w+);(.+)', 'data:\\1/\\2;...', self.command) +
+            re.sub('^data:(\\w+)/(\\w+);(.+)', 'data:\\1/\\2;...', self.command) +
             f"' from room '{self.room.display_name}'"
         )
 
@@ -207,6 +209,9 @@ class Command(object):
             # complete combined list.
             new_env = os.environ.copy()
             new_env['ENO_SENDER'] = self.event.sender
+            new_env['ENO_ARGS'] = " ".join(self.args)
+            new_env['ENO_ROOM'] = self.room.named_room_name()
+            new_env['ENO_EVENT'] = self.event.body
             new_env['ENO_TIMESTAMP_SENT'] = str(int(self.event.server_timestamp / 1000))
             new_env['ENO_TIMESTAMP_RECEIVED'] = time.strftime("%s")
 
@@ -218,6 +223,7 @@ class Command(object):
                 universal_newlines=True,
                 env=new_env,
             )
+           
             run.stdin.write( self.command )
             output, std_err = run.communicate()
             output = output.strip()
Index: matrix-eno-bot_0.0~git20240903/main.py
===================================================================
--- matrix-eno-bot_0.0~git20240903.orig/main.py
+++ matrix-eno-bot_0.0~git20240903/main.py
@@ -54,7 +54,7 @@ async def main():  # noqa
     if len(sys.argv) > 1:
         config_filepath = sys.argv[1]
     else:
-        config_filepath = "config.yaml"
+        config_filepath = "/etc/matrix-eno-bot/config.yaml"
     config = Config(config_filepath)
 
     # Configure the database
@@ -172,9 +172,12 @@ async def main():  # noqa
 
 try:
     asyncio.run(main())
-except Exception:
-    logger.debug(traceback.format_exc())
-    sys.exit(1)
+
+# don't hide your exceptions!
+# except Exception as e:
+#     logger.debug(traceback.format_exc())
+#     print(e)
+#     sys.exit(1)
 except KeyboardInterrupt:
     logger.debug("Received keyboard interrupt.")
     sys.exit(1)
Index: matrix-eno-bot_0.0~git20240903/room_dict.py
===================================================================
--- matrix-eno-bot_0.0~git20240903.orig/room_dict.py
+++ matrix-eno-bot_0.0~git20240903/room_dict.py
@@ -1,3 +1,4 @@
+# import ipdb
 import sys
 import os
 import logging
@@ -64,17 +65,18 @@ class RoomDict:
             with open(room_dict_filepath) as fobj:
                 logger.debug(f"Loading room dictionary at {room_dict_filepath}")
                 self.room_dict = yaml.safe_load(fobj.read())
-
+            print(self.room_dict)
             if "rooms" in self.room_dict.keys():
                 self.rooms = self.room_dict["rooms"]
-
+            else:
+                print("no rooms key in self.rooms")
             if "paths" in self.room_dict.keys():
                 os.environ["PATH"] = os.pathsep.join(self.room_dict["paths"]+[os.environ["PATH"]])
                 logger.debug(f'Path modified. Now: {os.environ["PATH"]}.')
-
+            else:
+                print("no paths in room_dict keys")
         except FileNotFoundError:
             logger.error(f"File not found: {room_dict_filepath}")
-
         return
 
     def is_empty(self):
@@ -122,10 +124,11 @@ class RoomDict:
         if "rooms" in self.room_dict.keys():
             for com in self.room_dict["rooms"]:
                 # Implement rule 3
-                if type(self.room_dict["rooms"][com]) != dict:
-                    raise RoomDictSanityError(
-                        "Defined rooms must be dictionaries.")
-                for opt in self.room_dict["rooms"][com].keys():
+                #if type(self.room_dict["rooms"][com]) != dict:
+                #    raise RoomDictSanityError(
+                #        "Defined rooms must be dictionaries.")
+                # for opt in self.room_dict["rooms"][com].keys():
+                for opt in com.keys():
                     # Implement rule 4
                     if opt not in ("regex",
                                    "cmd",
@@ -134,46 +137,49 @@ class RoomDict:
                                    "markdown_convert",
                                    "formatted",
                                    "code",
-                                   "split"):
+                                   "split",
+                                   "name"):
                         raise RoomDictSanityError(
                             f"In room \"{com}\", invalid option found: " \
                             f"\"{opt}\".")
                     # Implement rule 6
                     elif opt in ("markdown_convert", "formatted", "code"):
-                        if type(self.room_dict["rooms"][com][opt]) != bool:
+                        #if type(self.room_dict["rooms"][com][opt]) != bool:
+                        if type(com[opt]) != bool:
                             raise RoomDictSanityError(
                                 f"In room \"{com}\", invalid value for option "
                                 f"\"{opt}\" found: " \
-                                f"\"{self.room_dict['rooms'][com][opt]}\"")
+                                f"\"{com[opt]}\"")
                     # Implement rule 5
                     else:
-                        if type(self.room_dict["rooms"][com][opt]) != str:
+                        if type(com[opt]) != str:
                             raise RoomDictSanityError(
                                 f"In room \"{com}\", room option " \
                                 f"\"{opt}\" must be a string.")
 
         return
 
-    def match(self, string):
+    def match(self, search_string):
         """Returns whether the given string matches any of the rooms' names
         regex patterns.
 
         Arguments:
         ----------
-            string (str): string to match
+            search_string (str): string to match
 
         """
         matched = False
         cmd = None
 
-        if string in self.rooms.keys():
+        # if search_string in self.rooms.keys():
+        if search_string in [ room['regex'] for room in self.rooms ]:
             matched = True
-            cmd = string
+            cmd = search_string
 
         else:
-            for room in self.rooms.keys():
-                if  "regex" in self.rooms[room].keys() \
-                and re.match(self.rooms[room]["regex"], string):
+            for room in self.rooms:
+                if  "regex" in room.keys() \
+                and re.match(room["regex"], search_string):
                     matched = True
                     cmd = room
                     break
@@ -185,18 +191,27 @@ class RoomDict:
     def get_last_matched_room(self):
         return self._last_matched_room
 
-    def get_cmd(self, room):
+    def get_cmd(self, room_name):
         """Return the name of the executable associated with the given room,
         for the system to call.
 
         Arguments:
         ----------
-            room (str): Name of the room in the room dictionary
+            room_name (str): Name of the room in the room dictionary
 
         """
-        return self.rooms[room]["cmd"]
+        # ipdb.set_trace()
+        for room in self.rooms:
+            logger.error(f"{room=}")
+            if isinstance(room, dict) and 'name' in room:
+                if room['name'] == room_name:
+                    if 'cmd' in room.keys():
+                        return room["cmd"]
+        else:
+            # or return some other command?
+            return ""  
 
-    def get_help(self,room):
+    def get_help(self,room_name):
         """Return the help string of the given room.
 
         Arguments:
@@ -204,12 +219,13 @@ class RoomDict:
             room (str): Name of the room in the room dictionary
 
         """
-        if "help" in self.rooms[room]:
-            return self.rooms[room]["help"]
+        for room in self.rooms:
+            if room['name']  == room_name:
+                return room['help'] 
         else:
             return "No help defined for this room."
 
-    def get_opt_args(self, room):
+    def get_opt_args(self, room_name):
         """Return value of the "args" option.
 
         Arguments:
@@ -217,12 +233,13 @@ class RoomDict:
             room (str): Name of the room in the room dictionary
 
         """
-        if "args" in self.room_dict["rooms"][room].keys():
-            return self.room_dict["rooms"][room]["args"].split()
+        for room in self.rooms:
+            if room['name']  == room_name:
+                return room['args'].split()     
         else:
             return RoomDict.DEFAULT_OPT_ARGS
 
-    def get_opt_markdown_convert(self, room):
+    def get_opt_markdown_convert(self, room_name):
         """Return boolean of the "markdown_convert" option.
 
         Arguments:
@@ -230,12 +247,14 @@ class RoomDict:
             room (str): Name of the room in the room dictionary
 
         """
-        if "markdown_convert" in self.room_dict["rooms"][room].keys():
-            return self.room_dict["rooms"][room]["markdown_convert"] == "true"
+        for room in self.rooms:
+            if room['name']  == room_name:
+                if "markdown_convert" in room.keys():
+                    return room["markdown_convert"]
         else:
             return RoomDict.DEFAULT_OPT_MARKDOWN_CONVERT
 
-    def get_opt_formatted(self, room):
+    def get_opt_formatted(self, room_name):
         """Return boolean of the "formatted" option.
 
         Arguments:
@@ -243,12 +262,14 @@ class RoomDict:
             room (str): Name of the room in the room dictionary
 
         """
-        if "formatted" in self.room_dict["rooms"][room].keys():
-            return self.room_dict["rooms"][room]["formatted"] == "true"
+        for room in self.rooms:
+            if room['name']  == room_name:
+                if "formatted" in room.keys():
+                    return room["formatted"]
         else:
             return RoomDict.DEFAULT_OPT_FORMATTED
 
-    def get_opt_code(self, room):
+    def get_opt_code(self, room_name):
         """Return boolean of the "code" option.
 
         Arguments:
@@ -256,21 +277,25 @@ class RoomDict:
             room (str): Name of the room in the room dictionary
 
         """
-        if "code" in self.room_dict["rooms"][room].keys():
-            return self.room_dict["rooms"][room]["code"] == "true"
+        for room in self.rooms:
+            if room['name'] == room_name:
+                if "code" in room.keys():
+                    return room["code"]
         else:
             return RoomDict.DEFAULT_OPT_CODE
 
-    def get_opt_split(self, room):
+    def get_opt_split(self, room_name):
         """Return the string defined in the "split" option, or None.
 
         Arguments:
         ----------
-            room (str): Name of the room in the room dictionary
+            room_name (str): Name of the room in the room dictionary
 
         """
-        if "split" in self.room_dict["rooms"][room].keys():
-            return self.room_dict["rooms"][room]["split"]
+        for room in self.rooms:
+            if room['name'] == room_name:
+                if "split" in room.keys():
+                    return room["split"]
         else:
             return RoomDict.DEFAULT_OPT_SPLIT
 
