diff --git a/modules/commands.py b/modules/commands.py index de941f77..3ea4a4e0 100644 --- a/modules/commands.py +++ b/modules/commands.py @@ -157,14 +157,12 @@ class Module(object): event["target"].last_stdout.send() def send_stdout(self, event): - if event["target"].name[0] in event["server"].channel_types: - stdout = ChannelStdOut(event["module_name"], event["target"]) + stdout = StdOut(event["module_name"], event["target"]) stdout.write(event["message"]).send() if stdout.has_text(): event["target"].last_stdout = stdout def send_stderr(self, event): - if event["target"].name[0] in event["server"].channel_types: - stderr = ChannelStdErr(event["module_name"], event["target"]) + stderr = StdErr(event["module_name"], event["target"]) stderr.write(event["message"]).send() if stderr.has_text(): event["target"].last_stderr = stderr diff --git a/modules/set.py b/modules/set.py index 06f36feb..3628ab8d 100644 --- a/modules/set.py +++ b/modules/set.py @@ -26,14 +26,14 @@ class Module(object): def postboot_channelset(self, event): self._postboot_set(self.channel_settings, event) - def _set(self, settings, target, event): + def _set(self, settings, event): if len(event["args_split"]) > 1: setting = event["args_split"][0].lower() if setting in settings: value = " ".join(event["args_split"][1:]) value = settings[setting]["validate"](value) if not value == None: - target.set_setting(setting, value) + event["target"].set_setting(setting, value) event["stdout"].write("Saved setting") else: event["stderr"].write("Invalid value") @@ -48,8 +48,8 @@ class Module(object): self._set(self.settings, event["user"], event) def channel_set(self, event): - if event["channel"].mode_or_above(event["user"].nickname, + if event["target"].mode_or_above(event["user"].nickname, "o"): - self._set(self.channel_settings, event["channel"], event) + self._set(self.channel_settings, event) else: event["stderr"].write("You do not have the modes required")