Implement NEAR_SERVER for new_channel_position
This commit is contained in:
parent
56aa9992a9
commit
a6b955f4c7
1 changed files with 7 additions and 1 deletions
|
@ -374,7 +374,13 @@ class WeechatChannelBuffer(object):
|
|||
elif new_channel_position == NewChannelPosition.NEXT:
|
||||
W.buffer_set(self._ptr, "number", str(cur_num + 1))
|
||||
elif new_channel_position == NewChannelPosition.NEAR_SERVER:
|
||||
pass
|
||||
server = G.SERVERS[server_name]
|
||||
last_similar_buffer_num = max(
|
||||
(room.weechat_buffer.number for room
|
||||
in server.room_buffers.values()),
|
||||
default=W.buffer_get_integer(server.server_buffer, "number")
|
||||
)
|
||||
W.buffer_set(self._ptr, "number", str(last_similar_buffer_num + 1))
|
||||
|
||||
self.name = ""
|
||||
self.users = {} # type: Dict[str, WeechatUser]
|
||||
|
|
Loading…
Reference in a new issue