1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-06-29 23:26:45 +02:00

Switch to using json DHT nodes file

Parsing json manually like this is ugly, but this allows us to use the json formatted nodeslist file
at nodes.tox.chat instead of having to update the list by hand. We could also potentially
use curl to fetch the list and update it automatically.
This commit is contained in:
Jfreegman
2016-09-17 21:38:32 -04:00
parent 1f02bb2be5
commit 5e20e6b279
5 changed files with 109 additions and 88 deletions

View File

@ -136,11 +136,11 @@ int get_group_nick_truncate(Tox *m, char *buf, int peernum, int groupnum);
size_t copy_tox_str(char *msg, size_t size, const char *data, size_t length);
/* returns index of the first instance of ch in s starting at idx.
returns length of s if char not found */
returns length of s if char not found or 0 if s is NULL. */
int char_find(int idx, const char *s, char ch);
/* returns index of the last instance of ch in s
returns 0 if char not found */
/* returns index of the last instance of ch in s starting at len.
returns 0 if char not found or s is NULL (skips 0th index). */
int char_rfind(const char *s, char ch, int len);
/* Converts bytes to appropriate unit and puts in buf as a string */