aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-03-13 05:14:53 -0400
committerB. Watson <urchlay@slackware.uk>2026-03-13 05:14:53 -0400
commit1435ac4f6acd48835656246db77f117fd75957c0 (patch)
tree78ebd080d17bdd2173014c63ed16f906fdbbd3c3
parent08d6fe8f61b3b0a0b767cfca93412703017810a3 (diff)
downloadfujinet-chat-1435ac4f6acd48835656246db77f117fd75957c0.tar.gz
For "/ctcp nick ping", append the timestamp like "/ping user" does.
-rw-r--r--TODO2
-rw-r--r--src/cmd.c8
2 files changed, 8 insertions, 2 deletions
diff --git a/TODO b/TODO
index b971e11..c7931ac 100644
--- a/TODO
+++ b/TODO
@@ -21,7 +21,7 @@ Other stuff:
- In the config, under SDX, saying "N" to "Settings OK" and then
reloading the config causes screen corruption (reported by
TheDoctor, not tried it myself).
-- /ping nick works, but /ctcp ping nick doesn't put the timestamp in
+- /ping nick works, but /ctcp nick ping doesn't put the timestamp in
the request.
- "User has kicked <yourname> from #channel", the name should be
replaced by "you".
diff --git a/src/cmd.c b/src/cmd.c
index 6c17a30..362cfa8 100644
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -293,13 +293,19 @@ static void do_ctcp(void) {
err_arg_req();
return;
}
+
arg2 = nextarg(arg1);
if(!arg2) {
err_arg_req();
return;
}
+
arg3 = nextarg(arg2);
- send_ctcp();
+
+ if(streq_i(arg2, "PING"))
+ do_ctcp_ping();
+ else
+ send_ctcp();
}
static void do_me(void) {