aboutsummaryrefslogtreecommitdiff
path: root/modules/commands
diff options
context:
space:
mode:
authorGravatar jesopo2019-11-25 16:28:03 +0000
committerGravatar jesopo2019-11-25 16:28:03 +0000
commit4586bc790339eb4c28e5c7ec29618fedb7c87f85 (patch)
tree4d0c044c97ee0c23e8c2afc7b315f179c25be926 /modules/commands
parentslightly nicer format for weather output (diff)
signature
remove `tags` from StdOut objects - expose through event_kwargs
Diffstat (limited to 'modules/commands')
-rw-r--r--modules/commands/__init__.py8
-rw-r--r--modules/commands/outs.py1
2 files changed, 4 insertions, 5 deletions
diff --git a/modules/commands/__init__.py b/modules/commands/__init__.py
index af65f0af..ae6779d5 100644
--- a/modules/commands/__init__.py
+++ b/modules/commands/__init__.py
@@ -180,7 +180,7 @@ class Module(ModuleManager.BaseModule):
"target": target, "target_str": target_str,
"is_channel": is_channel, "line": line, "args_split": args_split,
"command": command, "args": " ".join(args_split), "stdout": stdout,
- "stderr": stderr}
+ "stderr": stderr, "tags": {}}
event_kwargs.update(kwargs)
check_assert = lambda check: self._check_assert(event_kwargs, user,
@@ -222,9 +222,9 @@ class Module(ModuleManager.BaseModule):
else:
return
self._out(event["server"], event["target"], event["target_str"], obj,
- type)
+ type, event["tags"])
- def _out(self, server, target, target_str, obj, type):
+ def _out(self, server, target, target_str, obj, type, tags):
if type == OutType.OUT:
color = utils.consts.GREEN
else:
@@ -240,7 +240,7 @@ class Module(ModuleManager.BaseModule):
raise ValueError("Unknown command-method '%s'" % method)
line = IRCLine.ParsedLine(method, [target_str, line_str],
- tags=obj.tags)
+ tags=tags)
valid, trunc = line.truncate(server.hostmask(),
margin=STR_MORE_LEN)
diff --git a/modules/commands/outs.py b/modules/commands/outs.py
index fb3c29ef..e82ceefd 100644
--- a/modules/commands/outs.py
+++ b/modules/commands/outs.py
@@ -5,7 +5,6 @@ class StdOut(object):
def __init__(self, prefix):
self.prefix = prefix
self._lines = []
- self.tags = {}
self._assured = False
def assure(self):