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:
Coren[m] 2013-09-14 18:39:59 +02:00
parent e818fce756
commit 0db05eca49

View File

@ -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);