parent
ddaf8a3890
commit
514b0126f2
3 changed files with 2 additions and 16 deletions
0
external_modules/.keep
Normal file
0
external_modules/.keep
Normal file
|
@ -13,12 +13,3 @@ class Module(ModuleManager.BaseModule):
|
|||
@utils.kwarg("expect_output", False)
|
||||
def action(self, event):
|
||||
event["target"].send_message("\x01ACTION %s\x01" % event["args"])
|
||||
|
||||
@utils.hook("received.command.msg")
|
||||
@utils.kwarg("min_args", 2)
|
||||
@utils.kwarg("permission", "say")
|
||||
@utils.kwarg("remove_empty", False)
|
||||
@utils.kwarg("help", "Send a message to a target")
|
||||
def msg(self, event):
|
||||
event["server"].send_message(event["args_split"][0],
|
||||
" ".join(event["args_split"][1:]))
|
||||
|
|
9
start.py
9
start.py
|
@ -42,7 +42,6 @@ arg_parser.add_argument("--module", "-m",
|
|||
help="Execute an action against a specific module")
|
||||
arg_parser.add_argument("--module-args", "-M",
|
||||
help="Arguments to give in action against a specific module")
|
||||
arg_parser.add_argument("--external", "-e", help="External modules directory")
|
||||
|
||||
arg_parser.add_argument("--startup-disconnects", "-D",
|
||||
help="Tolerate failed connections on startup", action="store_true")
|
||||
|
@ -88,12 +87,8 @@ events = EventManager.EventRoot(log).wrap()
|
|||
exports = Exports.Exports()
|
||||
timers = Timers.Timers(database, events, log)
|
||||
|
||||
module_directories = [os.path.join(directory, "modules")]
|
||||
if args.external:
|
||||
module_directories.append(os.path.abspath(args.external))
|
||||
if "external-modules" in config:
|
||||
module_directories.append(os.path.abspath(config["external-modules"]))
|
||||
|
||||
module_directories = [os.path.join(directory, "modules"),
|
||||
os.path.join(directory, "external_modules")]
|
||||
modules = ModuleManager.ModuleManager(events, exports, timers, config, log,
|
||||
module_directories)
|
||||
|
||||
|
|
Loading…
Reference in a new issue