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 '')
-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 {
2021-04-18tls: Use EC_KEY_set_ex_dataJune McEnroe 2021-04-18Import LibreSSL 3.3.2June McEnroe 2021-03-05Bump version to 3.3.1p1 3.3.1p1June McEnroe 2021-03-05build: Add OpenSSL includes to libcompatJune McEnroe 2020-12-15Import LibreSSL 3.3.1June McEnroe 2020-11-24Import LibreSSL 3.3.0June McEnroe 2020-10-22Import LibreSSL 3.2.2June McEnroe 2020-09-29Import LibreSSL 3.2.1June McEnroe 2020-09-29import: Add m4/ax_add_fortify_source.m4June McEnroe 2020-08-05build: Add README.7 to EXTRA_DIST 3.2.0June McEnroe 2020-08-03doc: Indicate that only OpenSSL 1.1.1b and newer workJune McEnroe