From f21e31e87737452706f80c8caa8cb38690e5bfe2 Mon Sep 17 00:00:00 2001 From: Michael Czigler <37268479+mcpcpc@users.noreply.github.com> Date: Fri, 25 Sep 2020 09:03:41 -0400 Subject: remove leader command character for PRIVMSGs --- kirc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kirc.c b/kirc.c index 4256038..7c9857d 100644 --- a/kirc.c +++ b/kirc.c @@ -241,13 +241,13 @@ handle_user_input(void) { if (usrin[0] == '/' && usrin[1] == '#') { strcpy(chan_default, usrin + 2); printf("new channel: #%s\n", chan_default); - } else if (usrin[0] == '/' && usrin[1] == '@') { - strtok_r(usrin, " ", &tok); - raw("privmsg %s :%s\r\n", usrin + 2, tok); } else if (usrin[0] == '/' && usrin[1] == '?' && msg_len == 3) { printf("current channel: #%s\n", chan_default); } else if (usrin[0] == '/') { raw("%s\r\n", usrin + 1); + } else if (usrin[0] == '@') { + strtok_r(usrin, " ", &tok); + raw("privmsg %s :%s\r\n", usrin + 1, tok); } else { raw("privmsg #%s :%s\r\n", chan_default, usrin); } -- cgit v1.2.3 From 3da949a3a808f3a70ea589e4704849a1400a69a9 Mon Sep 17 00:00:00 2001 From: Michael Czigler <37268479+mcpcpc@users.noreply.github.com> Date: Fri, 25 Sep 2020 09:04:26 -0400 Subject: Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c4c9cdc..27003a4 100644 --- a/README.md +++ b/README.md @@ -18,11 +18,11 @@ * Simple shortcut commands and full support for all IRC commands in the [RFC 2812](https://tools.ietf.org/html/rfc2812) standard: ```shell - Send a PRIVMSG to the current channel. -/ Send command to IRC server (see RFC 2812 for full list). -/# Assign new default message channel. -/? Print current message channel. -/@ Send a message to a specified channel or nick + Send a PRIVMSG to the current channel. +@ Send a message to a specified channel or nick +/ Send command to IRC server (see RFC 2812 for full list). +/# Assign new default message channel. +/? Print current message channel. ``` * Color scheme definition via [ANSI 8-bit colors](https://en.wikipedia.org/wiki/ANSI_escape_code). Therefore, one could theoretically achieve uniform color definition across all shell applications and tools. -- cgit v1.2.3