aboutsummaryrefslogtreecommitdiff
path: root/modules/line_handler
diff options
context:
space:
mode:
authorGravatar jesopo2019-03-10 13:14:15 +0000
committerGravatar jesopo2019-03-10 13:14:25 +0000
commit5d7f017c9cacc122ef569a4c58ca2f2496c35e90 (patch)
tree297659e0c5c471d17f080c425b0417b90cf4f055 /modules/line_handler
parentpreprocess.send.* event don't have IRCChannel objects on them (diff)
signature
Enum values shouldn't be all upper case
Diffstat (limited to 'modules/line_handler')
-rw-r--r--modules/line_handler/__init__.py4
-rw-r--r--modules/line_handler/message.py2
-rw-r--r--modules/line_handler/user.py4
3 files changed, 5 insertions, 5 deletions
diff --git a/modules/line_handler/__init__.py b/modules/line_handler/__init__.py
index 7ce361ee..a3009bf9 100644
--- a/modules/line_handler/__init__.py
+++ b/modules/line_handler/__init__.py
@@ -16,7 +16,7 @@ class Module(ModuleManager.BaseModule):
default_event = any(default_events)
kwargs = {"args": line.args, "tags": line.tags, "server": server,
- "prefix": line.prefix, "direction": utils.Direction.RECV}
+ "prefix": line.prefix, "direction": utils.Direction.Recv}
self.events.on("raw.received").on(line.command).call_unsafe(**kwargs)
if default_event or not hooks:
@@ -35,7 +35,7 @@ class Module(ModuleManager.BaseModule):
def handle_send(self, event):
self.events.on("raw.send").on(event["line"].command).call_unsafe(
args=event["line"].args, tags=event["line"].tags,
- server=event["server"], direction=utils.Direction.SEND)
+ server=event["server"], direction=utils.Direction.Send)
# ping from the server
@utils.hook("raw.received.ping")
diff --git a/modules/line_handler/message.py b/modules/line_handler/message.py
index 7bc2e27e..38fb45fc 100644
--- a/modules/line_handler/message.py
+++ b/modules/line_handler/message.py
@@ -1,7 +1,7 @@
from src import utils
def _from_self(server, direction, prefix):
- if direction == utils.Direction.SEND:
+ if direction == utils.Direction.Send:
if server.has_capability("echo-message"):
return None
else:
diff --git a/modules/line_handler/user.py b/modules/line_handler/user.py
index fbe136a7..4153fc1b 100644
--- a/modules/line_handler/user.py
+++ b/modules/line_handler/user.py
@@ -18,11 +18,11 @@ def handle_311(event):
def quit(events, event):
nickname = None
- if event["direction"] == utils.Direction.RECV:
+ if event["direction"] == utils.Direction.Recv:
nickname = event["prefix"].nickname
reason = event["args"].get(0)
- if event["direction"] == utils.Direction.RECV:
+ if event["direction"] == utils.Direction.Recv:
nickname = event["prefix"].nickname
if (not event["server"].is_own_nickname(nickname) and
not event["prefix"].hostmask == "*"):