summary refs log tree commit diff
path: root/state.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-11-10 20:11:13 -0500
committerJune McEnroe <june@causal.agency>2019-11-10 20:12:25 -0500
commit33a107f82da6e3a3f199a63661b3e31272c3fa71 (patch)
tree45c00d4b1b9f4e89f924c5ed7c29a016c49520a1 /state.c
parentAdd capsicum note to README (diff)
downloadpounce-33a107f82da6e3a3f199a63661b3e31272c3fa71.tar.gz
pounce-33a107f82da6e3a3f199a63661b3e31272c3fa71.zip
Filter invite-notify
Diffstat (limited to '')
-rw-r--r--state.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/state.c b/state.c
index b786adb..4103fff 100644
--- a/state.c
+++ b/state.c
@@ -119,10 +119,12 @@ static struct {
 	char *myInfo[5];
 } intro;
 
+const char *stateNick(void) {
+	return (self.nick ? self.nick : "*");
+}
+
 const char *stateEcho(void) {
-	if (self.origin) return self.origin;
-	if (self.nick) return self.nick;
-	return "*";
+	return (self.origin ? self.origin : stateNick());
 }
 
 bool stateReady(void) {