import importlib
import modular

import modules.logging
import modules.eval
import modules.coffee
import modules.repeat
importlib.reload(modular)
importlib.reload(modules.logging)
importlib.reload(modules.eval)
importlib.reload(modules.repeat)
importlib.reload(modules.coffee)
MODULES = [
        modules.eval.Eval,
        modules.repeat.Repeat,
        modules.coffee.Coffee,
        ]


class Client(modular.ModularClient):
    def __init__(self, mud):
        super().__init__(mud)
        self.modules = [m(mud) for m in MODULES] + [modules.logging.Logging(mud, 'new.log')]


def getClass():
    return Client

@@ -10,16 +10,33 @@
 portlib%0A
+import traceback%0A
 import m
@@ -105,36 +105,80 @@
 les.
-coffee%0Aimport modules.repeat
+repeat%0Aimport modules.coffee%0Aimport modules.mapper%0Aimport modules.gaoler
 %0Aimp
@@ -335,107 +335,267 @@
 ee)%0A
-MODULES = %5B%0A        modules.eval.Eval,%0A        modules.repeat.Repeat,%0A        modules.coffee.Coffee
+importlib.reload(modules.gaoler)%0Aimportlib.reload(modules.mapper)%0AMODULES = %5B  # determines the pecking order%0A        modules.eval.Eval,%0A        modules.repeat.Repeat,%0A        modules.mapper.Mapper,%0A        modules.coffee.Coffee,%0A        modules.gaoler.Gaoler
 ,%0A  
@@ -683,37 +683,78 @@
    s
-uper().__init__(mud)%0A
+elf.modules = %5B%5D%0A        for m in MODULES:%0A            try:%0A  
         
 self
@@ -741,32 +741,38 @@
  try:%0A          
+      
 self.modules = %5B
@@ -771,80 +771,267 @@
 ules
- = %5Bm(mud) for m in MODULES%5D + %5Bmodules.logging.Logging(mud, 'new.log')%5D
+.append(m(mud))%0A            except Exception:%0A                traceback.print_exc()%0A        try:%0A            self.modules.append(modules.logging.Logging(mud, 'new.log'))%0A        except Exception:%0A            traceback.print_exc()%0A        super().__init__(mud)
 %0A%0A%0Ad

make module adding resistant to exceptions