about summary refs log tree commit diff stats
path: root/src/command/command.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-07-24 21:20:55 +0100
committerJames Booth <boothj5@gmail.com>2015-07-24 21:20:55 +0100
commitb736883ac4a1ff5ad9ad92b2676360de545747f8 (patch)
treea053fdad437b2c815b899cbc8ef8dc9d578fbfae /src/command/command.c
parenta8eb2815539b59bb9afa682edd7fb63b0aa4a9da (diff)
downloadprofani-tty-b736883ac4a1ff5ad9ad92b2676360de545747f8.tar.gz
Added roster to new help format
Diffstat (limited to 'src/command/command.c')
-rw-r--r--src/command/command.c96
1 files changed, 54 insertions, 42 deletions
diff --git a/src/command/command.c b/src/command/command.c
index 7671fa0c..ef785089 100644
--- a/src/command/command.c
+++ b/src/command/command.c
@@ -198,10 +198,10 @@ static struct cmd_t command_defs[] =
             "If the message is omitted, a new chat window will be opened without sending a message. "
             "Use quotes if the nickname includes spaces.",
         {
-            { "<contact>", "Open chat window with contact, by JID or nickname." },
+            { "<contact>",             "Open chat window with contact, by JID or nickname." },
             { "<contact> [<message>]", "Send message to contact, by JID or nickname." },
-            { "<nick>", "Open private chat window with chat room occupant." },
-            { "<nick> [<message>]", "Send a private message to a chat room occupant." },
+            { "<nick>",                "Open private chat window with chat room occupant." },
+            { "<nick> [<message>]",    "Send a private message to a chat room occupant." },
             END_ARGS },
         {
             "/msg myfriend@server.com Hey, here's a message!",
@@ -211,48 +211,60 @@ static struct cmd_t command_defs[] =
             NULL } }
         },
 
-    // OLD STYLE
-
-
-
     { "/roster",
         cmd_roster, parse_args_with_freetext, 0, 3, NULL,
-        { "/roster [command] [args..]", "Manage your roster.",
-        { "/roster [command] [args..]",
-          "--------------------------",
-          "Manage your roster, and roster display settings.",
-          "",
-          "command - online|show|hide|by|size|add|remove|remove_all|nick|clearnick",
-          "",
-          "online              : Show all online contacts in your roster.",
-          "show                : Show the roster panel.",
-          "show offline        : Show offline contacts in the roster panel.",
-          "show resource       : Show contact's connected resources in the roster panel.",
-          "show empty          : When grouping by presence, show empty presence groups",
-          "hide                : Hide the roster panel.",
-          "hide offline        : Hide offline contacts in the roster panel.",
-          "hide resource       : Hide contact's connected resources in the roster panel.",
-          "hide empty          : When grouping by presence, hide empty presence groups",
-          "by group            : Group contacts in the roster panel by roster group.",
-          "by presence         : Group contacts in the roster panel by presence.",
-          "by none             : No grouping in the roster panel.",
-          "size                : Percentage of the screen taken up by the roster (1-99).",
-          "add jid [nick]      : Add a new item to the roster.",
-          "remove jid          : Removes an item from the roster.",
-          "remove_all contacts : Remove all items from roster.",
-          "nick jid nick       : Change a contacts nickname.",
-          "clearnick jid       : Removes the current nickname.",
-          "",
+        { NULL, NULL, { NULL },
+        {
+            "/roster",
+            "/roster online",
+            "/roster show [offline|resource|empty]",
+            "/roster hide [offline|resource|empty]",
+            "/roster by group|presence|none",
+            "/roster size <percent>",
+            "/roster add <jid> [<nick>]",
+            "/roster remove <jid>",
+            "/roster remove_all contacts",
+            "/roster nick <jid> <nick>",
+            "/roster clearnick <jid>",
+            NULL
+        },
+          "Manage your roster, and roster display settings. "
           "Passing no arguments lists all contacts in your roster.",
-          "",
-          "Example: /roster (show your roster)",
-          "Example: /roster add someone@contacts.org (add the contact)",
-          "Example: /roster add someone@contacts.org Buddy (add the contact with nickname 'Buddy')",
-          "Example: /roster remove someone@contacts.org (remove the contact)",
-          "Example: /roster nick myfriend@chat.org My Friend",
-          "Example: /roster clearnick kai@server.com (clears nickname)",
-          NULL,
-          NULL, NULL, NULL, NULL } } },
+        {
+            { "online",              "Show all online contacts in your roster." },
+            { "show",                "Show the roster panel." },
+            { "show offline",        "Show offline contacts in the roster panel." },
+            { "show resource",       "Show contact's connected resources in the roster panel." },
+            { "show empty",          "When grouping by presence, show empty presence groups." },
+            { "show empty",          "When grouping by presence, show empty presence groups." },
+            { "hide",                "Hide the roster panel." },
+            { "hide offline",        "Hide offline contacts in the roster panel." },
+            { "hide resource",       "Hide contact's connected resources in the roster panel." },
+            { "hide empty",          "When grouping by presence, hide empty presence groups." },
+            { "by group",            "Group contacts in the roster panel by roster group." },
+            { "by presence",         "Group contacts in the roster panel by presence." },
+            { "by none",             "No grouping in the roster panel." },
+            { "size <precent>",      "Percentage of the screen taken up by the roster (1-99)." },
+            { "add <jid> [<nick>]",  "Add a new item to the roster." },
+            { "remove <jid>",        "Removes an item from the roster." },
+            { "remove_all contacts", "Remove all items from roster." },
+            { "nick <jid> <nick>",   "Change a contacts nickname." },
+            { "clearnick <jid>",     "Removes the current nickname." },
+            END_ARGS },
+        {
+            "/roster",
+            "/roster add someone@contacts.org",
+            "/roster add someone@contacts.org Buddy",
+            "/roster remove someone@contacts.org",
+            "/roster nick myfriend@chat.org My Friend",
+            "/roster clearnick kai@server.com",
+            "/roster size 15",
+            NULL } }
+        },
+
+
+    // OLD STYLE
+
 
     { "/group",
         cmd_group, parse_args_with_freetext, 0, 3, NULL,
1' href='#n391'>391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732