Skip to content

Commit

Permalink
Make some improvements and clarifications to help menu
Browse files Browse the repository at this point in the history
  • Loading branch information
JFreegman committed Dec 1, 2023
1 parent 635410b commit 18b5abf
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 20 deletions.
4 changes: 2 additions & 2 deletions src/groupchat_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ void cmd_set_topic(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*arg
void cmd_unignore(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)[MAX_STR_SIZE])
{
if (argc < 1) {
line_info_add(self, false, NULL, NULL, SYS_MSG, 0, 0, "Peer must be specified.");
line_info_add(self, false, NULL, NULL, SYS_MSG, 0, 0, "Peer name or public key must be specified.");
return;
}

Expand Down Expand Up @@ -851,7 +851,7 @@ void cmd_unignore(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv
void cmd_whois(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)[MAX_STR_SIZE])
{
if (argc < 1) {
line_info_add(self, false, NULL, NULL, SYS_MSG, 0, 0, "Peer must be specified.");
line_info_add(self, false, NULL, NULL, SYS_MSG, 0, 0, "Peer name or public key must be specified.");
return;
}

Expand Down
4 changes: 3 additions & 1 deletion src/groupchats.c
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,9 @@ int group_get_peer_id_of_identifier(ToxWindow *self, const char *identifier, uin

case -2: {
line_info_add(self, false, NULL, NULL, SYS_MSG, 0, 0,
"More than one peer is using this name. Specify the target's public key.");
"More than one peer is using this name; specify the target's public key.");
line_info_add(self, false, NULL, NULL, SYS_MSG, 0, 0,
"Use the /whois or /list command to determine the key.");
*peer_id = (uint32_t) -1;
return -1;
}
Expand Down
34 changes: 17 additions & 17 deletions src/help.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ static void help_draw_global(ToxWindow *self)
wprintw(win, " /log <on>|<off> : Enable/disable logging\n");
wprintw(win, " /myid : Print your Tox ID\n");
wprintw(win, " /group <name> : Create a new group chat\n");
wprintw(win, " /join <chatid> : Join a groupchat using a Chat ID\n");
wprintw(win, " /join <chatid> : Join a public groupchat using a Chat ID\n");
#ifdef GAMES
wprintw(win, " /game : Play a game\n");
#endif /* GAMES */
Expand Down Expand Up @@ -302,25 +302,25 @@ static void help_draw_groupchats(ToxWindow *self)
wprintw(win, " /chatid : Print this group's ID\n");
wprintw(win, " /close <m> : Leave the group with an optional part message\n");
wprintw(win, " /disconnect : Disconnect from the group (credentials retained)\n");
wprintw(win, " /ignore <name> : Ignore a peer\n");
wprintw(win, " /unignore <name> : Unignore an ignored peer\n");
wprintw(win, " /kick <name> : Remove a peer from the group\n");
wprintw(win, " /ignore <name>|<key> : Ignore a peer\n");
wprintw(win, " /unignore <name>|<key> : Unignore a peer\n");
wprintw(win, " /kick <name>|<key> : Remove a peer from the group\n");
wprintw(win, " /list : Print a list of peers currently in the group\n");
wprintw(win, " /locktopic : Set the topic lock: on | off\n");
wprintw(win, " /mod <name> : Promote a peer to moderator\n");
wprintw(win, " /nick <name> : Set your name for this group only\n");
wprintw(win, " /passwd <s> : Set a password needed to join the group\n");
wprintw(win, " /mod <name>|<key> : Promote a peer to moderator\n");
wprintw(win, " /nick <name> : Set your name (for this group only)\n");
wprintw(win, " /passwd <s> : Set a password to join the group\n");
wprintw(win, " /peerlimit <n> : Set the maximum number of peers that can join\n");
wprintw(win, " /privacy <state> : Set the privacy state: private | public\n");
wprintw(win, " /rejoin : Reconnect to the groupchat\n");
wprintw(win, " /silence <name> : Silence a peer for the entire group\n");
wprintw(win, " /unsilence <name> : Unsilence a silenced peer\n");
wprintw(win, " /status <type> : Set your status\n");
wprintw(win, " /topic <m> : Set the group topic\n");
wprintw(win, " /unmod <name> : Demote a moderator\n");
wprintw(win, " /rejoin : Reconnect to the group\n");
wprintw(win, " /silence <name>|<key> : Silence a peer for the entire group\n");
wprintw(win, " /unsilence <name>|<key> : Unsilence a silenced peer\n");
wprintw(win, " /status <type> : Set your status (client-wide)\n");
wprintw(win, " /topic <m> : Set the topic\n");
wprintw(win, " /unmod <name>|<key> : Demote a moderator\n");
wprintw(win, " /voice <state> : Set the voice state: all | mod | founder\n");
wprintw(win, " /whisper <name> <m> : Send a private message to a peer\n");
wprintw(win, " /whois <name> : Print whois info for a peer\n");
wprintw(win, " /whisper <name>|<key> <m> : Send a private message to a peer\n");
wprintw(win, " /whois <name>|<key> : Display whois info for a peer\n");

help_draw_bottom_menu(win);

Expand All @@ -342,8 +342,8 @@ static void help_draw_keys(ToxWindow *self)
wprintw(win, " Page Up and Page Down : Scroll window history one line\n");
wprintw(win, " Ctrl+F and Ctrl+V : Scroll window history half a page\n");
wprintw(win, " Ctrl+H : Move to the bottom of window history\n");
wprintw(win, " Ctrl+up and Ctrl+down : Scroll peer list in conference\n");
wprintw(win, " Ctrl+B : Toggle the conference peerlist\n");
wprintw(win, " Ctrl+up and Ctrl+down : Scroll groupchat/conference peer list\n");
wprintw(win, " Ctrl+B : Toggle groupchat/conference peer list\n");
wprintw(win, " Ctrl+J : Insert new line\n");
wprintw(win, " Ctrl+T : Toggle paste mode\n\n");
wprintw(win, " (Note: Custom keybindings override these defaults.)\n\n");
Expand Down

0 comments on commit 18b5abf

Please sign in to comment.