From 583926560aec239d9a34a4f992332c78927a08f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Tue, 2 Oct 2018 18:16:09 +0200 Subject: [PATCH] matrix: Add a server buffer callback. --- main.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.py b/main.py index 6bcba0f..2715d58 100644 --- a/main.py +++ b/main.py @@ -420,6 +420,13 @@ def debug_buffer_close_cb(data, buffer): return W.WEECHAT_RC_OK +def server_buffer_cb(server_name, buffer, input_data): + message = ("{}{}: this buffer is not a room buffer!").format( + W.prefix("error"), SCRIPT_NAME) + W.prnt(buffer, message) + return W.WEECHAT_RC_OK + + class WeechatHandler(StreamHandler): def __init__(self, level=logbook.NOTSET, format_string=None, filter=None, bubble=False):