1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-12-07 04:16:34 +01:00

don't allow DNS lookups when using a proxy + forced TCP & fix arg parsing

This commit is contained in:
Jfreegman
2014-08-15 15:13:35 -04:00
parent 1d6ccf56a8
commit 68ec484a58
2 changed files with 15 additions and 6 deletions

View File

@@ -377,6 +377,11 @@ void *dns3_lookup_thread(void *data)
/* creates new thread for dns3 lookup. Only allows one lookup at a time. */
void dns3_lookup(ToxWindow *self, Tox *m, const char *id_bin, const char *addr, const char *msg)
{
if (arg_opts.use_proxy && arg_opts.force_tcp) {
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "DNS lookups are disabled.");
return;
}
if (t_data.busy) {
const char *err = "Please wait for previous user lookup to finish.";
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, err);