diff --git a/matrix/buffer.py b/matrix/buffer.py index a8c8957..94900c8 100644 --- a/matrix/buffer.py +++ b/matrix/buffer.py @@ -904,7 +904,7 @@ class RoomBuffer(object): self.last_message = None - buffer_name = "{}.{}.{}".format(G.SCRIPT_NAME, server_name, room.room_id) + buffer_name = "{}{}.{}".format(G.BUFFER_NAME_PREFIX, server_name, room.room_id) # This dict remembers the connection from a user_id to the name we # displayed in the buffer diff --git a/matrix/globals.py b/matrix/globals.py index e4e00dd..c3e099e 100644 --- a/matrix/globals.py +++ b/matrix/globals.py @@ -42,6 +42,7 @@ SERVERS = dict() # type: Dict[str, MatrixServer] CONFIG = None # type: Any ENCRYPTION = True # type: bool SCRIPT_NAME = "matrix" # type: str +BUFFER_NAME_PREFIX = "{}.".format(SCRIPT_NAME) # type: str TYPING_NOTICE_TIMEOUT = 4000 # 4 seconds typing notice lifetime LOGGER = Logger("weechat-matrix") UPLOADS = OrderedDict() # type: Dict[str, Upload]