about 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);
 }
 
roe 2017-10-03Simplify Makefile with pattern ruleJune McEnroe 2017-09-27Remove leading blank linesJune McEnroe 2017-09-27Add merge.c to READMEJune McEnroe 2017-09-03Assert client coords are valid after movementJune McEnroe 2017-09-03Relicense AGPLJune McEnroe 2017-09-01Revert "Add client readOnly mode"June McEnroe 2017-09-01Remove clientRemove call from clientCastJune McEnroe 2017-09-01Add client readOnly modeJune McEnroe 2017-08-31Clean up merge toolJune McEnroe 2017-08-31Choose B for tiles with equal modify timesJune McEnroe 2017-08-31Add quick data file merge toolJune McEnroe 2017-08-30Use only foreground color for selecting spawnJune McEnroe 2017-08-29Add four additional spawnsJune McEnroe 2017-08-28Add respawningJune McEnroe 2017-08-26Move license above includesJune McEnroe 2017-08-26Snapshot metadataJune McEnroe 2017-08-26Add meta.c to READMEJune McEnroe 2017-08-26Use MakefileJune McEnroe