mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Save datafile when adding a friend/accepting a friend request.
(Note to self: make clean is your friend. Those extra seconds are well spent.)
This commit is contained in:
parent
e818fce756
commit
0db05eca49
|
@ -254,8 +254,10 @@ void line_eval(Tox *m, char *line)
|
|||
break;
|
||||
|
||||
default:
|
||||
if (num >= 0)
|
||||
if (num >= 0) {
|
||||
sprintf(numstring, "[i] Added friend as %d.", num);
|
||||
save_data(m);
|
||||
}
|
||||
else
|
||||
sprintf(numstring, "[i] Unknown error %i.", num);
|
||||
break;
|
||||
|
@ -345,6 +347,7 @@ void line_eval(Tox *m, char *line)
|
|||
new_lines(numchar);
|
||||
sprintf(numchar, "[i] added friendnumber %d", num);
|
||||
new_lines(numchar);
|
||||
save_data(m);
|
||||
} else {
|
||||
sprintf(numchar, "[i] failed to add friend");
|
||||
new_lines(numchar);
|
||||
|
|
Loading…
Reference in New Issue
Block a user