aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-04-27 04:50:26 -0400
committerB. Watson <urchlay@slackware.uk>2026-04-27 04:50:26 -0400
commitbd4104563bb7672adf73659118172dff36c6a3c2 (patch)
tree3291ce7f52433a2788db0716a657d738a0a46662 /src
parent5d35bca0898f32e7a7d2c2ef8ba1c6edd3ccd583 (diff)
downloadfujinet-chat-bd4104563bb7672adf73659118172dff36c6a3c2.tar.gz
allow typing "//foo" to send "/foo" as channel/PM text
Diffstat (limited to 'src')
-rw-r--r--src/cmd.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/cmd.c b/src/cmd.c
index 154feaf..9fcdde5 100644
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -441,9 +441,17 @@ void cmd_execute(void) {
else
target = 0;
- if(command[0] == '/' && command[1] && command[1] != '/')
- cmd_slash();
- else if(target)
+ if(command[0] == '/') {
+ if(command[1] == '/') {
+ /* allow typing "//foo" to send "/foo" as channel/PM text */
+ command++;
+ } else {
+ cmd_slash();
+ return;
+ }
+ }
+
+ if(target)
cmd_chan_text();
else if(scr_current == SCR_PRIV || scr_current == SCR_SERVER)
cmd_send_pm(command);