From e876aff0eb053c7483e902e8b27f27c44ba92193 Mon Sep 17 00:00:00 2001 From: TimePath Date: Sat, 7 Apr 2018 12:01:00 +1000 Subject: [PATCH] Chat: refactor to module, it will be more than just a few commands --- qcsrc/client/main.qc | 4 +--- qcsrc/menu/_mod.inc | 1 + qcsrc/menu/_mod.qh | 1 + qcsrc/menu/command/_mod.inc | 1 - qcsrc/menu/command/_mod.qh | 1 - qcsrc/menu/modules/_mod.inc | 3 +++ qcsrc/menu/modules/_mod.qh | 3 +++ qcsrc/menu/modules/chat/_mod.inc | 2 ++ qcsrc/menu/modules/chat/_mod.qh | 2 ++ qcsrc/menu/{command/notice.qc => modules/chat/commands.qc} | 2 +- qcsrc/menu/{command/notice.qh => modules/chat/commands.qh} | 0 qcsrc/menu/modules/chat/interface.qh | 5 +++++ 12 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 qcsrc/menu/modules/_mod.inc create mode 100644 qcsrc/menu/modules/_mod.qh create mode 100644 qcsrc/menu/modules/chat/_mod.inc create mode 100644 qcsrc/menu/modules/chat/_mod.qh rename qcsrc/menu/{command/notice.qc => modules/chat/commands.qc} (98%) rename qcsrc/menu/{command/notice.qh => modules/chat/commands.qh} (100%) create mode 100644 qcsrc/menu/modules/chat/interface.qh diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index 163bbce22..2d8483c83 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -29,7 +29,7 @@ #include #include #include -#include +#include // -------------------------------------------------------------------------- // BEGIN REQUIRED CSQC FUNCTIONS @@ -909,8 +909,6 @@ void CSQC_Parse_StuffCmd(string strMessage) localcmd(strMessage); } -string autocvar__cl_hook_print; - // CSQC_Parse_Print : Provides the print string in the first parameter that the server provided. To execute standard behavior, simply execute print with the string. void CSQC_Parse_Print(string strMessage) { diff --git a/qcsrc/menu/_mod.inc b/qcsrc/menu/_mod.inc index d2a8d702f..fd956463b 100644 --- a/qcsrc/menu/_mod.inc +++ b/qcsrc/menu/_mod.inc @@ -7,5 +7,6 @@ #include #include #include +#include #include #include diff --git a/qcsrc/menu/_mod.qh b/qcsrc/menu/_mod.qh index da8675831..2e36d7285 100644 --- a/qcsrc/menu/_mod.qh +++ b/qcsrc/menu/_mod.qh @@ -7,5 +7,6 @@ #include #include #include +#include #include #include diff --git a/qcsrc/menu/command/_mod.inc b/qcsrc/menu/command/_mod.inc index 9b9dc0bf1..0bcef50de 100644 --- a/qcsrc/menu/command/_mod.inc +++ b/qcsrc/menu/command/_mod.inc @@ -1,3 +1,2 @@ // generated file; do not modify #include -#include diff --git a/qcsrc/menu/command/_mod.qh b/qcsrc/menu/command/_mod.qh index 3633b94d9..91c0a8f35 100644 --- a/qcsrc/menu/command/_mod.qh +++ b/qcsrc/menu/command/_mod.qh @@ -1,3 +1,2 @@ // generated file; do not modify #include -#include diff --git a/qcsrc/menu/modules/_mod.inc b/qcsrc/menu/modules/_mod.inc new file mode 100644 index 000000000..8b11cef8c --- /dev/null +++ b/qcsrc/menu/modules/_mod.inc @@ -0,0 +1,3 @@ +// generated file; do not modify + +#include diff --git a/qcsrc/menu/modules/_mod.qh b/qcsrc/menu/modules/_mod.qh new file mode 100644 index 000000000..026d48278 --- /dev/null +++ b/qcsrc/menu/modules/_mod.qh @@ -0,0 +1,3 @@ +// generated file; do not modify + +#include diff --git a/qcsrc/menu/modules/chat/_mod.inc b/qcsrc/menu/modules/chat/_mod.inc new file mode 100644 index 000000000..b8c8810be --- /dev/null +++ b/qcsrc/menu/modules/chat/_mod.inc @@ -0,0 +1,2 @@ +// generated file; do not modify +#include diff --git a/qcsrc/menu/modules/chat/_mod.qh b/qcsrc/menu/modules/chat/_mod.qh new file mode 100644 index 000000000..8eaea0a7a --- /dev/null +++ b/qcsrc/menu/modules/chat/_mod.qh @@ -0,0 +1,2 @@ +// generated file; do not modify +#include diff --git a/qcsrc/menu/command/notice.qc b/qcsrc/menu/modules/chat/commands.qc similarity index 98% rename from qcsrc/menu/command/notice.qc rename to qcsrc/menu/modules/chat/commands.qc index 8fee54d4e..668ff651d 100644 --- a/qcsrc/menu/command/notice.qc +++ b/qcsrc/menu/modules/chat/commands.qc @@ -1,4 +1,4 @@ -#include "notice.qh" +#include "commands.qh" #include diff --git a/qcsrc/menu/command/notice.qh b/qcsrc/menu/modules/chat/commands.qh similarity index 100% rename from qcsrc/menu/command/notice.qh rename to qcsrc/menu/modules/chat/commands.qh diff --git a/qcsrc/menu/modules/chat/interface.qh b/qcsrc/menu/modules/chat/interface.qh new file mode 100644 index 000000000..1760a2ef3 --- /dev/null +++ b/qcsrc/menu/modules/chat/interface.qh @@ -0,0 +1,5 @@ +#pragma once + +#include "commands.qh" + +string autocvar__cl_hook_print; -- 2.39.2