about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-03-16 18:12:16 +0000
committerJames Booth <boothj5@gmail.com>2014-03-16 18:12:16 +0000
commit22ab2686181bde9b35fd04c5364d511d08cd57a1 (patch)
tree58f4b7cfbec03661fb03038fff845c219efb0409
parentf4d52f3d40287a9426ec7e0390a8fcfce78a4ee9 (diff)
downloadprofani-tty-22ab2686181bde9b35fd04c5364d511d08cd57a1.tar.gz
Change 'passwd' option to 'password' for /join command
-rw-r--r--src/command/command.c12
-rw-r--r--src/command/commands.c4
-rw-r--r--tests/test_cmd_join.c2
3 files changed, 9 insertions, 9 deletions
diff --git a/src/command/command.c b/src/command/command.c
index eb00931f..b09c91fb 100644
--- a/src/command/command.c
+++ b/src/command/command.c
@@ -237,18 +237,18 @@ static struct cmd_t command_defs[] =
 
     { "/join",
         cmd_join, parse_args, 1, 5, NULL,
-        { "/join room[@server] [nick value] [passwd value]", "Join a chat room.",
-        { "/join room[@server] [nick value] [passwd value]",
-          "--------------------------",
+        { "/join room[@server] [nick value] [password value]", "Join a chat room.",
+        { "/join room[@server] [nick value] [password value]",
+          "-------------------------------------------------",
           "Join a chat room at the conference server.",
           "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 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 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)",
           NULL } } },
 
@@ -1064,7 +1064,7 @@ cmd_init(void)
 
     join_property_ac = autocomplete_new();
     autocomplete_add(join_property_ac, "nick");
-    autocomplete_add(join_property_ac, "passwd");
+    autocomplete_add(join_property_ac, "password");
 
     statuses_ac = autocomplete_new();
     autocomplete_add(statuses_ac, "console");
diff --git a/src/command/commands.c b/src/command/commands.c
index 4a7418f4..b9e78b3f 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -1642,7 +1642,7 @@ cmd_join(gchar **args, struct cmd_help_t help)
             }
             if (strcmp(opt1, "nick") == 0) {
                 nick = opt1val;
-            } else if (strcmp(opt1, "passwd") == 0) {
+            } else if (strcmp(opt1, "password") == 0) {
                 passwd = opt1val;
             } else {
                 cons_show("Usage: %s", help.usage);
@@ -1652,7 +1652,7 @@ cmd_join(gchar **args, struct cmd_help_t help)
             if (opt2 != NULL) {
                 if (strcmp(opt2, "nick") == 0) {
                     nick = opt2val;
-                } else if (strcmp(opt2, "passwd") == 0) {
+                } else if (strcmp(opt2, "password") == 0) {
                     passwd = opt2val;
                 } else {
                     cons_show("Usage: %s", help.usage);
diff --git a/tests/test_cmd_join.c b/tests/test_cmd_join.c
index 19e4de9a..d07cd5f0 100644
--- a/tests/test_cmd_join.c
+++ b/tests/test_cmd_join.c
@@ -180,7 +180,7 @@ void cmd_join_uses_password_when_supplied(void **state)
     char *account_service = "a_service";
     char *expected_room = "room@a_service";
     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,
         TRUE, NULL, 0, "laptop", NULL, NULL, 0, 0, 0, 0, 0, account_service, account_nick);