mirror of https://tildegit.org/ben/dotfiles
weechat 2.5
parent
08a6fa8739
commit
39a52a270b
|
@ -10,10 +10,6 @@
|
|||
#
|
||||
|
||||
[cmd]
|
||||
AAWAY = "allserv /away"
|
||||
AME = "allchan /me"
|
||||
AMSG = "allchan /msg *"
|
||||
ANICK = "allserv /nick"
|
||||
BEEP = "print -beep"
|
||||
BS = "quote botserv"
|
||||
BYE = "quit"
|
||||
|
@ -22,7 +18,6 @@ CHAT = "dcc chat"
|
|||
CL = "buffer clear"
|
||||
CLOSE = "buffer close"
|
||||
CS = "quote chanserv"
|
||||
EXIT = "quit"
|
||||
factor = "/exec -sh -o factor $1 | cut -d" " -f 2,3 | tr " " ",""
|
||||
flip = "/exec -o flip table $*"
|
||||
HS = "quote hostserv"
|
||||
|
@ -39,14 +34,13 @@ MUB = "unban *"
|
|||
N = "names"
|
||||
NS = "quote nickserv"
|
||||
OS = "quote operserv"
|
||||
py = "/exec -o python3 -c "print($*)""
|
||||
Q = "query"
|
||||
rainbow = "/exec -o toilet --irc --gay -f term -- $*"
|
||||
REDRAW = "window refresh"
|
||||
save_settings = "/autojoin --run;/layout store;/save"
|
||||
SAY = "msg *"
|
||||
setup_aspell = "/set weechat.bar.rootinput.items [input_prompt]+(away),[input_search],[input_paste],input_text,aspell_suggest;/set aspell.check.default_dict en_US;/set aspell.check.suggestions 4;/set aspell.check.enabled on;/unalias setup_aspell;/save"
|
||||
shrug = "/msg $channel ¯\_(ツ)_/¯"
|
||||
SIGNOFF = "quit"
|
||||
SLAP = "me slaps $1 around a bit with a large trout"
|
||||
T = "topic"
|
||||
tf = "/msg $channel (ノಥ益ಥ)ノ彡┻━┻"
|
||||
|
|
|
@ -181,7 +181,7 @@ tilde.local_hostname
|
|||
tilde.usermode
|
||||
tilde.command = "/oper root ${sec.data.tildenetoper}; /msg operserv login ${sec.data.pass}"
|
||||
tilde.command_delay
|
||||
tilde.autojoin = "#meta,#chaos,#opers,#secret-sudoers,#team,#sudoers,#yourtilde,#bots,#music,#politics,#gopher,#tildeverse,#idlerpg,#tilderadio,#minecraft,#tildelinux,#slbr,#cosmic,#institute,#.tilde,#tildetel,#dcss,#center,#thunix,#theasylum,#minetest,#aussie,#uucp,#projects,#hamradio,#vim,#black,#pink,#modded,#admin,#vh7,#cervezafria,#~ :10:20,:57:60"
|
||||
tilde.autojoin = "#meta,#chaos,#opers,#secret-sudoers,#team,#sudoers,#yourtilde,#bots,#music,#politics,#gopher,#tildeverse,#idlerpg,#tilderadio,#minecraft,#tildelinux,#slbr,#cosmic,#institute,#.tilde,#tildetel,#dcss,#center,#thunix,#theasylum,#minetest,#aussie,#uucp,#projects,#hamradio,#vim,#black,#pink,#modded,#admin,#vh7,#cervezafria,#~,#netnews :10:20,:57:60"
|
||||
tilde.autorejoin
|
||||
tilde.autorejoin_delay
|
||||
tilde.connection_timeout
|
||||
|
@ -222,7 +222,7 @@ hashbang.local_hostname
|
|||
hashbang.usermode
|
||||
hashbang.command = "/oper benharri x"
|
||||
hashbang.command_delay
|
||||
hashbang.autojoin = "#!opers,#!git,#!support,#!politics,#!os,#!social,#!"
|
||||
hashbang.autojoin = "#!,#!social,#!os,#!politics,#!support,#!git,#!opers"
|
||||
hashbang.autorejoin
|
||||
hashbang.autorejoin_delay
|
||||
hashbang.connection_timeout
|
||||
|
@ -427,7 +427,7 @@ oftc.local_hostname
|
|||
oftc.usermode
|
||||
oftc.command
|
||||
oftc.command_delay
|
||||
oftc.autojoin = "#debian-devel,#fish"
|
||||
oftc.autojoin = "#fish,#debian-devel"
|
||||
oftc.autorejoin
|
||||
oftc.autorejoin_delay
|
||||
oftc.connection_timeout
|
||||
|
@ -550,7 +550,7 @@ inspircd.local_hostname
|
|||
inspircd.usermode
|
||||
inspircd.command
|
||||
inspircd.command_delay
|
||||
inspircd.autojoin = "#inspircd 10"
|
||||
inspircd.autojoin = "#inspircd.dev,#inspircd 10,10"
|
||||
inspircd.autorejoin
|
||||
inspircd.autorejoin_delay
|
||||
inspircd.connection_timeout
|
||||
|
@ -657,8 +657,8 @@ red.ssl_verify
|
|||
red.password
|
||||
red.capabilities
|
||||
red.sasl_mechanism
|
||||
red.sasl_username
|
||||
red.sasl_password
|
||||
red.sasl_username = "ben"
|
||||
red.sasl_password = "${sec.data.pass}"
|
||||
red.sasl_key
|
||||
red.sasl_timeout
|
||||
red.sasl_fail
|
||||
|
|
|
@ -171,7 +171,7 @@ python.urlserver.color_in_msg = "color for urls displayed inside irc message: it
|
|||
python.urlserver.debug = "print some debug messages (default: "off")"
|
||||
python.urlserver.display_urls = "display URLs below messages (default: "on")"
|
||||
python.urlserver.display_urls_in_msg = "add shorten url next to the original url (only in IRC messages) (useful for urlserver behind relay/irc) (default: "off")"
|
||||
python.urlserver.http_allowed_ips = "regex for IPs allowed to use server (example: "^(123.45.67.89|192.160.*)$") (default: "")"
|
||||
python.urlserver.http_allowed_ips = "regex for IPs allowed to use server (example: "^(123\.45\.67\.89|192\.160\..*)$") (default: "")"
|
||||
python.urlserver.http_auth = "login and password (format: "login:password") required to access to page with list of URLs (note: content is evaluated, see /help eval) (default: "")"
|
||||
python.urlserver.http_auth_redirect = "require the login/password (if option "http_auth" is set) for URLs redirections (default: "on")"
|
||||
python.urlserver.http_autostart = "start the built-in HTTP server automatically) (default: "on")"
|
||||
|
|
|
@ -1,125 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Copyright (c) 2009 by xt <xt@bash.no>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
#
|
||||
# (this script requires WeeChat 0.3.0 or newer)
|
||||
#
|
||||
# History:
|
||||
# 2018-10-03, Pol Van Aubel <dev@polvanaubel.com>
|
||||
# version 0.7: Python3 compatibility. Considerations:
|
||||
# - Settings during registration are iterated over only once, so
|
||||
# code should be succinct rather than efficient on both Py2/3.
|
||||
# - The autojoin_keys zip is turned into a dict, so wouldn't
|
||||
# make sense to first turn into a list as futurize suggests.
|
||||
# 2015-10-11, Simmo Saan <simmo.saan@gmail.com>
|
||||
# version 0.6: allow joining channels with keys in autojoin
|
||||
# 2013-12-21, Sebastien Helleu <flashcode@flashtux.org>
|
||||
# version 0.5: fix parsing of INVITE message
|
||||
# 2013-11-28, sakkemo <scajanus@gmail.com>
|
||||
# version 0.4: add whitelist for nicks/channels
|
||||
# 2009-11-09, xt <xt@bash.no>
|
||||
# version 0.3: add ignore option for channels
|
||||
# 2009-10-29, xt <xt@bash.no>
|
||||
# version 0.2: add ignore option
|
||||
# 2009-10-28, xt <xt@bash.no>
|
||||
# version 0.1: initial release
|
||||
|
||||
import weechat as w
|
||||
import re
|
||||
|
||||
SCRIPT_NAME = "autojoin_on_invite"
|
||||
SCRIPT_AUTHOR = "xt <xt@bash.no>"
|
||||
SCRIPT_VERSION = "0.7"
|
||||
SCRIPT_LICENSE = "GPL3"
|
||||
SCRIPT_DESC = "Auto joins channels when invited"
|
||||
|
||||
# script options
|
||||
settings = {
|
||||
'whitelist_nicks': '', # comma separated list of nicks,
|
||||
# overrides ignore_nicks
|
||||
'whitelist_channels': '', # comma separated list of channels,
|
||||
# overrides ignore_channels
|
||||
'ignore_nicks': '', # comma separated list of nicks
|
||||
#that we will not accept auto invite from
|
||||
'ignore_channels': '', # comma separated list of channels to not join
|
||||
'autojoin_key': 'on', # use channel keys from server's autojoin list
|
||||
}
|
||||
|
||||
if w.register(SCRIPT_NAME, SCRIPT_AUTHOR, SCRIPT_VERSION, SCRIPT_LICENSE,
|
||||
SCRIPT_DESC, "", ""):
|
||||
for option, default_value in settings.items():
|
||||
if not w.config_is_set_plugin(option):
|
||||
w.config_set_plugin(option, default_value)
|
||||
|
||||
w.hook_signal('*,irc_in2_invite', 'invite_cb', '')
|
||||
|
||||
def join(server, channel):
|
||||
key = None
|
||||
|
||||
if w.config_string_to_boolean(w.config_get_plugin('autojoin_key')):
|
||||
autojoin = w.config_string(w.config_get('irc.server.%s.autojoin' % server)).split(' ', 1)
|
||||
|
||||
if len(autojoin) > 1: # any keys specified
|
||||
autojoin_keys = dict(zip(autojoin[0].split(','), autojoin[1].split(',')))
|
||||
key = autojoin_keys.get(channel) # defaults to None when not set
|
||||
|
||||
if key:
|
||||
w.command('', '/quote -server %s JOIN %s %s' % (server, channel, key))
|
||||
else:
|
||||
w.command('', '/quote -server %s JOIN %s' % (server, channel))
|
||||
|
||||
def invite_cb(data, signal, signal_data):
|
||||
server = signal.split(',')[0] # EFNet,irc_in_INVITE
|
||||
channel = signal_data.split()[-1].lstrip(':') # :nick!ident@host.name INVITE yournick :#channel
|
||||
from_nick = re.match(':(?P<nick>.+)!', signal_data).groups()[0]
|
||||
|
||||
if len(w.config_get_plugin('whitelist_nicks')) > 0 and len(w.config_get_plugin('whitelist_channels')) > 0: # if there's two whitelists, accept both
|
||||
if from_nick in w.config_get_plugin('whitelist_nicks').split(',') or channel in w.config_get_plugin('whitelist_channels').split(','):
|
||||
w.prnt('', 'Automatically joining %s on server %s, invitation from %s (whitelist).' \
|
||||
%(channel, server, from_nick))
|
||||
join(server, channel)
|
||||
else:
|
||||
w.prnt('', 'Ignoring invite from %s to channel %s. Neither inviter nor channel in whitelist.' %(from_nick, channel))
|
||||
|
||||
elif len(w.config_get_plugin('whitelist_nicks')) > 0: # if there's a whitelist, accept nicks in it
|
||||
if from_nick in w.config_get_plugin('whitelist_nicks').split(','):
|
||||
w.prnt('', 'Automatically joining %s on server %s, invitation from %s (whitelist).' \
|
||||
%(channel, server, from_nick))
|
||||
join(server, channel)
|
||||
else:
|
||||
w.prnt('', 'Ignoring invite from %s to channel %s. Inviter not in whitelist.' %(from_nick, channel))
|
||||
|
||||
elif len(w.config_get_plugin('whitelist_channels')) > 0: # if there's a whitelist, accept channels in it
|
||||
if channel in w.config_get_plugin('whitelist_channels').split(','):
|
||||
w.prnt('', 'Automatically joining %s on server %s, invitation from %s (whitelist).' \
|
||||
%(channel, server, from_nick))
|
||||
join(server, channel)
|
||||
else:
|
||||
w.prnt('', 'Ignoring invite from %s to channel %s. Channel not in whitelist.' %(from_nick, channel))
|
||||
|
||||
else: # use the ignore lists to make the decision
|
||||
if from_nick in w.config_get_plugin('ignore_nicks').split(','):
|
||||
w.prnt('', 'Ignoring invite from %s to channel %s. Invite from ignored inviter.' %(from_nick, channel))
|
||||
elif channel in w.config_get_plugin('ignore_channels').split(','):
|
||||
w.prnt('', 'Ignoring invite from %s to channel %s. Invite to ignored channel.' %(from_nick, channel))
|
||||
else:
|
||||
w.prnt('', 'Automatically joining %s on server %s, invitation from %s.' \
|
||||
%(channel, server, from_nick))
|
||||
join(server, channel)
|
||||
|
||||
return w.WEECHAT_RC_OK
|
|
@ -1 +0,0 @@
|
|||
../autojoin_on_invite.py
|
|
@ -47,6 +47,11 @@ backlog_since_last_message = off
|
|||
backlog_tags = "irc_privmsg"
|
||||
backlog_time_format = "[%H:%M] "
|
||||
|
||||
[weechat]
|
||||
commands = ""
|
||||
|
||||
[port]
|
||||
irc = 6666
|
||||
weechat = 9090
|
||||
|
||||
[path]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# weechat -- aspell.conf
|
||||
# weechat -- spell.conf
|
||||
#
|
||||
# WARNING: It is NOT recommended to edit this file by hand,
|
||||
# especially if WeeChat is running.
|
||||
|
@ -17,11 +17,11 @@ suggestion_delimiter_word = cyan
|
|||
|
||||
[check]
|
||||
commands = "ame,amsg,away,command,cycle,kick,kickban,me,msg,notice,part,query,quit,topic"
|
||||
default_dict = ""
|
||||
default_dict = "en"
|
||||
during_search = off
|
||||
enabled = off
|
||||
enabled = on
|
||||
real_time = off
|
||||
suggestions = -1
|
||||
suggestions = 2
|
||||
word_min_length = 2
|
||||
|
||||
[dict]
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
|
||||
}
|
|
@ -35,6 +35,7 @@ buffer_search_force_default = off
|
|||
buffer_search_regex = off
|
||||
buffer_search_where = prefix_message
|
||||
buffer_time_format = "${color:250}%H${color:lightcyan}:${color:245}%M${color:lightcyan}:${color:240}%S"
|
||||
buffer_time_same = ""
|
||||
color_basic_force_bold = off
|
||||
color_inactive_buffer = on
|
||||
color_inactive_message = on
|
||||
|
@ -111,6 +112,7 @@ prefix_join = "-->"
|
|||
prefix_network = "--"
|
||||
prefix_quit = "<--"
|
||||
prefix_same_nick = "⤷"
|
||||
prefix_same_nick_middle = ""
|
||||
prefix_suffix = "│"
|
||||
quote_nick_prefix = "<"
|
||||
quote_nick_suffix = ">"
|
||||
|
@ -158,7 +160,7 @@ chat_nick_offline_highlight = default
|
|||
chat_nick_offline_highlight_bg = blue
|
||||
chat_nick_other = cyan
|
||||
chat_nick_prefix = green
|
||||
chat_nick_self = blue
|
||||
chat_nick_self = *blue
|
||||
chat_nick_suffix = green
|
||||
chat_prefix_action = white
|
||||
chat_prefix_buffer = brown
|
||||
|
@ -320,7 +322,7 @@ rootstatus.conditions = ""
|
|||
rootstatus.filling_left_right = vertical
|
||||
rootstatus.filling_top_bottom = horizontal
|
||||
rootstatus.hidden = off
|
||||
rootstatus.items = "[time],[buffer_last_number],[buffer_plugin],buffer_number+:+buffer_name+(buffer_modes)+{buffer_nicklist_count}+buffer_zoom+buffer_filter,[lag],[hotlist],(mouse_status),completion,scroll"
|
||||
rootstatus.items = "[buffer_last_number],[buffer_plugin],buffer_number+:+buffer_name+(buffer_modes)+{buffer_nicklist_count}+buffer_zoom+buffer_filter,[lag],spell_suggest,[hotlist],(mouse_status),completion,scroll"
|
||||
rootstatus.position = bottom
|
||||
rootstatus.priority = 25
|
||||
rootstatus.separator = off
|
||||
|
@ -354,7 +356,7 @@ default.current = on
|
|||
irc.bitlbee = highlight
|
||||
|
||||
[filter]
|
||||
irc_smart = on;irc.freenode.#git;irc_smart_filter;*
|
||||
irc_smart = on;*;irc_smart_filter;*
|
||||
|
||||
[key]
|
||||
ctrl-? = "/input delete_previous_char"
|
||||
|
@ -591,7 +593,7 @@ meta-m = "/mute mouse toggle"
|
|||
meta-n = "/window scroll_next_highlight"
|
||||
meta-p = "/window scroll_previous_highlight"
|
||||
meta-r = "/input delete_line"
|
||||
meta-s = "/mute aspell toggle"
|
||||
meta-s = "/mute spell toggle"
|
||||
meta-u = "/window scroll_unread"
|
||||
meta-wmeta-meta2-A = "/window up"
|
||||
meta-wmeta-meta2-B = "/window down"
|
||||
|
|
|
@ -31,7 +31,8 @@ fast_send = on
|
|||
own_ip = "172.93.50.135"
|
||||
port_range = "2010-2015"
|
||||
send_ack = on
|
||||
speed_limit = 0
|
||||
speed_limit_recv = 0
|
||||
speed_limit_send = 0
|
||||
timeout = 300
|
||||
|
||||
[file]
|
||||
|
|
Loading…
Reference in New Issue