diff options
| -rw-r--r-- | handle.c | 14 | 
1 files changed, 9 insertions, 5 deletions
| @@ -222,16 +222,20 @@ static void handlePrivmsg(char *prefix, char *params) {  	shift(¶ms);  	char *mesg = shift(¶ms);  	tabTouch(nick); +	bool self = !strcmp(user, chat.user); +	bool ping = !strncasecmp(mesg, chat.nick, strlen(chat.nick)); +	if (ping) uiBeep();  	if (mesg[0] == '\1') {  		strsep(&mesg, " ");  		char *action = strsep(&mesg, "\1"); -		uiFmt("* \3%d%s\3 %s", color(user), nick, action); +		uiFmt( +			"* \3%d%s\3%s %s", +			color(user), nick, (self ? "15" : ""), action +		);  	} else { -		bool ping = !strncasecmp(mesg, chat.nick, strlen(chat.nick)); -		if (ping) uiBeep();  		uiFmt( -			"<%s\3%d%s\17> %s", -			(ping ? "\26" : ""), color(user), nick, mesg +			"<%s\3%d%s\17>\3%s %s", +			(ping ? "\26" : ""), color(user), nick, (self ? "15" : ""), mesg  		);  	}  } | 
