Xonotic
reg.qh File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SERVER_COMMAND(id, description)
 

Functions

 STATIC_INIT (SERVER_COMMANDS_aliases)
 

Macro Definition Documentation

◆ SERVER_COMMAND

#define SERVER_COMMAND (   id,
  description 
)
Value:
CLASS(servercommand_##id, Command) \
ATTRIB(servercommand_##id, m_name, string, #id); \
ATTRIB(servercommand_##id, m_description, string, description); \
ENDCLASS(servercommand_##id) \
REGISTER(SERVER_COMMANDS, CMD_SV, id, m_id, NEW(servercommand_##id)); \
METHOD(servercommand_##id, m_invokecmd, void(servercommand_##id this, int request, entity caller, int arguments, string command))
#define NEW(cname,...)
Definition: oo.qh:105
CLASS(Object) Object
Definition: oo.qh:318
entity() spawn
int m_id
Definition: effect.qh:19
string m_name
Definition: scores.qh:135

Definition at line 9 of file reg.qh.

Function Documentation

◆ STATIC_INIT()

STATIC_INIT ( SERVER_COMMANDS_aliases  )

Definition at line 17 of file reg.qh.

References FOREACH, and localcmd.

17  {
18  FOREACH(SERVER_COMMANDS, true, { localcmd(sprintf("alias %1$s \"%2$s %1$s ${* ?}\"\n", it.m_name, "qc_cmd_sv")); });
19 }
#define FOREACH(list, cond, body)
Definition: iter.qh:19