From 8afe25e31e00575ae9e123348bbcf9d9cb948bfd Mon Sep 17 00:00:00 2001 From: Lennart Jablonka Date: Thu, 23 Mar 2023 13:30:17 +0100 Subject: [PATCH gridirc] don't require PRIVMSGs to have a colon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When relaying an IRC message to gridchat, everything up to and including the first colon is stripped: PRIVMSG #chat :hello there becomes humm → hello there If a message does not contain whitespace, it need not start in a colon, though: PRIVMSG #chat hello would get relayed as humm → PRIVMSG chat hello --- gridirc.rc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gridirc.rc b/gridirc.rc index a8338cc..d7cfb7a 100755 --- a/gridirc.rc +++ b/gridirc.rc @@ -129,7 +129,9 @@ $1 ~ /^JOIN$/ { $1 ~ /^PRIVMSG$/ { sub(/^#/, "", $2) chan=$2 - sub(/^[^:]*:/, "") + $1 = "" + $2 = "" + sub(/^ *:?/, "") file=sprintf("/n/chat/%s", chan) printf "%s → %s\n", nick, $0 >> file fflush -- 2.39.2