summary refs log tree commit diff
path: root/state.c
diff options
context:
space:
mode:
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) {