annual channel purge

master
Ben Harris 2020-01-06 13:18:26 -05:00
parent cf5d32598e
commit 6427b33677
6 changed files with 33 additions and 19 deletions

@ -1 +1 @@
Subproject commit b68b6d4329d9bee58a521e0ff8c6adbbc53915b4
Subproject commit 9ec6b55d037651f0a92583cff0a038912266e7f9

View File

@ -10,6 +10,7 @@ syntax enable
colo ron
set guifont="Input"
set spell
set autoindent
set backspace=indent,eol,start
set complete-=i

View File

@ -187,7 +187,7 @@ tilde.local_hostname
tilde.usermode
tilde.command = "/msg operserv login ${sec.data.pass}"
tilde.command_delay
tilde.autojoin = "#meta,#secret-sudoers,#admin,#opers,#sudoers,#music,#politics,#gopher,#tildeverse,#idlerpg,#tilderadio,#minecraft,#tildelinux,#cosmic,#institute,#.tilde,#tildetel,#thunix,#theasylum,#minetest,#aussie,#uucp,#projects,#hamradio,#vim,#black,#pink,#~,#netnews,#bots,#ctrl-c,#bitbot,#radiofreqs,#brains,#envs,#rfcs,#wilde,#tildegames,#tildenet,#gemini,#club,#zine,#twtxt,#factorio,#team,#summit,#thelounge,#adventofcode,#aoc :10:20,secretsudoteam,tildeiscool"
tilde.autojoin = "#meta,#secret-sudoers,#admin,#opers,#music,#politics,#gopher,#tildeverse,#idlerpg,#tilderadio,#minecraft,#tildelinux,#cosmic,#institute,#.tilde,#tildetel,#thunix,#theasylum,#aussie,#uucp,#projects,#hamradio,#vim,#black,#pink,#~,#netnews,#bots,#ctrl-c,#radiofreqs,#brains,#envs,#rfcs,#wilde,#tildegames,#tildenet,#gemini,#club,#zine,#team,#summit,#adventofcode,#es,#geocities,#services,#security,#zaphod,#chillzone :10:20,secretsudoteam,tildeiscool"
tilde.autorejoin
tilde.autorejoin_delay
tilde.connection_timeout
@ -230,7 +230,7 @@ hashbang.local_hostname
hashbang.usermode
hashbang.command = "/oper benharri x"
hashbang.command_delay
hashbang.autojoin = "#!opers,#!support,#!politics,#!os,#!social,#!"
hashbang.autojoin = "#!opers,#!politics,#!os,#!social,#!"
hashbang.autorejoin
hashbang.autorejoin_delay
hashbang.connection_timeout
@ -273,7 +273,7 @@ town.local_hostname
town.usermode
town.command
town.command_delay
town.autojoin = "#tildetown,#bots,#dumpsterfire,#tildemush,#counting,#movienight,#counting-meta,#heavy,#quiet,#alc,#queer,#math"
town.autojoin = "#tildetown,#bots,#tildemush,#counting,#movienight,#counting-meta,#heavy,#queer"
town.autorejoin
town.autorejoin_delay
town.connection_timeout
@ -488,7 +488,7 @@ freenode.local_hostname
freenode.usermode
freenode.command
freenode.command_delay
freenode.autojoin = "#weechat,##oodnet,#lobsters,#lobsters-boil,#gitea,#mastodon,#pleroma,#pleroma-offtopic,#oragono,#weechat-android,#git,#tilde.team,#sr.ht,#cmpwn,#bitbot,#ircv3,#gophernicus,##jan6,##ircv3-offtopic,#ovh,#elixir-lang,#ascii.town,#sonarr,#lxcontainers,#thelounge,#indieweb,#indieweb-dev,#indieweb-meta,#indieweb-chat,#knownchat,#cjdns,##ircv3-chat,#mumble,#!,#tildeclub,#freenode,#stutter,#futel,#wireguard,#antispyware,#lobsters-advent,#alpine-linux,#postfix 6:10"
freenode.autojoin = "#weechat,##oodnet,#lobsters,#lobsters-boil,#gitea,#mastodon,#pleroma,#pleroma-offtopic,#oragono,#weechat-android,#git,#tilde.team,#sr.ht,#cmpwn,#bitbot,#ircv3,#gophernicus,##jan6,##ircv3-offtopic,#ovh,#ascii.town,#sonarr,#thelounge,#indieweb,#indieweb-dev,#indieweb-meta,#indieweb-chat,##ircv3-chat,#!,#tildeclub,#futel,#antispyware,#lobsters-advent,#alpine-linux 6:10"
freenode.autorejoin
freenode.autorejoin_delay
freenode.connection_timeout
@ -746,7 +746,7 @@ hackint.local_hostname
hackint.usermode
hackint.command
hackint.command_delay
hackint.autojoin = "#hackint,#36c3,#camp"
hackint.autojoin = "#hackint"
hackint.autorejoin
hackint.autorejoin_delay
hackint.connection_timeout

View File

