mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Change 'passwd' option to 'password' for /join command
This commit is contained in:
parent
f4d52f3d40
commit
22ab268618
@ -237,18 +237,18 @@ static struct cmd_t command_defs[] =
|
|||||||
|
|
||||||
{ "/join",
|
{ "/join",
|
||||||
cmd_join, parse_args, 1, 5, NULL,
|
cmd_join, parse_args, 1, 5, NULL,
|
||||||
{ "/join room[@server] [nick value] [passwd value]", "Join a chat room.",
|
{ "/join room[@server] [nick value] [password value]", "Join a chat room.",
|
||||||
{ "/join room[@server] [nick value] [passwd value]",
|
{ "/join room[@server] [nick value] [password value]",
|
||||||
"--------------------------",
|
"-------------------------------------------------",
|
||||||
"Join a chat room at the conference server.",
|
"Join a chat room at the conference server.",
|
||||||
"If nick is specified you will join with this nickname.",
|
"If nick is specified you will join with this nickname.",
|
||||||
"Otherwise the account preference 'muc.nick' will be used which is the localpart of your JID (before the @).",
|
"Otherwise the account preference 'muc.nick' will be used which by default is the localpart of your JID (before the @).",
|
||||||
"If no server is supplied, the account preference 'muc.service' is used, which is 'conference.<domain-part>' by default.",
|
"If no server is supplied, the account preference 'muc.service' is used, which is 'conference.<domain-part>' by default.",
|
||||||
"If the room doesn't exist, and the server allows it, a new one will be created.",
|
"If the room doesn't exist, and the server allows it, a new one will be created.",
|
||||||
"",
|
"",
|
||||||
"Example : /join jdev@conference.jabber.org",
|
"Example : /join jdev@conference.jabber.org",
|
||||||
"Example : /join jdev@conference.jabber.org nick mynick",
|
"Example : /join jdev@conference.jabber.org nick mynick",
|
||||||
"Example : /join private@conference.jabber.org nick mynick passwd mypassword",
|
"Example : /join private@conference.jabber.org nick mynick password mypassword",
|
||||||
"Example : /join jdev (as user@jabber.org will join jdev@conference.jabber.org)",
|
"Example : /join jdev (as user@jabber.org will join jdev@conference.jabber.org)",
|
||||||
NULL } } },
|
NULL } } },
|
||||||
|
|
||||||
@ -1064,7 +1064,7 @@ cmd_init(void)
|
|||||||
|
|
||||||
join_property_ac = autocomplete_new();
|
join_property_ac = autocomplete_new();
|
||||||
autocomplete_add(join_property_ac, "nick");
|
autocomplete_add(join_property_ac, "nick");
|
||||||
autocomplete_add(join_property_ac, "passwd");
|
autocomplete_add(join_property_ac, "password");
|
||||||
|
|
||||||
statuses_ac = autocomplete_new();
|
statuses_ac = autocomplete_new();
|
||||||
autocomplete_add(statuses_ac, "console");
|
autocomplete_add(statuses_ac, "console");
|
||||||
|
@ -1642,7 +1642,7 @@ cmd_join(gchar **args, struct cmd_help_t help)
|
|||||||
}
|
}
|
||||||
if (strcmp(opt1, "nick") == 0) {
|
if (strcmp(opt1, "nick") == 0) {
|
||||||
nick = opt1val;
|
nick = opt1val;
|
||||||
} else if (strcmp(opt1, "passwd") == 0) {
|
} else if (strcmp(opt1, "password") == 0) {
|
||||||
passwd = opt1val;
|
passwd = opt1val;
|
||||||
} else {
|
} else {
|
||||||
cons_show("Usage: %s", help.usage);
|
cons_show("Usage: %s", help.usage);
|
||||||
@ -1652,7 +1652,7 @@ cmd_join(gchar **args, struct cmd_help_t help)
|
|||||||
if (opt2 != NULL) {
|
if (opt2 != NULL) {
|
||||||
if (strcmp(opt2, "nick") == 0) {
|
if (strcmp(opt2, "nick") == 0) {
|
||||||
nick = opt2val;
|
nick = opt2val;
|
||||||
} else if (strcmp(opt2, "passwd") == 0) {
|
} else if (strcmp(opt2, "password") == 0) {
|
||||||
passwd = opt2val;
|
passwd = opt2val;
|
||||||
} else {
|
} else {
|
||||||
cons_show("Usage: %s", help.usage);
|
cons_show("Usage: %s", help.usage);
|
||||||
|
@ -180,7 +180,7 @@ void cmd_join_uses_password_when_supplied(void **state)
|
|||||||
char *account_service = "a_service";
|
char *account_service = "a_service";
|
||||||
char *expected_room = "room@a_service";
|
char *expected_room = "room@a_service";
|
||||||
CommandHelp *help = malloc(sizeof(CommandHelp));
|
CommandHelp *help = malloc(sizeof(CommandHelp));
|
||||||
gchar *args[] = { room, "passwd", password, NULL };
|
gchar *args[] = { room, "password", password, NULL };
|
||||||
ProfAccount *account = account_new(account_name, "user@server.org", NULL,
|
ProfAccount *account = account_new(account_name, "user@server.org", NULL,
|
||||||
TRUE, NULL, 0, "laptop", NULL, NULL, 0, 0, 0, 0, 0, account_service, account_nick);
|
TRUE, NULL, 0, "laptop", NULL, NULL, 0, 0, 0, 0, 0, account_service, account_nick);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user