mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
3cef4e1db4
@ -2689,28 +2689,21 @@ cmd_bookmark(gchar **args, struct cmd_help_t help)
|
|||||||
|
|
||||||
win_type_t win_type = ui_current_win_type();
|
win_type_t win_type = ui_current_win_type();
|
||||||
|
|
||||||
if (win_type == WIN_MUC) {
|
gchar *cmd = args[0];
|
||||||
gchar *cmd = args[0];
|
if (win_type == WIN_MUC && cmd == NULL) {
|
||||||
|
|
||||||
// default to current nickname, password, and autojoin "on"
|
// default to current nickname, password, and autojoin "on"
|
||||||
if (cmd == NULL) {
|
char *jid = ui_current_recipient();
|
||||||
char *jid = ui_current_recipient();
|
char *nick = muc_nick(jid);
|
||||||
char *nick = muc_nick(jid);
|
char *password = muc_password(jid);
|
||||||
char *password = muc_password(jid);
|
gboolean added = bookmark_add(jid, nick, password, "on");
|
||||||
gboolean added = bookmark_add(jid, nick, password, "on");
|
if (added) {
|
||||||
if (added) {
|
ui_current_print_formatted_line('!', 0, "Bookmark added for %s.", jid);
|
||||||
ui_current_print_formatted_line('!', 0, "Bookmark added for %s.", jid);
|
|
||||||
} else {
|
|
||||||
ui_current_print_formatted_line('!', 0, "Bookmark already exists for %s.", jid);
|
|
||||||
}
|
|
||||||
return TRUE;
|
|
||||||
} else {
|
} else {
|
||||||
ui_current_print_formatted_line('!', 0, "No arguments required for /bookmark in a chat room");
|
ui_current_print_formatted_line('!', 0, "Bookmark already exists for %s.", jid);
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
gchar *cmd = args[0];
|
|
||||||
if (cmd == NULL) {
|
if (cmd == NULL) {
|
||||||
cons_show("Usage: %s", help.usage);
|
cons_show("Usage: %s", help.usage);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user