@ -19,6 +19,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# history:
# 3.8: new option custom_action_text (https://github.com/weechat/scripts/issues/313) (idea by 3v1n0)
# 3.7: new option "alternate_color" (https://github.com/weechat/scripts/issues/333) (idea by snuffkins)
# 3.6: new option "own_lines_color" (idea by Linkandzelda)
# : add help about "localvar" to option
@ -85,7 +86,7 @@
use strict;
my $PRGNAME = "colorize_lines";
my $VERSION = "3.7";
my $VERSION = "3.8";
my $AUTHOR = "Nils Görs <weechatter\@arcor.de>";
my $LICENCE = "GPL3";
my $DESCR = "Colorize users' text in chat area with their nick color, including highlights";
@ -102,6 +103,7 @@ my %config = ("buffers" => "all", # all, channel, query
"highlight_words" => "off", # on, off
"highlight_words_color" => "black,darkgray",
"alternate_color" => "",
"custom_action_text" => "",
);
my %help_desc = ("buffers" => "Buffer type affected by the script (all/channel/query, default: all)",
@ -116,6 +118,7 @@ my %help_desc = ("buffers" => "Buffer type affected by the scri
"highlight_words" => "highlight word(s) in text, matching word(s) in weechat.look.highlight",
"highlight_words_color" => "color for highlight word in text (format: fg,bg)",
"alternate_color" => "alternate between two colors for messages (format: fg,bg:fg,bg)",
"custom_action_text" => "customise the text attributes of ACTION message (note: content is evaluated, see /help eval)",
);
my @ignore_tags_array;
@ -262,6 +265,7 @@ sub colorize_cb
# remove the first color reset - after * nick
# make other resets reset to our color
$right =~ s/\34//;
$color = weechat::string_eval_expression($config{custom_action_text}, {}, {}, {}) if ( $config{custom_action_text} ne "");
$right =~ s/\34/\34$color/g;
$out = $left . "\t" . $right . "\34"
} else {

View File

@ -30,6 +30,7 @@ perl.check_license = "off"
perl.colorize_lines.alternate_color = ""
perl.colorize_lines.blacklist_buffers = ""
perl.colorize_lines.buffers = "all"
perl.colorize_lines.custom_action_text = ""
perl.colorize_lines.highlight = "on"
perl.colorize_lines.highlight_words = "off"
perl.colorize_lines.highlight_words_color = ""
@ -124,6 +125,7 @@ lua.matrix.user = "Your homeserver username (default: "")"
perl.colorize_lines.alternate_color = "alternate between two colors for messages (format: fg,bg:fg,bg)"
perl.colorize_lines.blacklist_buffers = "Comma-separated list of channels to be ignored (e.g. freenode.#weechat,*.#python)"
perl.colorize_lines.buffers = "Buffer type affected by the script (all/channel/query, default: all)"
perl.colorize_lines.custom_action_text = "customise the text attributes of ACTION message (note: content is evaluated, see /help eval)"
perl.colorize_lines.highlight = "Apply highlight color to the highlighted lines (off/on/nicks). The latter will limit highlighting to nicknames in option 'nicks'"
perl.colorize_lines.highlight_words = "highlight word(s) in text, matching word(s) in weechat.look.highlight"
perl.colorize_lines.highlight_words_color = "color for highlight word in text (fg:bg)"

View File

@ -25,6 +25,11 @@
#
# Changelog:
# 3,8:
# * Fix relative sorting on script name in default rules.
# * Document a useful property of stable sort algorithms.
# 3.7:
# * Make default rules work with bitlbee, matrix and slack.
# 3.6:
# * Add more documentation on provided info hooks.
# 3.5:
@ -80,7 +85,7 @@ import weechat
SCRIPT_NAME = 'autosort'
SCRIPT_AUTHOR = 'Maarten de Vries <maarten@de-vri.es>'
SCRIPT_VERSION = '3.6'
SCRIPT_VERSION = '3.8'
SCRIPT_LICENSE = 'GPL3'
SCRIPT_DESC = 'Flexible automatic (or manual) buffer sorting based on eval expressions.'
@ -173,22 +178,21 @@ class Config:
default_rules = json.dumps([
'${core_first}',
'${irc_last}',
'${buffer.plugin.name}',
'${info:autosort_order,${info:autosort_escape,${script_or_plugin}},core,*,irc,bitlbee,matrix,slack}',
'${script_or_plugin}',
'${irc_raw_first}',
'${if:${plugin}==irc?${server}}',
'${if:${plugin}==irc?${info:autosort_order,${type},server,*,channel,private}}',
'${if:${plugin}==irc?${hashless_name}}',
'${server}',
'${info:autosort_order,${type},server,*,channel,private}',
'${hashless_name}',
'${buffer.full_name}',
])
default_helpers = json.dumps({
'core_first': '${if:${buffer.full_name}!=core.weechat}',
'irc_first': '${if:${buffer.plugin.name}!=irc}',
'irc_last': '${if:${buffer.plugin.name}==irc}',
'irc_raw_first': '${if:${buffer.full_name}!=irc.irc_raw}',
'irc_raw_last': '${if:${buffer.full_name}==irc.irc_raw}',
'hashless_name': '${info:autosort_replace,#,,${info:autosort_escape,${buffer.name}}}',
'core_first': '${if:${buffer.full_name}!=core.weechat}',
'irc_raw_first': '${if:${buffer.full_name}!=irc.irc_raw}',
'irc_raw_last': '${if:${buffer.full_name}==irc.irc_raw}',
'hashless_name': '${info:autosort_replace,#,,${info:autosort_escape,${buffer.name}}}',
'script_or_plugin': '${if:${script_name}?${script_name}:${plugin}}',
})
default_signal_delay = 5
@ -961,6 +965,9 @@ order can be customized by defining your own sort rules, but the default should
be sane enough for most people. It can also group IRC channel/private buffers
under their server buffer if you like.
Autosort uses a stable sorting algorithm, meaning that you can manually move buffers
to change their relative order, if they sort equal with your rule set.
{*white}# Sort rules{reset}
Autosort evaluates a list of eval expressions (see {*default}/help eval{reset}) and sorts the
buffers based on evaluated result. Earlier rules will be considered first. Only