mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 07:22:28 +00:00
Merge branch 'listserv' into 'next'
Percent decode listserv (closes #244) Closes #244 See merge request STJr/SRB2!1150
This commit is contained in:
commit
30056157c2
1 changed files with 11 additions and 4 deletions
|
@ -472,6 +472,7 @@ HMS_list_servers (void)
|
|||
{
|
||||
struct HMS_buffer *hms;
|
||||
|
||||
char *list;
|
||||
char *p;
|
||||
|
||||
hms = HMS_connect("servers");
|
||||
|
@ -481,11 +482,17 @@ HMS_list_servers (void)
|
|||
|
||||
if (HMS_do(hms))
|
||||
{
|
||||
p = &hms->buffer[strlen(hms->buffer)];
|
||||
while (*--p == '\n')
|
||||
;
|
||||
list = curl_easy_unescape(hms->curl, hms->buffer, 0, NULL);
|
||||
|
||||
CONS_Printf("%s\n", hms->buffer);
|
||||
p = strtok(list, "\n");
|
||||
|
||||
while (p != NULL)
|
||||
{
|
||||
CONS_Printf("\x80%s\n", p);
|
||||
p = strtok(NULL, "\n");
|
||||
}
|
||||
|
||||
curl_free(list);
|
||||
}
|
||||
|
||||
HMS_end(hms);
|
||||
|
|
Loading…
Reference in a new issue