summaryrefslogtreecommitdiff
path: root/client_network.c
diff options
context:
space:
mode:
authorTest_User <hax@andrewyu.org>2023-08-10 03:20:10 -0400
committerTest_User <hax@andrewyu.org>2023-08-10 03:20:10 -0400
commit833f715ec2a6917c0afb4300e6505b135410ec3a (patch)
tree2db0dede15484873564ee3f56b7f7bddbf8cf805 /client_network.c
parentc58679ab1055fc48e31ebc661d38f470bdec3142 (diff)
downloadcoupserv-833f715ec2a6917c0afb4300e6505b135410ec3a.tar.gz
coupserv-833f715ec2a6917c0afb4300e6505b135410ec3a.zip
privmsg() now takes an array rather than a single string, more stuff switched from server-only to privmsg()
Diffstat (limited to 'client_network.c')
-rw-r--r--client_network.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/client_network.c b/client_network.c
index 37e3e8a..42d0acc 100644
--- a/client_network.c
+++ b/client_network.c
@@ -431,14 +431,15 @@ int client_privmsg_handler(uint64_t argc, struct string *argv) {
struct command_def *cmd = get_table_index(user_commands, command_argv[0]);
if (cmd) {
if (!cmd->local_only) {
- SEND(STRING(":1HC000000 PRIVMSG "));
- SEND(log_channel);
- SEND(STRING(" :Local user "));
- SEND(client_nick);
-
- SEND(STRING(" executes `"));
- SEND(argv[1]);
- SEND(STRING("'\n"));
+ struct string message[] = {
+ STRING("Local user "),
+ client_nick,
+ STRING(" executes `"),
+ argv[1],
+ STRING("'\n"),
+ };
+
+ privmsg(STRING("1HC000000"), log_channel, sizeof(message)/sizeof(*message), message);
return cmd->func(STRING("1HC000001"), argv[1], argv[0], command_argc, command_argv);
} else {