summary refs log tree commit diff
path: root/state.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--state.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/state.c b/state.c
index a65b1c2..c46aa8c 100644
--- a/state.c
+++ b/state.c
@@ -94,6 +94,12 @@ bool stateReady(void) {
 		&& support.len;
 }
 
+const char *stateSelf(void) {
+	if (self.origin) return self.origin;
+	if (self.nick) return self.nick;
+	return "*";
+}
+
 typedef void Handler(struct Message *msg);
 
 static void handleCap(struct Message *msg) {