summary refs log tree commit diff
path: root/state.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-10-25 18:24:47 -0400
committerJune McEnroe <june@causal.agency>2019-10-25 18:24:47 -0400
commit1b41af31351ed0dd4bcdceda5efbbae3e38c3fca (patch)
tree50765e0e28cf0675757ba38ac91b658137b043a6 /state.c
parentClean up event loop (diff)
downloadpounce-1b41af31351ed0dd4bcdceda5efbbae3e38c3fca.tar.gz
pounce-1b41af31351ed0dd4bcdceda5efbbae3e38c3fca.zip
Send PRIVMSG and NOTICE to other clients
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) {