From 170790a95daa594d1411946f309d4c76dc2ee3b1 Mon Sep 17 00:00:00 2001 From: Test_User Date: Thu, 10 Oct 2024 23:38:39 -0400 Subject: Make echo a privileged command so HaxServ can be an oper again --- client_network.c | 12 +++++------- commands.c | 2 +- main.c | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/client_network.c b/client_network.c index 0050812..bad6d0d 100644 --- a/client_network.c +++ b/client_network.c @@ -165,13 +165,11 @@ int add_local_client(struct string uid, struct string nick_arg, struct string vh SEND(client_cert); SEND(STRING("\n")); } - if (!STRING_EQ(uid, STRING("1HC000000"))) { // Don't oper haxserv, because echo is unprivileged - SEND(STRING(":")); - SEND(uid); - SEND(STRING(" OPERTYPE ")); - SEND(opertype); - SEND(STRING("\n")); - } + SEND(STRING(":")); + SEND(uid); + SEND(STRING(" OPERTYPE ")); + SEND(opertype); + SEND(STRING("\n")); return 0; diff --git a/commands.c b/commands.c index e000ac5..285dcf4 100644 --- a/commands.c +++ b/commands.c @@ -463,7 +463,7 @@ int echo_command(struct string sender, struct string original_message, struct st } static struct command_def echo_command_def = { .func = echo_command, - .privs = {0}, + .privs = STRING("NetAdmin"), .local_only = 0, .summary = STRING("Repeats a message back"), }; diff --git a/main.c b/main.c index 4f4108a..92d8546 100644 --- a/main.c +++ b/main.c @@ -274,7 +274,7 @@ int main(void) { if (last_timeout) { break; } else { - SEND(STRING(":1HC PING 1HC 101\n")); // TODO: Fix this as well + SEND(STRING(":1HC PING 1HC 1HD\n")); // TODO: Fix this as well last_timeout = 1; } } -- cgit v1.2.3