diff options
| author | 2019-02-18 23:11:36 +0000 | |
|---|---|---|
| committer | 2019-02-18 23:11:36 +0000 | |
| commit | b76b153672eeff0178e80ca4ecad1e5e169f1827 (patch) | |
| tree | 2b1bcb5b0bbb3e17040bb34694e98984ad946078 /src/utils | |
| parent | Default `tags` to null for utils.irc.protocol's `message` and `notice` (diff) | |
| signature | ||
Add batch_start and batch_end to utils.irc.protocol
Diffstat (limited to 'src/utils')
| -rw-r--r-- | src/utils/irc/protocol.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/utils/irc/protocol.py b/src/utils/irc/protocol.py index e1446d38..57df7f52 100644 --- a/src/utils/irc/protocol.py +++ b/src/utils/irc/protocol.py @@ -79,3 +79,10 @@ def whox(mask: str, filter: str, fields: str, label: str=None ) -> 'utils.irc.IRCParsedLine': flags = "%s%%%s%s" % (filter, fields, ","+label if label else "") return utils.irc.IRCParsedLine("WHO", [mask, flags]) + +def batch_start(identifier: str, batch_type: str, tags: dict=None): + return utils.irc.IRCParsedLine("BATCH", ["+%s" % identifier, batch_type], + tags=tags) + +def batch_end(identifier: str, tags: dict=None): + return utils.irc.IRCParsedLine("BATCH", ["+%s" % identifier], tags=tags) |
