Commits

Anonymous committed 99f0c2d

simple/ugly fix so that the nick '|' doesn't screw up cw_color.sh

  • Participants
  • Parent commits 4f8a3fb

Comments (0)

Files changed (1)

extras/cw_color.sh

 		marg = index(line, mesg);
 		str  = substr(line, 1, cols);
 		line = substr(line, cols + 1);
+		first = 1;
 	} else {
 		if (act == 1)
 			str = sprintf("%*s %s%s", marg - 1, "", act_fmt, substr(line, 1, cols - marg + 1));
 		else
 			str = sprintf("%*s | %s", marg - 4, "", substr(line, 1, cols - marg + 1));
 		line = substr(line, cols - marg + 2);
+		first = 0;
 	}
 
 	if (act == 1) {
 	gsub(/\[/, "\\[", $3);
 	gsub(/\]/, "\\]", $3);
 	gsub(/\|/, "\\|", $3);
-	sub($3, nick, str);
+	if (first)
+	    sub($3, nick, str);
 	gsub(me, me_col, str);
 	printf("%s%s\n", str, reset_fmt);
 	fflush();