mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-25 02:43:02 +01:00
Compare commits
2 Commits
85024bfce8
...
058057c64d
Author | SHA1 | Date | |
---|---|---|---|
|
058057c64d | ||
146b00b8ca |
@ -601,6 +601,7 @@ int load_DHT_nodeslist(void)
|
|||||||
Nodes.count = 2;
|
Nodes.count = 2;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|
||||||
if (thread_data.active) {
|
if (thread_data.active) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -623,6 +624,7 @@ int load_DHT_nodeslist(void)
|
|||||||
thread_data.active = false;
|
thread_data.active = false;
|
||||||
return -5;
|
return -5;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -991,7 +991,9 @@ static void groupchat_onGroupPeerJoin(ToxWindow *self, Tox *m, uint32_t groupnum
|
|||||||
++chat->max_idx;
|
++chat->max_idx;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (timed_out(chat->time_connected, 60) && user_settings->show_group_connection_msg == SHOW_GROUP_CONNECTION_MSG_ON) { /* ignore join messages when we first connect to the group */
|
if (timed_out(chat->time_connected, 60)
|
||||||
|
&& user_settings->show_group_connection_msg ==
|
||||||
|
SHOW_GROUP_CONNECTION_MSG_ON) { /* ignore join messages when we first connect to the group */
|
||||||
line_info_add(self, true, peer->name, NULL, CONNECTION, 0, GREEN, "has joined the room");
|
line_info_add(self, true, peer->name, NULL, CONNECTION, 0, GREEN, "has joined the room");
|
||||||
|
|
||||||
write_to_log("has joined the room", peer->name, self->chatwin->log, true);
|
write_to_log("has joined the room", peer->name, self->chatwin->log, true);
|
||||||
@ -1033,7 +1035,10 @@ void groupchat_onGroupPeerExit(ToxWindow *self, Tox *m, uint32_t groupnumber, ui
|
|||||||
snprintf(log_str, sizeof(log_str), "[%s]", exit_string);
|
snprintf(log_str, sizeof(log_str), "[%s]", exit_string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (user_settings->show_group_connection_msg == SHOW_GROUP_CONNECTION_MSG_ON) {
|
||||||
write_to_log(log_str, name, self->chatwin->log, true);
|
write_to_log(log_str, name, self->chatwin->log, true);
|
||||||
|
}
|
||||||
|
|
||||||
sound_notify(self, silent, NT_WNDALERT_2, NULL);
|
sound_notify(self, silent, NT_WNDALERT_2, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -269,13 +269,20 @@ void cb_toxcore_logger(Tox *m, TOX_LOG_LEVEL level, const char *file, uint32_t l
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
|
|
||||||
gettimeofday(&tv, NULL);
|
gettimeofday(&tv, NULL);
|
||||||
|
|
||||||
struct tm tmp;
|
struct tm tmp;
|
||||||
|
|
||||||
gmtime_r(&tv.tv_sec, &tmp);
|
gmtime_r(&tv.tv_sec, &tmp);
|
||||||
|
|
||||||
char timestamp[200];
|
char timestamp[200];
|
||||||
|
|
||||||
strftime(timestamp, sizeof(timestamp), "%F %T", &tmp);
|
strftime(timestamp, sizeof(timestamp), "%F %T", &tmp);
|
||||||
|
|
||||||
fprintf(fp, "%c %s.%06ld %s:%u(%s) - %s\n", tox_log_level_show(level)[0], timestamp, tv.tv_usec, file, line, func, message);
|
fprintf(fp, "%c %s.%06ld %s:%u(%s) - %s\n", tox_log_level_show(level)[0], timestamp, tv.tv_usec, file, line, func,
|
||||||
|
message);
|
||||||
|
|
||||||
fflush(fp);
|
fflush(fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user