use draft/delete
tags to mark BufferLines as deleted
This commit is contained in:
parent
44644dcd56
commit
5d9bbed0fa
1 changed files with 13 additions and 0 deletions
13
modules/ircv3_editmsg.py
Normal file
13
modules/ircv3_editmsg.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
from src import ModuleManager, utils
|
||||
|
||||
DELETE_TAG = utils.irc.MessageTag(None, "draft/delete")
|
||||
|
||||
class Module(ModuleManager.BaseModule):
|
||||
@utils.hook("received.tagmsg.private")
|
||||
@utils.hook("received.tagmsg.channel")
|
||||
def tagmsg(self, event):
|
||||
msgid = DELETE_TAG.get_value(event["line"].tags)
|
||||
if msgid:
|
||||
line = event["target"].buffer.find_id(msgid)
|
||||
if line:
|
||||
line.deleted = True
|
Loading…
Reference in a new issue