use utils.irc.MessageTag in ircv3_multiline.py
This commit is contained in:
parent
4bb3eeb9f1
commit
e55cd1e98e
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@ from src import ModuleManager, utils
|
||||||
|
|
||||||
CAP = utils.irc.Capability(None, "bitbot.dev/multiline")
|
CAP = utils.irc.Capability(None, "bitbot.dev/multiline")
|
||||||
BATCH = utils.irc.BatchType(None, "bitbot.dev/multiline")
|
BATCH = utils.irc.BatchType(None, "bitbot.dev/multiline")
|
||||||
|
TAG = utils.irc.MessageTag(None, "+bitbot.dev/multiline-concat")
|
||||||
|
|
||||||
class Module(ModuleManager.BaseModule):
|
class Module(ModuleManager.BaseModule):
|
||||||
@utils.hook("received.cap.ls")
|
@utils.hook("received.cap.ls")
|
||||||
|
@ -32,7 +33,7 @@ class Module(ModuleManager.BaseModule):
|
||||||
lines = event["batch"].get_lines()
|
lines = event["batch"].get_lines()
|
||||||
for line in lines:
|
for line in lines:
|
||||||
message = line.args[1]
|
message = line.args[1]
|
||||||
if line.has_tag("+bitbot.dev/multiline-concat"):
|
if TAG.present(line.tags):
|
||||||
last_message = ""
|
last_message = ""
|
||||||
if messages:
|
if messages:
|
||||||
last_message = messages.pop(-1)
|
last_message = messages.pop(-1)
|
||||||
|
|
Loading…
Reference in a new issue