Added help. FIxed get dialog list
This commit is contained in:
parent
7f47948cc6
commit
3fc3d33130
18
interface.c
18
interface.c
@ -347,6 +347,24 @@ void interpreter (char *line UU) {
|
||||
}
|
||||
do_get_history (Peers[index], limit);
|
||||
}
|
||||
} else if (!memcmp (line, "help", 4)) {
|
||||
print_start ();
|
||||
push_color (COLOR_YELLOW);
|
||||
printf (
|
||||
"help - prints this help\n"
|
||||
"msg <peer> Text - sends message to this peer\n"
|
||||
"contact_list - prints info about users in your contact list\n"
|
||||
"stats - just for debugging \n"
|
||||
"history <peerd> [limit] - prints history (and marks it as read). Default limit = 40\n"
|
||||
"dialog_list - prints info about your dialogs\n"
|
||||
"send_photo <peer> <photo-file-name> - sends photo to peer\n"
|
||||
"send_video <peer> <video-file-name> - sends video to peer\n"
|
||||
"send_text <peer> <text-file-name> - sends text file as plain messages\n"
|
||||
"chat_info <chat> - prints info about chat\n"
|
||||
);
|
||||
pop_color ();
|
||||
print_end ();
|
||||
printf ("\033[1K\033H");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -655,7 +655,11 @@ void do_get_history (union user_chat *U, int limit) {
|
||||
}
|
||||
|
||||
int get_dialogs_on_answer (struct query *q UU) {
|
||||
assert (fetch_int () == CODE_messages_dialogs);
|
||||
unsigned x = fetch_int ();
|
||||
assert (x == CODE_messages_dialogs || x == CODE_messages_dialogs_slice);
|
||||
if (x == CODE_messages_dialogs_slice) {
|
||||
fetch_int (); // total_count
|
||||
}
|
||||
assert (fetch_int () == CODE_vector);
|
||||
int n, i;
|
||||
n = fetch_int ();
|
||||
|
Loading…
x
Reference in New Issue
Block a user