diff options
| author | 2019-11-30 20:25:52 +0000 | |
|---|---|---|
| committer | 2019-11-30 20:25:52 +0000 | |
| commit | 91c3688018344796bd2d26f2cf56ad374d45a5c6 (patch) | |
| tree | b304bdfbea24b430ab73630d3e58146038400ec9 /src/IRCBuffer.py | |
| parent | rework permissions module to precompile hostmasks (diff) | |
| signature | ||
only add BufferLine to buffer *after* received.message.* callback
Diffstat (limited to 'src/IRCBuffer.py')
| -rw-r--r-- | src/IRCBuffer.py | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/IRCBuffer.py b/src/IRCBuffer.py index 782a6dc1..3e8f5aa9 100644 --- a/src/IRCBuffer.py +++ b/src/IRCBuffer.py @@ -26,19 +26,8 @@ class Buffer(object): self._lines = collections.deque(maxlen=MAX_LINES ) # type: typing.Deque[BufferLine] - def _add_message(self, sender: str, message: str, action: bool, tags: dict, - from_self: bool, method: str) -> BufferLine: - line = BufferLine(sender, message, action, tags, from_self, method) + def add(self, line: BufferLine): self._lines.appendleft(line) - return line - def add_message(self, sender: str, message: str, action: bool, tags: dict, - from_self: bool=False) -> BufferLine: - return self._add_message(sender, message, action, tags, from_self, - "PRIVMSG") - def add_notice(self, sender: str, message: str, tags: dict, - from_self: bool=False): - return self._add_message(sender, message, False, tags, from_self, - "NOTICE") def get(self, index: int=0, **kwargs) -> typing.Optional[BufferLine]: from_self = kwargs.get("from_self", True) |
