From bd4104563bb7672adf73659118172dff36c6a3c2 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Mon, 27 Apr 2026 04:50:26 -0400 Subject: allow typing "//foo" to send "/foo" as channel/PM text --- src/cmd.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/cmd.c') 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); -- cgit v1.2.3