summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--command.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/command.c b/command.c
index 8471214..2a3df9b 100644
--- a/command.c
+++ b/command.c
@@ -27,6 +27,7 @@ static void commandQuote(size_t id, char *params) {
 }
 
 static void commandPrivmsg(size_t id, char *params) {
+	if (!params || !params[0]) return;
 	ircFormat("PRIVMSG %s :%s\r\n", idNames[id], params);
 	struct Message msg = {
 		.nick = self.nick,
@@ -39,6 +40,7 @@ static void commandPrivmsg(size_t id, char *params) {
 }
 
 static void commandNotice(size_t id, char *params) {
+	if (!params || !params[0]) return;
 	ircFormat("NOTICE %s :%s\r\n", idNames[id], params);
 	struct Message msg = {
 		.nick = self.nick,
@@ -52,7 +54,7 @@ static void commandNotice(size_t id, char *params) {
 
 static void commandMe(size_t id, char *params) {
 	char buf[512];
-	snprintf(buf, sizeof(buf), "\1ACTION %s\1", params);
+	snprintf(buf, sizeof(buf), "\1ACTION %s\1", (params ? params : ""));
 	commandPrivmsg(id, buf);
 }
 
pan>Define ColorCap instead of hardcoding 100June McEnroe 2020-02-11Move hash to top of chat.hJune McEnroe 2020-02-11Move base64 out of chat.hJune McEnroe 2020-02-11Move XDG_SUBDIR out of chat.hJune McEnroe 2020-02-11Fix whois idle unit calculationJune McEnroe Rookie mistake. 2020-02-11Cast towupper to wchar_tJune McEnroe For some reason it takes and returns wint_t... 2020-02-11Cast set but unused variables to voidJune McEnroe 2020-02-11Declare strlcatJune McEnroe 2020-02-11Check if VDSUSP existsJune McEnroe 2020-02-11Fix completeReplace iterationJune McEnroe 2020-02-11Use pkg(8) to configure on FreeBSDJune McEnroe 2020-02-11Remove legacy codeJune McEnroe 2020-02-11Add INSTALLING section to READMEJune McEnroe