Limit prefix parts to at most 25 chars

This commit is contained in:
Tor Hveem 2015-03-26 14:41:19 +01:00
commit 9b2a527cb7
2 changed files with 13 additions and 1 deletions

View file

@ -167,4 +167,16 @@ weechat.filter('mathjax', function() {
};
});
weechat.filter('prefixlimit', function() {
return function(input, chars) {
if (isNaN(chars)) return input;
if (chars <= 0) return '';
if (input && input.length > chars) {
input = input.substring(0, chars);
return input + '+';
}
return input;
};
});
})();