mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
Show occupants role and affiliation when they join a room
This commit is contained in:
parent
014f0f7a91
commit
9134a65e97
3
TODO_045
3
TODO_045
@ -1,4 +1,5 @@
|
||||
Show occupants role and affiliation when they join room
|
||||
Show own role affilaition changes (including actor/reason)
|
||||
Show occupants role and affiliation changes (including actor/reason)
|
||||
Check all commands from private conversations
|
||||
Test all freetext args
|
||||
Make form editing commands less verbose
|
||||
|
@ -752,7 +752,7 @@ handle_muc_occupant_online(const char * const room, const char * const nick, con
|
||||
if (!existing) {
|
||||
char *muc_status_pref = prefs_get_string(PREF_STATUSES_MUC);
|
||||
if (g_strcmp0(muc_status_pref, "none") != 0) {
|
||||
ui_room_member_online(room, nick, show, status);
|
||||
ui_room_member_online(room, nick, role, affiliation, show, status);
|
||||
}
|
||||
prefs_free_string(muc_status_pref);
|
||||
ui_muc_roster(room);
|
||||
|
@ -1508,14 +1508,21 @@ _ui_room_member_banned(const char * const room, const char * const nick, const c
|
||||
}
|
||||
|
||||
static void
|
||||
_ui_room_member_online(const char * const room, const char * const nick,
|
||||
const char * const show, const char * const status)
|
||||
_ui_room_member_online(const char * const room, const char * const nick, const char * const role,
|
||||
const char * const affiliation, const char * const show, const char * const status)
|
||||
{
|
||||
ProfWin *window = wins_get_by_recipient(room);
|
||||
if (window == NULL) {
|
||||
log_error("Received online presence for room participant %s, but no window open for %s.", nick, room);
|
||||
} else {
|
||||
win_save_vprint(window, '!', NULL, 0, COLOUR_ONLINE, "", "-> %s has joined the room.", nick);
|
||||
win_save_vprint(window, '!', NULL, NO_EOL, COLOUR_ONLINE, "", "-> %s has joined the room", nick);
|
||||
if (role) {
|
||||
win_save_vprint(window, '!', NULL, NO_DATE | NO_EOL, COLOUR_ONLINE, "", ", role: %s", role);
|
||||
}
|
||||
if (affiliation) {
|
||||
win_save_vprint(window, '!', NULL, NO_DATE | NO_EOL, COLOUR_ONLINE, "", ", affiliation: %s", affiliation);
|
||||
}
|
||||
win_save_print(window, '!', NULL, NO_DATE, COLOUR_ROOMINFO, "", "");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -158,8 +158,8 @@ void (*ui_leave_room)(const char * const room);
|
||||
void (*ui_room_broadcast)(const char * const room_jid,
|
||||
const char * const message);
|
||||
void (*ui_room_member_offline)(const char * const room, const char * const nick);
|
||||
void (*ui_room_member_online)(const char * const room,
|
||||
const char * const nick, const char * const show, const char * const status);
|
||||
void (*ui_room_member_online)(const char * const room, const char * const nick, const char * const roles,
|
||||
const char * const affiliation, const char * const show, const char * const status);
|
||||
void (*ui_room_member_nick_change)(const char * const room,
|
||||
const char * const old_nick, const char * const nick);
|
||||
void (*ui_room_nick_change)(const char * const room, const char * const nick);
|
||||
|
Loading…
Reference in New Issue
Block a user