summary refs log tree commit diff
path: root/command.c
diff options
context:
space:
mode:
authorC. McEnroe2020-02-05 22:18:11 -0500
committerC. McEnroe2020-02-05 22:18:11 -0500
commit63b92672fe9ecfd400d9439343a068a3ae5224df (patch)
tree5e321f02e2d8ab4aa5ac1a76e7f986363215208a /command.c
parent7cc64927bd223ed0a0197cf3285dbc85691fd32b (diff)
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 {