Skip to content

Instantly share code, notes, and snippets.

@Jan02
Last active January 9, 2018 15:28
Show Gist options
  • Save Jan02/1a4fd9126fde33d1cb4486edf2d9083d to your computer and use it in GitHub Desktop.
Save Jan02/1a4fd9126fde33d1cb4486edf2d9083d to your computer and use it in GitHub Desktop.
highlightwin kvirc will create a window for highlights
# create a new handler under OnHighlight
# https://github.com/wodim/kvirc-scripts/blob/master/OnHighlight.highlightwindow.kvs
#########################################
if ($0 == "*buffextras") {
return;
}
if (!%Highlight{$context} || !$window.exists(%Highlight{$context})) {
%Highlight{$context} = $window.open("m", "Highlights", $context, 110);
}
if ($window.type == "channel") {
%target = $target;
} else {
%target = [query];
}
if (!$6) {
echo -w=%Highlight{$context} -i=$msgtype(privatemessage) %target <$link($0, nick)> $3;
} else {
echo -w=%Highlight{$context} -i=$msgtype(action) %target $link($0, nick) $3;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment