aboutsummaryrefslogtreecommitdiffstats
path: root/weechat
diff options
context:
space:
mode:
Diffstat (limited to 'weechat')
-rw-r--r--weechat/alias.conf2
-rw-r--r--weechat/irc.conf6
l---------weechat/perl/autoload/yaurls.pl1
-rw-r--r--weechat/plugins.conf125
-rw-r--r--weechat/python/anotify.py470
l---------weechat/python/autoload/anotify.py1
l---------weechat/python/autoload/listbuffer.py1
-rw-r--r--weechat/relay.conf1
-rw-r--r--weechat/script.conf2
-rw-r--r--weechat/script/plugins.xml.gzbin0 -> 90543 bytes
10 files changed, 30 insertions, 579 deletions
diff --git a/weechat/alias.conf b/weechat/alias.conf
index 7c22685..1c527fd 100644
--- a/weechat/alias.conf
+++ b/weechat/alias.conf
@@ -14,6 +14,7 @@ C = "buffer clear"
CHAT = "dcc chat"
CL = "buffer clear"
CLOSE = "buffer close"
+CS = "/quote ChanServ"
EXIT = "quit"
ig = "filter add ignore_$1 *.$server.* nick_$1 *"
irc-analogy = "/input insert an IRC server is like a shopping mall. It provides space for various shops. While the mall owner (read: the server's staff) might control some of the shops (read: channels), most of them are 'owned' (registered) by individual parties (channel founders). Each of the shops (channels) usually have their own subject/topic of conversation and their own rules and guidelines. All of the shops (channels) can be reached via the main entrance (any IRC client connected to the server's address), but some of them might have their own entrance (an IRC applet/client on their own website). So, the fact that you have connected through website X about subject Y, doesn't mean all other channels belong to the same website / share the same topic of conversation."
@@ -26,6 +27,7 @@ lookaround = "/input insert /me looks around ('-' ) (._. ) (o_o) ( ._.) ( '-')"
M = "msg"
MUB = "unban *"
N = "names"
+NS = "/quote NickServ"
Q = "query"
qt = "disconnect -all ;quit"
REDRAW = "window refresh"
diff --git a/weechat/irc.conf b/weechat/irc.conf
index a254002..71f76c4 100644
--- a/weechat/irc.conf
+++ b/weechat/irc.conf
@@ -26,14 +26,14 @@ highlight_pv = "$nick"
highlight_server = "$nick"
highlight_tags_restrict = "irc_privmsg,irc_notice"
item_away_message = on
-item_channel_modes_hide_key = off
+item_channel_modes_hide_key = on
item_display_server = buffer_plugin
item_nick_modes = on
item_nick_prefix = on
msgbuffer_fallback = current
new_channel_position = none
new_pv_position = none
-nick_color_force = ""
+nick_color_force = "tigr:lightblue;tigrmesh:lightblue;Earnestly:green"
nick_color_hash = djb2
nick_color_stop_chars = "_|["
nick_completion_smart = speakers
@@ -109,7 +109,7 @@ autorejoin = off
autorejoin_delay = 30
away_check = 0
away_check_max_nicks = 25
-capabilities = "znc.in/server-time-iso"
+capabilities = "multi-prefix,userhost-in-names,znc.in/server-time-iso"
command = ""
command_delay = 0
connection_timeout = 60
diff --git a/weechat/perl/autoload/yaurls.pl b/weechat/perl/autoload/yaurls.pl
deleted file mode 120000
index c7dbf0c..0000000
--- a/weechat/perl/autoload/yaurls.pl
+++ /dev/null
@@ -1 +0,0 @@
-../yaurls.pl \ No newline at end of file
diff --git a/weechat/plugins.conf b/weechat/plugins.conf
index 70d1628..3747abf 100644
--- a/weechat/plugins.conf
+++ b/weechat/plugins.conf
@@ -33,6 +33,12 @@ perl.buddylist.text.offline = ""
perl.buddylist.text.online = ""
perl.buddylist.use.redirection = "on"
perl.check_license = "on"
+perl.colorize_lines.blacklist_buffers = ""
+perl.colorize_lines.buffers = "all"
+perl.colorize_lines.highlight = "on"
+perl.colorize_lines.lines = "on"
+perl.colorize_lines.nicks = ""
+perl.colorize_lines.own_lines = "on"
perl.highmon.alignment = "channel,nick"
perl.highmon.away_only = "off"
perl.highmon.bar_lines = "3"
@@ -46,7 +52,7 @@ perl.highmon.nick_suffix = ">"
perl.highmon.output = "bar"
perl.highmon.short_names = "on"
perl.isgd.auto = "on"
-perl.isgd.auto_min_length = "40"
+perl.isgd.auto_min_length = "90"
perl.isgd.color = "white"
perl.listsort.max_size = "100"
perl.mplex.away_msg = "Detached head"
@@ -67,10 +73,6 @@ perl.multiline.paste_lock = "1"
perl.multiline.send_empty = "on"
perl.multiline.tab = "──▶▏"
perl.multiline.weechat_paste_fix = "on"
-perl.notify_send.command = "notify-send $type: $name"
-perl.notify_send.ignore_nicks = ""
-perl.notify_send.wait_highlight = "60"
-perl.notify_send.wait_pm = "180"
perl.stalker.additional_join_info = "off"
perl.stalker.db_name = "%h/nicks.db"
perl.stalker.debug = "off"
@@ -78,7 +80,7 @@ perl.stalker.flood_max_nicks = "20"
perl.stalker.flood_timer = "10"
perl.stalker.guest_host_regex = "^webchat"
perl.stalker.guest_nick_regex = "^(guest|weebot|Floodbot|ChanServ).*"
-perl.stalker.ignore_guest_hosts = "off"
+perl.stalker.ignore_guest_hosts = "on"
perl.stalker.ignore_guest_nicks = "on"
perl.stalker.ignore_nickchange = "off"
perl.stalker.ignore_whois = "off"
@@ -105,20 +107,6 @@ python.announce_url_title.suffix = ""
python.announce_url_title.title_max_length = "80"
python.announce_url_title.url_ignore = ""
python.announce_url_title.user_agent = "WeeChat/%(version)s (http://www.weechat.org)"
-python.anotify.icon = "/usr/share/pixmaps/weechat.xpm"
-python.anotify.show_channel_topic = "on"
-python.anotify.show_dcc = "on"
-python.anotify.show_highlighted_message = "on"
-python.anotify.show_invite_message = "on"
-python.anotify.show_notice_message = "off"
-python.anotify.show_private_action_message = "on"
-python.anotify.show_private_message = "on"
-python.anotify.show_public_action_message = "off"
-python.anotify.show_public_message = "off"
-python.anotify.show_server = "on"
-python.anotify.show_upgrade_ended = "on"
-python.anotify.sticky = "off"
-python.anotify.sticky_away = "on"
python.chanop.autodeop = "on"
python.chanop.autodeop_delay = "60"
python.chanop.default_banmask = "host"
@@ -128,8 +116,7 @@ python.chanop.enable_multi_kick = "off"
python.chanop.enable_remove = "off"
python.chanop.kick_reason = ""
python.chanop.op_command = "/msg chanserv op $channel $nick"
-python.chanop.watchlist.foonetic = "#0"
-python.chanop.watchlist.freenode = "#kyriasis,##archlinux-botabuse,#archlinux,#archlinux-offtopic"
+python.chanop.watchlist.freenode = "##archlinux-botabuse,#archlinux-offtopic,#kyriasis,#archlinux"
python.check_license = "on"
python.colorize_nicks.blacklist_channels = ""
python.colorize_nicks.blacklist_nicks = "so,root"
@@ -153,60 +140,24 @@ python.listbuffer.modes_min_width = "8"
python.listbuffer.sort_inverted = "on"
python.listbuffer.sort_order = "users"
python.listbuffer.users_min_width = "8"
-python.lnotify.show_highlight = "on"
-python.lnotify.show_icon = "weechat"
-python.lnotify.show_priv_msg = "on"
+python.notify.icon = "/usr/share/pixmaps/weechat.xpm"
+python.notify.ignore_nicks_startwith = "*"
+python.notify.nick_separator = ": "
+python.notify.notify_when_away = "off"
+python.notify.show_hilights = "on"
+python.notify.show_priv_msg = "on"
+python.notify.smart_notification = "off"
+python.notify.urgency = "normal"
python.tinyurl.debug = "off"
python.tinyurl.printall = "on"
python.tinyurl.service = "tinyurl"
python.tinyurl.urllength = "30"
python.title.short_name = "on"
python.title.title_priority = "2"
-python.urlserver.buffer_short_name = "off"
-python.urlserver.color = "darkgray"
-python.urlserver.color_in_msg = ""
-python.urlserver.debug = "off"
-python.urlserver.display_urls = "on"
-python.urlserver.display_urls_in_msg = "off"
-python.urlserver.http_allowed_ips = ""
-python.urlserver.http_auth = ""
-python.urlserver.http_autostart = "on"
-python.urlserver.http_bg_color = "#f4f4f4"
-python.urlserver.http_css_url = ""
-python.urlserver.http_embed_image = "off"
-python.urlserver.http_embed_youtube = "off"
-python.urlserver.http_embed_youtube_size = "480*350"
-python.urlserver.http_fg_color = "#000"
-python.urlserver.http_hostname = ""
-python.urlserver.http_hostname_display = ""
-python.urlserver.http_port = ""
-python.urlserver.http_port_display = ""
-python.urlserver.http_prefix_suffix = " "
-python.urlserver.http_scheme_display = "http"
-python.urlserver.http_time_format = "%d/%m/%y %H:%M:%S"
-python.urlserver.http_title = "WeeChat URLs"
-python.urlserver.http_url_prefix = ""
-python.urlserver.msg_ignore_buffers = "core.weechat,python.grep"
-python.urlserver.msg_ignore_dup_urls = "off"
-python.urlserver.msg_ignore_regex = ""
-python.urlserver.msg_ignore_tags = "irc_quit,irc_part,notify_none"
-python.urlserver.msg_require_tags = "nick_"
-python.urlserver.separators = "[|]"
-python.urlserver.url_min_length = "0"
-python.urlserver.urls_amount = "100"
python.whois_on_query.command = "/whois $nick $nick"
python.whois_on_query.self_query = "off"
ruby.check_license = "on"
tcl.check_license = "on"
-tcl.xosdnotify.align = "left bottom"
-tcl.xosdnotify.blink = "on"
-tcl.xosdnotify.blink_count = "4"
-tcl.xosdnotify.blink_interval = "700"
-tcl.xosdnotify.color = "#ffff00"
-tcl.xosdnotify.encoding = "utf-8"
-tcl.xosdnotify.font = "-*-fixed-*-*-*-*-*-200-*-*-*-*-*-*"
-tcl.xosdnotify.lines = "1"
-tcl.xosdnotify.offset = "16 16"
[desc]
perl.buddylist.buddy.on.server = "show buddy who is connected to a server, but not visiting the same channel(s) (default: on)"
@@ -235,6 +186,12 @@ perl.buddylist.text.color = "color for optional online/away/offline-text in budd
perl.buddylist.text.offline = "optional offline text in buddylist (sort method has to be 'status')"
perl.buddylist.text.online = "optional online text in buddylist (sort method has to be 'status')"
perl.buddylist.use.redirection = "using redirection to get status of buddies (needs weechat >=0.3.4) (default: on)"
+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.highlight = "apply highlight color to the highlighted lines (off/on/nicks). the latter will limit highlighting to nicknames in option 'nicks'"
+perl.colorize_lines.lines = "apply nickname color to the lines (off/on/nicks). the latter will limit highlighting to nicknames in option 'nicks'"
+perl.colorize_lines.nicks = "comma-separater list of nicks (e.g. freenode.cat,*.dog) OR file name starting with '/' (e.g. /file.txt). in the latter case, nicknames will get loaded from that file inside weechat folder (e.g. from ~/.weechat/file.txt). nicknames in file are newline-separated (e.g. freenode.dog\n*.cat)"
+perl.colorize_lines.own_lines = "apply nickname color to own lines (off/on/only). the latter turns off all other kinds of coloring altogether"
perl.isgd.auto = "Shorten all incoming URLs automatically (default: "off")"
perl.isgd.auto_min_length = "Only shorten incoming URLs automatically which have this minimum length (default: "1")"
perl.isgd.color = "Color used for printing shortened URLs (default: "white")"
@@ -251,10 +208,6 @@ perl.multiline.paste_lock = "time-out to detect pastes (disable the weechat buil
perl.multiline.send_empty = "set to on to automatically disregard enter key on empty line"
perl.multiline.tab = "character(s) which should be displayed instead of Tab key character"
perl.multiline.weechat_paste_fix = "disable ctrl-J binding when paste is detected to stop silly weechat sending out pastes without allowing to edit them"
-perl.notify_send.command = "system command to be executed ($type, $name, and $message will be interpreted as values) (default: "notify-send $type: $name")"
-perl.notify_send.ignore_nicks = "comma-separated list of nicks to ignore (default: "")"
-perl.notify_send.wait_highlight = "necessary time delay between highlights (seconds) for command to be executed (default: "60")"
-perl.notify_send.wait_pm = "necessary time delay between private messages (seconds) for command to be executed (default: "180")"
perl.stalker.additional_join_info = "add a line below the JOIN message that will display alternative nicks (tags: "irc_join", "irc_smart_filter" will be add to additional_join_info). You can use a localvar to drop additional join info for specific buffer(s) "stalker_drop_additional_join_info" (default: off)"
perl.stalker.db_name = "file containing the SQLite database where information is recorded. This database is created on loading of stalker if it does not exist. ("%h" will be replaced by WeeChat home, "~/.weechat" by default) (default: %h/nicks.db)"
perl.stalker.debug = "Prints debug output to core buffer so you know exactly what is going on. This is far too verbose to be enabled when not actively debugging something. (default: off)"
@@ -283,37 +236,5 @@ python.listbuffer.modes_min_width = "The minimum width used for modes in the cha
python.listbuffer.sort_inverted = "Invert the sort order for the channel list."
python.listbuffer.sort_order = "Last used sort order for the channel list."
python.listbuffer.users_min_width = "The minimum width used for the usercount in the channel list. If the usercount has less digits than this amount, the column will be padded with spaces."
-python.urlserver.buffer_short_name = "use buffer short name on dedicated buffer (default: "off")"
-python.urlserver.color = "color for urls displayed after message (default: "darkgray")"
-python.urlserver.color_in_msg = "color for urls displayed inside irc message: it is a number (irc color) between 00 and 15 (see doc for a list of irc colors) (default: "")"
-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_auth = "login and password (format: "login:password") required to access to page with list of URLs (default: "")"
-python.urlserver.http_autostart = "start the built-in HTTP server automatically) (default: "on")"
-python.urlserver.http_bg_color = "background color for HTML page (default: "#f4f4f4")"
-python.urlserver.http_css_url = "URL of external Cascading Style Sheet to add (BE CAREFUL: the HTTP referer will be sent to site hosting CSS file!) (empty value = use default embedded CSS) (default: "")"
-python.urlserver.http_embed_image = "embed images in HTML page (BE CAREFUL: the HTTP referer will be sent to site hosting image!) (default: "off")"
-python.urlserver.http_embed_youtube = "embed youtube videos in HTML page (BE CAREFUL: the HTTP referer will be sent to youtube!) (default: "off")"
-python.urlserver.http_embed_youtube_size = "size for embedded youtube video, format is "xxx*yyy" (default: "480*350")"
-python.urlserver.http_fg_color = "foreground color for HTML page (default: "#000")"
-python.urlserver.http_hostname = "force hostname/IP in bind of socket (empty value = auto-detect current hostname) (default: "")"
-python.urlserver.http_hostname_display = "display this hostname in shortened URLs (default: "")"
-python.urlserver.http_port = "force port for listening (empty value = find a random free port) (default: "")"
-python.urlserver.http_port_display = "display this port in shortened URLs. Useful if you forward a different external port to the internal port (default: "")"
-python.urlserver.http_prefix_suffix = "suffix displayed between prefix and message in HTML page (default: " ")"
-python.urlserver.http_scheme_display = "display this scheme in shortened URLs (default: "http")"
-python.urlserver.http_time_format = "time format in the HTML page (default: "%d/%m/%y %H:%M:%S")"
-python.urlserver.http_title = "title of the HTML page (default: "WeeChat URLs")"
-python.urlserver.http_url_prefix = "prefix to add in URLs to prevent external people to scan your URLs (for example: prefix "xx" will give URL: http://host.com:1234/xx/8) (default: "")"
-python.urlserver.msg_ignore_buffers = "comma-separated list (without spaces) of buffers to ignore (full name like "irc.freenode.#weechat") (default: "core.weechat,python.grep")"
-python.urlserver.msg_ignore_dup_urls = "ignore duplicated URLs (do not add an URL in list if it is already) (default: "off")"
-python.urlserver.msg_ignore_regex = "ignore messages matching this regex (default: "")"
-python.urlserver.msg_ignore_tags = "comma-separated list (without spaces) of tags (or beginning of tags) to ignore (for example, use "notify_none" to ignore self messages or "nick_weebot" to ignore messages from nick "weebot") (default: "irc_quit,irc_part,notify_none")"
-python.urlserver.msg_require_tags = "comma-separated list (without spaces) of tags (or beginning of tags) required to shorten URLs (for example "nick_" to shorten URLs only in messages from other users) (default: "nick_")"
-python.urlserver.separators = "separators for short url list (string with exactly 3 chars) (default: "[|]")"
-python.urlserver.url_min_length = "minimum length for an URL to be shortened (0 = shorten all URLs, -1 = detect length based on shorten URL) (default: "0")"
-python.urlserver.urls_amount = "number of URLs to keep in memory (and in file when script is not loaded) (default: "100")"
python.whois_on_query.command = "the command sent to do the whois ($nick is repladed by nick) (default: "/whois $nick $nick")"
python.whois_on_query.self_query = "if on, send whois for self queries (default: "off")"
diff --git a/weechat/python/anotify.py b/weechat/python/anotify.py
deleted file mode 100644
index 19e2445..0000000
--- a/weechat/python/anotify.py
+++ /dev/null
@@ -1,470 +0,0 @@
-# -*- coding: utf-8 -*-
-#
-# anotify.py
-# Copyright (c) 2012 magnific0 <jacco.geul@gmail.com>
-#
-# based on:
-# growl.py
-# Copyright (c) 2011 Sorin Ionescu <sorin.ionescu@gmail.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-
-
-SCRIPT_NAME = 'anotify'
-SCRIPT_AUTHOR = 'magnific0'
-SCRIPT_VERSION = '1.0.0'
-SCRIPT_LICENSE = 'MIT'
-SCRIPT_DESC = 'Sends libnotify notifications upon events.'
-
-
-# Changelog
-# 2012-09-20: v1.0.0 Forked from original and adapted for libnotify.
-
-# -----------------------------------------------------------------------------
-# Settings
-# -----------------------------------------------------------------------------
-SETTINGS = {
- 'show_public_message': 'off',
- 'show_private_message': 'on',
- 'show_public_action_message': 'off',
- 'show_private_action_message': 'on',
- 'show_notice_message': 'off',
- 'show_invite_message': 'on',
- 'show_highlighted_message': 'on',
- 'show_server': 'on',
- 'show_channel_topic': 'on',
- 'show_dcc': 'on',
- 'show_upgrade_ended': 'on',
- 'sticky': 'off',
- 'sticky_away': 'on',
- 'icon': '/usr/share/pixmaps/weechat.xpm',
-}
-
-
-# -----------------------------------------------------------------------------
-# Imports
-# -----------------------------------------------------------------------------
-try:
- import re
- import os
- import weechat
- import pynotify
- IMPORT_OK = True
-except ImportError as error:
- IMPORT_OK = False
- if str(error).find('weechat') != -1:
- print('This script must be run under WeeChat.')
- print('Get WeeChat at http://www.weechat.org.')
- else:
- weechat.prnt('', 'anotify: {0}'.format(error))
-
-# -----------------------------------------------------------------------------
-# Globals
-# -----------------------------------------------------------------------------
-TAGGED_MESSAGES = {
- 'public message or action': set(['irc_privmsg', 'notify_message']),
- 'private message or action': set(['irc_privmsg', 'notify_private']),
- 'notice message': set(['irc_notice', 'notify_private']),
- 'invite message': set(['irc_invite', 'notify_highlight']),
- 'channel topic': set(['irc_topic', ]),
- #'away status': set(['away_info', ]),
-}
-
-
-UNTAGGED_MESSAGES = {
- 'away status':
- re.compile(r'^You ((\w+).){2,3}marked as being away', re.UNICODE),
- 'dcc chat request':
- re.compile(r'^xfer: incoming chat request from (\w+)', re.UNICODE),
- 'dcc chat closed':
- re.compile(r'^xfer: chat closed with (\w+)', re.UNICODE),
- 'dcc get request':
- re.compile(
- r'^xfer: incoming file from (\w+) [^:]+: ((?:,\w|[^,])+),',
- re.UNICODE),
- 'dcc get completed':
- re.compile(r'^xfer: file ([^\s]+) received from \w+: OK', re.UNICODE),
- 'dcc get failed':
- re.compile(
- r'^xfer: file ([^\s]+) received from \w+: FAILED',
- re.UNICODE),
- 'dcc send completed':
- re.compile(r'^xfer: file ([^\s]+) sent to \w+: OK', re.UNICODE),
- 'dcc send failed':
- re.compile(r'^xfer: file ([^\s]+) sent to \w+: FAILED', re.UNICODE),
-}
-
-
-DISPATCH_TABLE = {
- 'away status': 'set_away_status',
- 'public message or action': 'notify_public_message_or_action',
- 'private message or action': 'notify_private_message_or_action',
- 'notice message': 'notify_notice_message',
- 'invite message': 'notify_invite_message',
- 'channel topic': 'notify_channel_topic',
- 'dcc chat request': 'notify_dcc_chat_request',
- 'dcc chat closed': 'notify_dcc_chat_closed',
- 'dcc get request': 'notify_dcc_get_request',
- 'dcc get completed': 'notify_dcc_get_completed',
- 'dcc get failed': 'notify_dcc_get_failed',
- 'dcc send completed': 'notify_dcc_send_completed',
- 'dcc send failed': 'notify_dcc_send_failed',
-}
-
-
-STATE = {
- 'icon': None,
- 'is_away': False
-}
-
-
-# -----------------------------------------------------------------------------
-# Notifiers
-# -----------------------------------------------------------------------------
-def cb_irc_server_connected(data, signal, signal_data):
- '''Notify when connected to IRC server.'''
- if weechat.config_get_plugin('show_server') == 'on':
- a_notify(
- 'Server',
- 'Server Connected',
- 'Connected to network {0}.'.format(signal_data))
- return weechat.WEECHAT_RC_OK
-
-
-def cb_irc_server_disconnected(data, signal, signal_data):
- '''Notify when disconnected to IRC server.'''
- if weechat.config_get_plugin('show_server') == 'on':
- a_notify(
- 'Server',
- 'Server Disconnected',
- 'Disconnected from network {0}.'.format(signal_data))
- return weechat.WEECHAT_RC_OK
-
-
-def cb_notify_upgrade_ended(data, signal, signal_data):
- '''Notify on end of WeeChat upgrade.'''
- if weechat.config_get_plugin('show_upgrade_ended') == 'on':
- a_notify(
- 'WeeChat',
- 'WeeChat Upgraded',
- 'WeeChat has been upgraded.')
- return weechat.WEECHAT_RC_OK
-
-
-def notify_highlighted_message(prefix, message):
- '''Notify on highlighted message.'''
- if weechat.config_get_plugin("show_highlighted_message") == "on":
- a_notify(
- 'Highlight',
- 'Highlighted Message',
- "{0}: {1}".format(prefix, message),
- priority=pynotify.URGENCY_CRITICAL)
-
-
-def notify_public_message_or_action(prefix, message, highlighted):
- '''Notify on public message or action.'''
- if prefix == ' *':
- regex = re.compile(r'^(\w+) (.+)$', re.UNICODE)
- match = regex.match(message)
- if match:
- prefix = match.group(1)
- message = match.group(2)
- notify_public_action_message(prefix, message, highlighted)
- else:
- if highlighted:
- notify_highlighted_message(prefix, message)
- elif weechat.config_get_plugin("show_public_message") == "on":
- a_notify(
- 'Public',
- 'Public Message',
- '{0}: {1}'.format(prefix, message))
-
-
-def notify_private_message_or_action(prefix, message, highlighted):
- '''Notify on private message or action.'''
- regex = re.compile(r'^CTCP_MESSAGE.+?ACTION (.+)$', re.UNICODE)
- match = regex.match(message)
- if match:
- notify_private_action_message(prefix, match.group(1), highlighted)
- else:
- if prefix == ' *':
- regex = re.compile(r'^(\w+) (.+)$', re.UNICODE)
- match = regex.match(message)
- if match:
- prefix = match.group(1)
- message = match.group(2)
- notify_private_action_message(prefix, message, highlighted)
- else:
- if highlighted:
- notify_highlighted_message(prefix, message)
- elif weechat.config_get_plugin("show_private_message") == "on":
- a_notify(
- 'Private',
- 'Private Message',
- '{0}: {1}'.format(prefix, message))
-
-
-def notify_public_action_message(prefix, message, highlighted):
- '''Notify on public action message.'''
- if highlighted:
- notify_highlighted_message(prefix, message)
- elif weechat.config_get_plugin("show_public_action_message") == "on":
- a_notify(
- 'Action',
- 'Public Action Message',
- '{0}: {1}'.format(prefix, message),
- priority=pynotify.URGENCY_NORMAL)
-
-
-def notify_private_action_message(prefix, message, highlighted):
- '''Notify on private action message.'''
- if highlighted:
- notify_highlighted_message(prefix, message)
- elif weechat.config_get_plugin("show_private_action_message") == "on":
- a_notify(
- 'Action',
- 'Private Action Message',
- '{0}: {1}'.format(prefix, message),
- priority=pynotify.URGENCY_NORMAL)
-
-
-def notify_notice_message(prefix, message, highlighted):
- '''Notify on notice message.'''
- regex = re.compile(r'^([^\s]*) [^:]*: (.+)$', re.UNICODE)
- match = regex.match(message)
- if match:
- prefix = match.group(1)
- message = match.group(2)
- if highlighted:
- notify_highlighted_message(prefix, message)
- elif weechat.config_get_plugin("show_notice_message") == "on":
- a_notify(
- 'Notice',
- 'Notice Message',
- '{0}: {1}'.format(prefix, message))
-
-
-def notify_invite_message(prefix, message, highlighted):
- '''Notify on channel invitation message.'''
- if weechat.config_get_plugin("show_invite_message") == "on":
- regex = re.compile(
- r'^You have been invited to ([^\s]+) by ([^\s]+)$', re.UNICODE)
- match = regex.match(message)
- if match:
- channel = match.group(1)
- nick = match.group(2)
- a_notify(
- 'Invite',
- 'Channel Invitation',
- '{0} has invited you to join {1}.'.format(nick, channel))
-
-
-def notify_channel_topic(prefix, message, highlighted):
- '''Notify on channel topic change.'''
- if weechat.config_get_plugin("show_channel_topic") == "on":
- regex = re.compile(
- r'^\w+ has (?:changed|unset) topic for ([^\s]+)' +
- '(?:(?: from "(?:(?:"\w|[^"])+)")? to "((?:"\w|[^"])+)")?',
- re.UNICODE)
- match = regex.match(message)
- if match:
- channel = match.group(1)
- topic = match.group(2) or ''
- a_notify(
- 'Channel',
- 'Channel Topic',
- "{0}: {1}".format(channel, topic))
-
-
-def notify_dcc_chat_request(match):
- '''Notify on DCC chat request.'''
- if weechat.config_get_plugin("show_dcc") == "on":
- nick = match.group(1)
- a_notify(
- 'DCC',
- 'Direct Chat Request',
- '{0} wants to chat directly.'.format(nick))
-
-
-def notify_dcc_chat_closed(match):
- '''Notify on DCC chat termination.'''
- if weechat.config_get_plugin("show_dcc") == "on":
- nick = match.group(1)
- a_notify(
- 'DCC',
- 'Direct Chat Ended',
- 'Direct chat with {0} has ended.'.format(nick))
-
-
-def notify_dcc_get_request(match):
- 'Notify on DCC get request.'
- if weechat.config_get_plugin("show_dcc") == "on":
- nick = match.group(1)
- file_name = match.group(2)
- a_notify(
- 'DCC',
- 'File Transfer Request',
- '{0} wants to send you {1}.'.format(nick, file_name))
-
-
-def notify_dcc_get_completed(match):
- 'Notify on DCC get completion.'
- if weechat.config_get_plugin("show_dcc") == "on":
- file_name = match.group(1)
- a_notify('DCC', 'Download Complete', file_name)
-
-
-def notify_dcc_get_failed(match):
- 'Notify on DCC get failure.'
- if weechat.config_get_plugin("show_dcc") == "on":
- file_name = match.group(1)
- a_notify('DCC', 'Download Failed', file_name)
-
-
-def notify_dcc_send_completed(match):
- 'Notify on DCC send completion.'
- if weechat.config_get_plugin("show_dcc") == "on":
- file_name = match.group(1)
- a_notify('DCC', 'Upload Complete', file_name)
-
-
-def notify_dcc_send_failed(match):
- 'Notify on DCC send failure.'
- if weechat.config_get_plugin("show_dcc") == "on":
- file_name = match.group(1)
- a_notify('DCC', 'Upload Failed', file_name)
-
-
-# -----------------------------------------------------------------------------
-# Utility
-# -----------------------------------------------------------------------------
-def set_away_status(match):
- status = match.group(1)
- if status == 'been ':
- STATE['is_away'] = True
- if status == 'longer ':
- STATE['is_away'] = False
-
-
-def cb_process_message(
- data,
- wbuffer,
- date,
- tags,
- displayed,
- highlight,
- prefix,
- message
-):
- '''Delegates incoming messages to appropriate handlers.'''
- tags = set(tags.split(','))
- functions = globals()
- is_public_message = tags.issuperset(
- TAGGED_MESSAGES['public message or action'])
- buffer_name = weechat.buffer_get_string(wbuffer, 'name')
- dcc_buffer_regex = re.compile(r'^irc_dcc\.', re.UNICODE)
- dcc_buffer_match = dcc_buffer_regex.match(buffer_name)
- highlighted = False
- if highlight == "1":
- highlighted = True
- # Private DCC message identifies itself as public.
- if is_public_message and dcc_buffer_match:
- notify_private_message_or_action(prefix, message, highlighted)
- return weechat.WEECHAT_RC_OK
- # Pass identified, untagged message to its designated function.
- for key, value in UNTAGGED_MESSAGES.items():
- match = value.match(message)
- if match:
- functions[DISPATCH_TABLE[key]](match)
- return weechat.WEECHAT_RC_OK
- # Pass identified, tagged message to its designated function.
- for key, value in TAGGED_MESSAGES.items():
- if tags.issuperset(value):
- functions[DISPATCH_TABLE[key]](prefix, message, highlighted)
- return weechat.WEECHAT_RC_OK
- return weechat.WEECHAT_RC_OK
-
-
-def a_notify(notification, title, description, priority=pynotify.URGENCY_LOW):
- '''Returns whether notifications should be sticky.'''
- is_away = STATE['is_away']
- icon = STATE['icon']
- time_out = 5000
- if weechat.config_get_plugin('sticky') == 'on':
- time_out = 0
- if weechat.config_get_plugin('sticky_away') == 'on' and is_away:
- time_out = 0
- try:
- pynotify.init("wee-notifier")
- wn = pynotify.Notification(title, description, icon)
- wn.set_urgency(priority)
- wn.set_timeout(time_out)
- wn.show()
- except Exception as error:
- weechat.prnt('', 'anotify: {0}'.format(error))
-
-
-# -----------------------------------------------------------------------------
-# Main
-# -----------------------------------------------------------------------------
-def main():
- '''Sets up WeeChat notifications.'''
- # Initialize options.
- for option, value in SETTINGS.items():
- if not weechat.config_is_set_plugin(option):
- weechat.config_set_plugin(option, value)
- # Initialize.
- name = "WeeChat"
- icon = "/usr/share/pixmaps/weechat.xpm"
- notifications = [
- 'Public',
- 'Private',
- 'Action',
- 'Notice',
- 'Invite',
- 'Highlight',
- 'Server',
- 'Channel',
- 'DCC',
- 'WeeChat'
- ]
- STATE['icon'] = icon
- # Register hooks.
- weechat.hook_signal(
- 'irc_server_connected',
- 'cb_irc_server_connected',
- '')
- weechat.hook_signal(
- 'irc_server_disconnected',
- 'cb_irc_server_disconnected',
- '')
- weechat.hook_signal('upgrade_ended', 'cb_upgrade_ended', '')
- weechat.hook_print('', '', '', 1, 'cb_process_message', '')
-
-
-if __name__ == '__main__' and IMPORT_OK and weechat.register(
- SCRIPT_NAME,
- SCRIPT_AUTHOR,
- SCRIPT_VERSION,
- SCRIPT_LICENSE,
- SCRIPT_DESC,
- '',
- ''
-):
- main()
diff --git a/weechat/python/autoload/anotify.py b/weechat/python/autoload/anotify.py
deleted file mode 120000
index 1517fef..0000000
--- a/weechat/python/autoload/anotify.py
+++ /dev/null
@@ -1 +0,0 @@
-../anotify.py \ No newline at end of file
diff --git a/weechat/python/autoload/listbuffer.py b/weechat/python/autoload/listbuffer.py
deleted file mode 120000
index e7089b2..0000000
--- a/weechat/python/autoload/listbuffer.py
+++ /dev/null
@@ -1 +0,0 @@
-../listbuffer.py \ No newline at end of file
diff --git a/weechat/relay.conf b/weechat/relay.conf
index fdc3e30..643f8db 100644
--- a/weechat/relay.conf
+++ b/weechat/relay.conf
@@ -20,6 +20,7 @@ text_selected = white
[network]
allowed_ips = ""
bind_address = ""
+clients_purge_delay = 0
compression_level = 6
ipv6 = on
max_clients = 5
diff --git a/weechat/script.conf b/weechat/script.conf
index f88e3cb..d674637 100644
--- a/weechat/script.conf
+++ b/weechat/script.conf
@@ -8,7 +8,7 @@ diff_color = on
diff_command = "auto"
display_source = on
quiet_actions = on
-sort = "p,n"
+sort = "u,n"
translate_description = on
use_keys = on
diff --git a/weechat/script/plugins.xml.gz b/weechat/script/plugins.xml.gz
new file mode 100644
index 0000000..c2cb9b4
--- /dev/null
+++ b/weechat/script/plugins.xml.gz
Binary files differ