summary refs log tree commit diff
path: root/handle.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-07-02 21:41:52 -0400
committerJune McEnroe <june@causal.agency>2019-07-02 21:41:52 -0400
commit6223c9c8f8da33c27c07ee75d05bd17dacf401c0 (patch)
tree23e101ca5da0d1cd227948198174d97300796562 /handle.c
parentClean up input parameter handling (diff)
downloadcatgirl-6223c9c8f8da33c27c07ee75d05bd17dacf401c0.tar.gz
catgirl-6223c9c8f8da33c27c07ee75d05bd17dacf401c0.zip
Deal with ~users in colorGen
Diffstat (limited to 'handle.c')
-rw-r--r--handle.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/handle.c b/handle.c
index 4f9015c..e59960b 100644
--- a/handle.c
+++ b/handle.c
@@ -43,7 +43,7 @@ static void parse(
 		field = strsep(&prefix, "!");
 		if (nick) *nick = field;
 		field = strsep(&prefix, "@");
-		if (user) *user = (field && field[0] == '~' ? &field[1] : field);
+		if (user) *user = field;
 		if (host) *host = prefix;
 	}
 
@@ -164,7 +164,7 @@ static void handleReplyWhoisUser(char *prefix, char *params) {
 		prefix, NULL, NULL, NULL,
 		params, 6, 0, NULL, &nick, &user, &host, NULL, &real
 	);
-	whoisColor = colorGen(user[0] == '~' ? &user[1] : user);
+	whoisColor = colorGen(user);
 	uiFmt(
 		TagStatus, UIWarm,
 		"\3%d%s\3 is %s@%s, \"%s\"",
@@ -372,7 +372,6 @@ static void handleReplyWho(char *prefix, char *params) {
 		prefix, NULL, NULL, NULL,
 		params, 6, 0, NULL, &chan, &user, NULL, NULL, &nick
 	);
-	if (user[0] == '~') user = &user[1];
 	struct Tag tag = colorTag(tagFor(chan), chan);
 
 	tabAdd(tag, nick);