summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--chat.h1
-rw-r--r--command.c2
-rw-r--r--handle.c5
3 files changed, 6 insertions, 2 deletions
diff --git a/chat.h b/chat.h
index c8b31c2..90c7da8 100644
--- a/chat.h
+++ b/chat.h
@@ -73,6 +73,7 @@ extern struct Self {
 	char *chanTypes;
 	char *prefixes;
 	char *nick;
+	char *user;
 	enum Color color;
 } self;
 
diff --git a/command.c b/command.c
index ab05587..76d7d7b 100644
--- a/command.c
+++ b/command.c
@@ -23,7 +23,7 @@ void command(size_t id, char *input) {
 	ircFormat("PRIVMSG %s :%s\r\n", idNames[id], input);
 	struct Message msg = {
 		.nick = self.nick,
-		// TODO: .user,
+		.user = self.user,
 		.cmd = "PRIVMSG",
 		.params[0] = idNames[id],
 		.params[1] = input,
diff --git a/handle.c b/handle.c
index b5585ba..85783d7 100644
--- a/handle.c
+++ b/handle.c
@@ -187,7 +187,10 @@ static void handleJoin(struct Message *msg) {
 	require(msg, true, 1);
 	size_t id = idFor(msg->params[0]);
 	if (self.nick && !strcmp(msg->nick, self.nick)) {
-		self.color = hash(msg->user);
+		if (!self.user) {
+			set(&self.user, msg->user);
+			self.color = hash(msg->user);
+		}
 		idColors[id] = hash(msg->params[0]);
 		uiShowID(id);
 	}
tr>2021-08-20Explicitly clear TLS secrets after handshakeJune McEnroe 2021-08-20Handle TLS_WANT_POLL{IN,OUT} from tls_handshake(3) with serverJune McEnroe 2021-08-20Use "secure" libtls ciphersJune McEnroe 2021-07-08Use seprintf to build final 005June McEnroe 2021-06-19Fix LDADD.crypt on DarwinJune McEnroe 2021-06-18Add -m mode option to set user modesJune McEnroe 2021-06-18Document channel keys in join optionJune McEnroe 2021-06-18Use | to separate flags from config optionsJune McEnroe 2021-06-18Stop referring to server-time as IRCv3.2June McEnroe 2021-06-17Add mailing list archive to READMEJune McEnroe 2021-06-10Stop accumulating ISUPPORT tokens once MOTD startsJune McEnroe 2021-06-09Use seprintf for snip, removing strlcpynJune McEnroe 2021-06-09Use seprintf for reserializeJune McEnroe 2021-06-09Use seprintf for capListJune McEnroe 2021-06-09Add seprintfJune McEnroe 2021-05-27Add pounce-notify to README 2.4June McEnroe 2021-05-27Fix ENVIRONMENT formatting in pounce-notify(1)June McEnroe 2021-05-27Add note about Libera.Chat SASL-only rangesJune McEnroe 2021-05-25Add QUIRKS fileJune McEnroe 2021-05-19Replace freenode with tilde.chatJune McEnroe 2021-05-04notify: Reword pounce-notify manualJune McEnroe 2021-05-02Clean up Makefiles, configure scriptsJune McEnroe 2021-04-30palaver: Exit on getopt failureJune McEnroe 2021-04-30notify: Implement pounce-notifyJune McEnroe