diff options
| author | C. McEnroe | 2020-02-09 00:53:55 -0500 | 
|---|---|---|
| committer | C. McEnroe | 2020-02-09 00:55:41 -0500 | 
| commit | a212a7ae2c93092068c8a9c483c4575cc65e7491 (patch) | |
| tree | 95a51bad8681774d8174707532f4763d039f0b12 /handle.c | |
| parent | e0714a9b7e88bc2de9ec4b4c0d0a74dc3012b847 (diff) | |
Show realname on JOIN if it is different from nick
Diffstat (limited to 'handle.c')
| -rw-r--r-- | handle.c | 11 | 
1 files changed, 9 insertions, 2 deletions
| @@ -214,10 +214,17 @@ static void handleJoin(struct Message *msg) {  		uiShowID(id);  	}  	completeTouch(id, msg->nick, hash(msg->user)); +	if (msg->params[2] && !strcasecmp(msg->params[2], msg->nick)) { +		msg->params[2] = NULL; +	}  	uiFormat(  		id, Cold, tagTime(msg), -		"\3%02d%s\3\tarrives in \3%02d%s\3", -		hash(msg->user), msg->nick, hash(msg->params[0]), msg->params[0] +		"\3%02d%s\3\t%s%s%sarrives in \3%02d%s\3", +		hash(msg->user), msg->nick, +		(msg->params[2] ? "(" : ""), +		(msg->params[2] ? msg->params[2] : ""), +		(msg->params[2] ? ") " : ""), +		hash(msg->params[0]), msg->params[0]  	);  } | 
