diff options
| author | 2019-10-27 10:19:00 +0000 | |
|---|---|---|
| committer | 2019-10-27 10:19:00 +0000 | |
| commit | 8f4b5a0e70804f8f19f8b9032b7d93857cda40e8 (patch) | |
| tree | c522c8a04f4173cfc104796dd5cf942f2c44a0fb /modules/line_handler | |
| parent | fallback ActivityPub data encoding to utf8 (diff) | |
| signature | ||
move IRCLine related code from utils.irc to IRCLine.py
Diffstat (limited to 'modules/line_handler')
| -rw-r--r-- | modules/line_handler/__init__.py | 4 | ||||
| -rw-r--r-- | modules/line_handler/channel.py | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/modules/line_handler/__init__.py b/modules/line_handler/__init__.py index 714bc23b..b4146813 100644 --- a/modules/line_handler/__init__.py +++ b/modules/line_handler/__init__.py @@ -1,5 +1,5 @@ import enum -from src import EventManager, ModuleManager, utils +from src import EventManager, IRCLine, ModuleManager, utils from . import channel, core, ircv3, message, user class Module(ModuleManager.BaseModule): @@ -178,7 +178,7 @@ class Module(ModuleManager.BaseModule): batch_type = event["line"].args[1] args = event["line"].args[2:] - batch = utils.irc.IRCBatch(identifier, batch_type, args, + batch = IRCLine.IRCBatch(identifier, batch_type, args, event["line"].tags, source=event["line"].source) event["server"].batches[identifier] = batch diff --git a/modules/line_handler/channel.py b/modules/line_handler/channel.py index bcfcebcd..385bf6b2 100644 --- a/modules/line_handler/channel.py +++ b/modules/line_handler/channel.py @@ -1,4 +1,4 @@ -from src import utils +from src import IRCLine, utils def handle_332(events, event): channel = event["server"].channels.get(event["line"].args[1]) @@ -18,7 +18,7 @@ def topic(events, event): def handle_333(events, event): channel = event["server"].channels.get(event["line"].args[1]) - topic_setter = utils.irc.parse_hostmask(event["line"].args[2]) + topic_setter = IRCLine.parse_hostmask(event["line"].args[2]) topic_time = int(event["line"].args[3]) channel.set_topic_setter(topic_setter) @@ -42,7 +42,7 @@ def handle_353(event): nickname = nickname[1:] if event["server"].has_capability_str("userhost-in-names"): - hostmask = utils.irc.parse_hostmask(nickname) + hostmask = IRCLine.parse_hostmask(nickname) nickname = hostmask.nickname user = event["server"].get_user(hostmask.nickname, username=hostmask.username, hostname=hostmask.hostname) |
