mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
Set usernames to lowercase before logging in
This commit is contained in:
parent
eb4f224173
commit
61600cb7b6
@ -159,8 +159,10 @@ static gboolean _cmd_connect(const char * const inp)
|
|||||||
cons_show("Usage: /connect user@host");
|
cons_show("Usage: /connect user@host");
|
||||||
result = TRUE;
|
result = TRUE;
|
||||||
} else {
|
} else {
|
||||||
char *user;
|
char *user, *lower;
|
||||||
user = strndup(inp+9, strlen(inp)-9);
|
user = strndup(inp+9, strlen(inp)-9);
|
||||||
|
lower = g_utf8_strdown(user, -1);
|
||||||
|
|
||||||
status_bar_get_password();
|
status_bar_get_password();
|
||||||
status_bar_refresh();
|
status_bar_refresh();
|
||||||
char passwd[21];
|
char passwd[21];
|
||||||
@ -168,7 +170,7 @@ static gboolean _cmd_connect(const char * const inp)
|
|||||||
inp_get_password(passwd);
|
inp_get_password(passwd);
|
||||||
inp_non_block();
|
inp_non_block();
|
||||||
|
|
||||||
conn_status = jabber_connect(user, passwd);
|
conn_status = jabber_connect(lower, passwd);
|
||||||
if (conn_status == JABBER_CONNECTING)
|
if (conn_status == JABBER_CONNECTING)
|
||||||
cons_show("Connecting...");
|
cons_show("Connecting...");
|
||||||
if (conn_status == JABBER_DISCONNECTED)
|
if (conn_status == JABBER_DISCONNECTED)
|
||||||
|
Loading…
Reference in New Issue
Block a user