Commit 112f712497

112f71249786983ba53875c50f239be6b4e41ae7

parent: 28e7572ed5

Unsigned

Damir Jelić <poljar@termina.org.uk> · 2021-01-02 18:27 UTC

room: Add the domain and room id to the localvars.

Layout: unified · split

src/room/mod.rs +3
@@ -273,8 +273,11 @@ impl RoomHandle {
273 273
274 buffer.enable_nicklist(); 274 buffer.enable_nicklist();
275 buffer.disable_nicklist_groups(); 275 buffer.disable_nicklist_groups();
276
276 buffer.set_localvar("server", server_name); 277 buffer.set_localvar("server", server_name);
277 buffer.set_localvar("nick", &own_nick); 278 buffer.set_localvar("nick", &own_nick);
279 buffer.set_localvar("domain", room.room_id().server_name().as_str());
280 buffer.set_localvar("room_id", room.room_id().as_str());
278 281
279 // This is fine since we're only given the room to the buffer input and 282 // This is fine since we're only given the room to the buffer input and
280 // the callback can only run once we yield controll back to Weechat. 283 // the callback can only run once we yield controll back to Weechat.