Xonotic
dialog_multiplayer_join_termsofservice.qh File Reference
#include "tab.qh"
+ Include dependency graph for dialog_multiplayer_join_termsofservice.qh:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  XonoticServerToSTab
 

Functions

void AdditionalServerInfo_OnGet (entity fh, entity pass, int status)
 
entity makeXonoticServerToSTab ()
 

Function Documentation

◆ AdditionalServerInfo_OnGet()

void AdditionalServerInfo_OnGet ( entity  fh,
entity  pass,
int  status 
)

Definition at line 28 of file dialog_multiplayer_join_termsofservice.qc.

References strcat(), strfree, strzone(), url_fclose(), url_fgets(), URL_READY_CANREAD, URL_READY_CLOSED, and URL_READY_ERROR.

Referenced by XonoticServerToSTab_loadToS().

29 {
30  switch (status) {
31  case URL_READY_CLOSED:
32  {
33  break;
34  }
35  case URL_READY_ERROR:
36  {
37  me.text = strzone("Error reading ToS");
38  me.textBox.setText(me.textBox, me.text);
39  break;
40  }
41  case URL_READY_CANREAD:
42  {
43  strfree(me.text);
44  string temp = "";
45  for (string s; (s = url_fgets(fh)); )
46  {
47  if (temp != "")
48  temp = strcat(temp, "\n", s);
49  else
50  temp = s;
51  }
52  url_fclose(fh);
53  me.text = strzone(temp);
54  me.textBox.setText(me.textBox, me.text);
55  break;
56  }
57  default:
58  {
59  break;
60  }
61  }
62 }
const float URL_READY_CANREAD
Definition: urllib.qh:17
const float URL_READY_CLOSED
Definition: urllib.qh:15
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
ERASEABLE void url_fclose(entity e)
Definition: urllib.qc:207
const float URL_READY_ERROR
Definition: urllib.qh:14
#define strfree(this)
Definition: string.qh:56
ERASEABLE string url_fgets(entity e)
Definition: urllib.qc:287
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ makeXonoticServerToSTab()

entity makeXonoticServerToSTab ( )

Definition at line 7 of file dialog_multiplayer_join_termsofservice.qc.

References entity(), and NEW.

8 {
9  entity me;
11  me.configureDialog(me);
12  return me;
13 }
#define NEW(cname,...)
Definition: oo.qh:105
entity() spawn
+ Here is the call graph for this function: