Commit 3b7bca92a0
Unsigned
Layout: unified · split
src/room/mod.rs +4 −1
| @@ -181,6 +181,7 @@ impl MessageQueue { | |||
| 181 | 181 | ||
| 182 | impl RoomHandle { | 182 | impl RoomHandle { |
| 183 | pub fn new( | 183 | pub fn new( |
| 184 | server_name: &str, | ||
| 184 | connection: &Rc<RefCell<Option<Connection>>>, | 185 | connection: &Rc<RefCell<Option<Connection>>>, |
| 185 | config: Rc<RefCell<Config>>, | 186 | config: Rc<RefCell<Config>>, |
| 186 | room: Room, | 187 | room: Room, |
| @@ -206,7 +207,9 @@ impl RoomHandle { | |||
| 206 | room, | 207 | room, |
| 207 | }; | 208 | }; |
| 208 | 209 | ||
| 209 | let buffer_handle = BufferBuilderAsync::new(&room_id.to_string()) | 210 | let buffer_name = format!("{}.{}", server_name, room_id); |
| 211 | |||
| 212 | let buffer_handle = BufferBuilderAsync::new(&buffer_name) | ||
| 210 | .input_callback(room.clone()) | 213 | .input_callback(room.clone()) |
| 211 | .close_callback(|_weechat: &Weechat, _buffer: &Buffer| { | 214 | .close_callback(|_weechat: &Weechat, _buffer: &Buffer| { |
| 212 | // TODO remove the roombuffer from the server here. | 215 | // TODO remove the roombuffer from the server here. |
src/server.rs +1
| @@ -665,6 +665,7 @@ impl InnerServer { | |||
| 665 | room_id | 665 | room_id |
| 666 | )); | 666 | )); |
| 667 | let buffer = RoomHandle::new( | 667 | let buffer = RoomHandle::new( |
| 668 | &self.server_name, | ||
| 668 | &self.connection, | 669 | &self.connection, |
| 669 | self.config.inner.clone(), | 670 | self.config.inner.clone(), |
| 670 | room, | 671 | room, |