summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Richard <johnny@johnnyrichard.com>2022-04-21 23:55:13 +0200
committerJohnny Richard <johnny@johnnyrichard.com>2022-04-21 23:55:13 +0200
commitc4797d9dfcf82edf0212925190d5157055fdd187 (patch)
tree0104d3cb6a2138f10555720e61f313d40f12f107
parentad4313dbe5987ad75d255aaa20c1a8e29f7cbda3 (diff)
server: Fix nick/channel not found error
-rw-r--r--server.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/server.c b/server.c
index d43d5be..3b26d2d 100644
--- a/server.c
+++ b/server.c
@@ -276,11 +276,11 @@ server_on_privmsg_msg(server_t *server,
memset(rbuf, 0, BUFFER_SIZE);
if (client_recv == NULL) {
- sprintf(rbuf, "could not send message to nick: %s. nick not found\n", nick);
+ sprintf(rbuf, ":localhost 401 %s %s :No such nick/channel\n", client->nick, nick);
if (send(client->fd, rbuf, strlen(rbuf), 0) == -1) {
log_error("could not send data to client: %s", strerror(errno));
- return;
}
+ return;
}
string_view_chop_by_delim(&msg, ':');