summary refs log tree commit diff
path: root/command.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-02-05 22:18:11 -0500
committerJune McEnroe <june@causal.agency>2020-02-05 22:18:11 -0500
commit63b92672fe9ecfd400d9439343a068a3ae5224df (patch)
tree5e321f02e2d8ab4aa5ac1a76e7f986363215208a /command.c
parentHandle empty messages on privmsg, notice, action (diff)
downloadcatgirl-63b92672fe9ecfd400d9439343a068a3ae5224df.tar.gz
catgirl-63b92672fe9ecfd400d9439343a068a3ae5224df.zip
Handle empty params in /quote
Diffstat (limited to 'command.c')
-rw-r--r--command.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/command.c b/command.c
index 2a3df9b..f9362dc 100644
--- a/command.c
+++ b/command.c
@@ -23,7 +23,7 @@ typedef void Command(size_t id, char *params);
 
 static void commandQuote(size_t id, char *params) {
 	(void)id;
-	ircFormat("%s\r\n", params);
+	if (params) ircFormat("%s\r\n", params);
 }
 
 static void commandPrivmsg(size_t id, char *params) {
@@ -65,8 +65,7 @@ static void commandQuit(size_t id, char *params) {
 
 static void commandWindow(size_t id, char *params) {
 	(void)id;
-	if (!params) return;
-	uiShowNum(strtoul(params, NULL, 10));
+	if (params) uiShowNum(strtoul(params, NULL, 10));
 }
 
 static const struct Handler {
le='2020-03-02 18:46:02 -0500'>2020-03-02Replace .mk files with configure scriptJune McEnroe 2020-02-28Implement the causal.agency/consumer capabilityJune McEnroe 2020-02-22Include <>/-/* around nicks in coloringJune McEnroe 2020-02-22Use (almost) the full range of IRC colors for nicksJune McEnroe