3 REGISTRY(SERVER_COMMANDS, BITS(7))
4 #define SERVER_COMMANDS_from(i) _SERVER_COMMANDS_from(i, NULL)
5 REGISTER_REGISTRY(SERVER_COMMANDS)
6 REGISTRY_SORT(SERVER_COMMANDS)
8 #define SERVER_COMMAND(id, description) \
9 CLASS(servercommand_##id, Command) \
10 ATTRIB(servercommand_##id, m_name, string, #id); \
11 ATTRIB(servercommand_##id, m_description, string, description); \
12 ENDCLASS(servercommand_##id) \
13 REGISTER(SERVER_COMMANDS, CMD_SV, id, m_id, NEW(servercommand_##id)); \
14 METHOD(servercommand_##id, m_invokecmd, void(servercommand_##id this, int request, entity caller, int arguments, string command))
16 STATIC_INIT(SERVER_COMMANDS_aliases) {
17 FOREACH(SERVER_COMMANDS, true, { localcmd(sprintf("alias %1$s \"%2$s %1$s ${* ?}\"\n", it.m_name, "qc_cmd_sv")); });