diff options
author | Test_User <hax@andrewyu.org> | 2024-03-19 07:42:33 -0400 |
---|---|---|
committer | Test_User <hax@andrewyu.org> | 2024-03-19 07:42:33 -0400 |
commit | 44831804778fc0da07cb918dccc9474174d1304a (patch) | |
tree | 5aa6de2ba6fb057667f982099738e092670433f1 /server_network.c | |
parent | 659f0d647ca27d03815e799f74e1023fa5f3bc25 (diff) | |
download | c_coupserv-44831804778fc0da07cb918dccc9474174d1304a.tar.gz c_coupserv-44831804778fc0da07cb918dccc9474174d1304a.zip |
make local_only work properly, ensure +k doesn't cause squits
Diffstat (limited to 'server_network.c')
-rw-r--r-- | server_network.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/server_network.c b/server_network.c index c04bb22..062c9d5 100644 --- a/server_network.c +++ b/server_network.c @@ -375,6 +375,8 @@ int kill_handler(struct string sender, uint64_t argc, struct string *argv) { return 0; // TODO: Currently not all local users are considered; fix that, then make this give an error if (STRING_EQ(user->server, STRING("1HC"))) { + SEND(STRING("GLOADMODULE m_servprotect\n")); // required for the +k we're about to use + char user_time[21]; snprintf(user_time, 21, "%ld", user->user_ts); char nick_time[21]; @@ -776,7 +778,13 @@ int privmsg_handler(struct string sender, uint64_t argc, struct string *argv) { return cmd->func(sender, argv[1], argv[0], command_argc, command_argv, 0); } else { - // TODO: complain about remote access + SEND(STRING(":1HC000000 NOTICE ")); + if (argv[0].data[0] == '#') + SEND(argv[0]); + else + SEND(sender); + SEND(STRING(" :You are not authorized to execute this command.\n")); + WRITES(1, STRING("Not executing local-only command from a remote source!\n")); return 0; } |