1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Merge branch 'master' into readline

This commit is contained in:
James Booth 2015-02-01 20:47:28 +00:00
commit 372cf822cb
5 changed files with 10 additions and 6 deletions

View File

@ -615,7 +615,7 @@ static struct cmd_t command_defs[] =
{ "/wrap on|off", "Word wrapping.", { "/wrap on|off", "Word wrapping.",
{ "/wrap on|off", { "/wrap on|off",
"------------", "------------",
"Enable or disable word wrapping.", "Enable or disable word wrapping in the main window.",
NULL } } }, NULL } } },
{ "/time", { "/time",
@ -1141,7 +1141,7 @@ cmd_init(void)
autocomplete_add(help_ac, "basic"); autocomplete_add(help_ac, "basic");
autocomplete_add(help_ac, "chatting"); autocomplete_add(help_ac, "chatting");
autocomplete_add(help_ac, "groupchat"); autocomplete_add(help_ac, "groupchat");
autocomplete_add(help_ac, "presence"); autocomplete_add(help_ac, "presences");
autocomplete_add(help_ac, "contacts"); autocomplete_add(help_ac, "contacts");
autocomplete_add(help_ac, "service"); autocomplete_add(help_ac, "service");
autocomplete_add(help_ac, "settings"); autocomplete_add(help_ac, "settings");

View File

@ -154,6 +154,10 @@ cmd_connect(gchar **args, struct cmd_help_t help)
cons_show("Error evaluating password, see logs for details."); cons_show("Error evaluating password, see logs for details.");
return TRUE; return TRUE;
} }
// strip trailing newline
if (g_str_has_suffix(account->password, "\n")) {
account->password[strlen(account->password)-1] = '\0';
}
} else { } else {
log_error("popen failed when running eval_password."); log_error("popen failed when running eval_password.");
cons_show("Error evaluating password, see logs for details."); cons_show("Error evaluating password, see logs for details.");
@ -710,7 +714,7 @@ cmd_help(gchar **args, struct cmd_help_t help)
"/rooms", "/tiny", "/who", "/nick", "/privileges", "/info", "/occupants" }; "/rooms", "/tiny", "/who", "/nick", "/privileges", "/info", "/occupants" };
_cmd_show_filtered_help("Groupchat commands", filter, ARRAY_SIZE(filter)); _cmd_show_filtered_help("Groupchat commands", filter, ARRAY_SIZE(filter));
} else if (strcmp(args[0], "presence") == 0) { } else if (strcmp(args[0], "presences") == 0) {
gchar *filter[] = { "/autoaway", "/away", "/chat", "/dnd", gchar *filter[] = { "/autoaway", "/away", "/chat", "/dnd",
"/online", "/priority", "/account", "/status", "/statuses", "/who", "/online", "/priority", "/account", "/status", "/statuses", "/who",
"/xa" }; "/xa" };

View File

@ -1402,7 +1402,7 @@ cons_help(void)
cons_show("/help basic - List basic commands for getting started."); cons_show("/help basic - List basic commands for getting started.");
cons_show("/help chatting - List chat commands."); cons_show("/help chatting - List chat commands.");
cons_show("/help groupchat - List groupchat commands."); cons_show("/help groupchat - List groupchat commands.");
cons_show("/help presence - List commands to change presence."); cons_show("/help presences - List commands to change presence.");
cons_show("/help contacts - List commands for manipulating your roster."); cons_show("/help contacts - List commands for manipulating your roster.");
cons_show("/help service - List service discovery commands."); cons_show("/help service - List service discovery commands.");
cons_show("/help settings - List commands for changing settings."); cons_show("/help settings - List commands for changing settings.");

View File

@ -1402,8 +1402,8 @@ ui_outgoing_chat_msg(const char * const from, const char * const barejid,
// create new window // create new window
if (window == NULL) { if (window == NULL) {
window = wins_new_chat(barejid); window = wins_new_chat(barejid);
ProfChatWin *chatwin = (ProfChatWin*)window;
#ifdef HAVE_LIBOTR #ifdef HAVE_LIBOTR
ProfChatWin *chatwin = (ProfChatWin*)window;
if (otr_is_secure(barejid)) { if (otr_is_secure(barejid)) {
chatwin->is_otr = TRUE; chatwin->is_otr = TRUE;
} }