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 'state.c')
-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) {
ly without any clients breaking... And of course server-time which pounce implements itself. 2019-11-09Avoid the reserved _A names with BIT macroJune McEnroe 2019-11-09Define macro for bit flag enumsJune McEnroe 2019-11-08Check that password is hashedJune McEnroe 2019-11-08Avoid calling getopt_long again after it returns -1June McEnroe On GNU, calling getopt_long again will reset optind back to the first non-option argument, which would cause an infinite loop of reading the same configurtion file forever. 2019-11-08Only change AWAY status for registered clientsJune McEnroe Turns out I did eventually fix this, because I may want to implement "passive clients" for logging or notification stuff, which wouldn't affect AWAY status either. 2019-11-07Just write the example normallyJune McEnroe 2019-11-07Include path in readlinkat errorJune McEnroe 2019-11-07Call clientConsume before clientRecvJune McEnroe This might reduce the frequency of a client getting its own message back because it was behind in the ring when it sent it. 2019-11-06Use -l:filename in Linux.mkJune McEnroe 2019-11-06Fix compat.h for #defined strlcpyJune McEnroe 2019-11-06Allow unsetting LIBRESSL_PREFIXJune McEnroe 2019-11-06Document calico service configurationJune McEnroe 2019-11-06Document SASL EXTERNAL configuration in more detailJune McEnroe 2019-11-06Document pounce service configurationJune McEnroe 2019-11-06Mention Darwin and GNU/Linux in READMEJune McEnroe 2019-11-06Assume LibreSSL from brew on DarwinJune McEnroe 2019-11-06Remove -DNO_EXPLICIT_BZERO from Darwin.mkJune McEnroe 2019-11-06Don't install rc scripts or dirs on LinuxJune McEnroe