summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--chat.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/chat.c b/chat.c
index c368212..497c051 100644
--- a/chat.c
+++ b/chat.c
@@ -333,7 +333,12 @@ static void handlePrivmsg(char *prefix, char *params) {
 	char *user = prift(&prefix);
 	shift(&params);
 	char *mesg = shift(&params);
-	uiFmt("<\3%d%s\3> %s", color(user), nick, mesg);
+	if (mesg[0] == '\1') {
+		strsep(&mesg, " ");
+		uiFmt("* \3%d%s\3 %s", color(user), nick, strsep(&mesg, "\1"));
+	} else {
+		uiFmt("<\3%d%s\3> %s", color(user), nick, mesg);
+	}
 }
 static void handleNotice(char *prefix, char *params) {
 	char *nick = prift(&prefix);
@@ -423,7 +428,10 @@ static void webirc(const char *pass) {
 	const char *ssh = getenv("SSH_CLIENT");
 	if (!ssh) return;
 	int len = strchrnul(ssh, ' ') - ssh;
-	clientFmt("WEBIRC %s %s %.*s %.*s\r\n", pass, client.nick, len, ssh, len, ssh);
+	clientFmt(
+		"WEBIRC %s %s %.*s %.*s\r\n",
+		pass, client.nick, len, ssh, len, ssh
+	);
 }
 
 int main(int argc, char *argv[]) {
3' class='logmsg'> Simplifies ANSI and IRC output code, and prepares for line numbered output. 2019-02-15Color format specifiers light cyan in vimJune McEnroe 2019-02-15Highlight Interp as yellowJune McEnroe 2019-02-15Highlight strings in sh command substitutionsJune McEnroe 2019-02-15Add nmap gpJune McEnroe 2019-02-14Avoid newline when copying URL to pasteboardJune McEnroe 2019-02-13Add forgotten "sixth" book of H2G2June McEnroe