←︎ weechat :: 66aa153


1
commit 66aa153d9f43b85e53a1b43def2efba6fa328fc9 (HEAD -> master, origin/master)
2
Author: acidvegas <acid.vegas@acid.vegas>
3
Date:   Sat Apr 25 18:54:54 2020 -0400
4
5
    updated
6
---
7
 README.md                   | 23 ++++++++++++-----------
8
 scripts/python/greentext.py |  7 ++++---
9
 2 files changed, 16 insertions(+), 14 deletions(-)
10
11
diff --git a/README.md b/README.md
12
index 328ebec..854377e 100644
13
--- a/README.md
14
+++ b/README.md
15
@@ -18,7 +18,7 @@
16
 weechat -P "alias,buflist,charset,exec,fifo,fset,irc,perl,python,relay,script,trigger" -r "/set weechat.plugin.autoload alias,buflist,charset,exec,fifo,fset,irc,perl,python,relay,script,trigger;/save;/quit"
17
 rm $HOME/.weechat/weechat.log && chmod 700 $HOME/.weechat && mkdir $HOME/.weechat/ssl
18
 git clone --depth 1 https://github.com/acidvegas/weechat.git $HOME/weechat
19
-mv $HOME/weechat/alias.conf $HOME/.weechat/alias.conf && mv $HOME/weechat/scripts/perl/*.pl && $HOME/.weechat/perl/autoload/ && mv $HOME/weechat/scripts/python/*.py $HOME/.weechat/python/autoload/
20
+mv $HOME/weechat/alias.conf $HOME/.weechat/alias.conf && mv $HOME/weechat/scripts/perl/*.pl $HOME/.weechat/perl/autoload/ && mv $HOME/weechat/scripts/python/*.py $HOME/.weechat/python/autoload/
21
 mkdir $HOME/.weechat/logs
22
 openssl req -x509 -new -newkey rsa:4096 -sha256 -days 3650 -out $HOME/.weechat/ssl/cert.pem -keyout $HOME/.weechat/ssl/cert.pem
23
 chmod 400 $HOME/.weechat/ssl/cert.pem
24
@@ -33,7 +33,7 @@ echo -e "[Unit]\nDescription=cerbot renewal timer\n\n[Timer]\nOnCalendar=0/12:00
25
 systemctl enable certbot.timer && systemctl start certbot.timer
26
 
27
 echo "#!/bin/bash" > /home/acidvegas/.weechat/renew
28
-echo "cat /etc/letsencrypt/live/chat.acid.vegas/fullchain.pem cat /etc/letsencrypt/live/chat.acid.vegas/privkey.pem > /home/acidvegas/.weechat/ssl/relay.pem" >> /home/acidvegas/.weechat/renew
29
+echo "cat /etc/letsencrypt/live/chat.acid.vegas/fullchain.pem /etc/letsencrypt/live/chat.acid.vegas/privkey.pem > /home/acidvegas/.weechat/ssl/relay.pem" >> /home/acidvegas/.weechat/renew
30
 echo "chown -R acidvegas:acidvegas /home/acidvegas/.weechat/ssl/relay.pem && chmod 400 /home/acidvegas/.weechat/ssl/relay.pem" >> /home/acidvegas/.weechat/renew
31
 echo "printf '%b' '*/relay sslcertkey\n' > /home/acidvegas/.weechat/weechat_fifo" >> /home/acidvegas/.weechat/renew
32
 chmod +x /home/acidvegas/.weechat/renew
33
@@ -157,7 +157,7 @@ chmod +x /home/acidvegas/.weechat/renew
34
 ```
35
 /server add 2f30		irc.2f30.org/6697 -ssl
36
 /server add blackhat	breaking.technology/6697 -ssl
37
-/server add efnet		irc.choopa.net/6697 -ssl
38
+/server add efnet		irc.servercentral.net/999 -ssl
39
 /server add freenode	irc.freenode.com/6697 -ssl
40
 /server add ircstorm	irc.ircstorm.net/6699 -ssl
41
 /server add oftc		irc.oftc.net/6697 -ssl
42
@@ -168,14 +168,15 @@ chmod +x /home/acidvegas/.weechat/renew
43
 /server add wormnet		wormnet1.team17.com
44
 /server add wtfux		irc.wtfux.org/6697 -ssl
45
 
46
-/set irc.server.2f30.autojoin		#2f30
47
-/set irc.server.efnet.autojoin		#2600,#efnetnews,#exchange,#irc30,#lrh
48
-/set irc.server.freenode.autojoin	#archlinux,#ircv3,#music-theory,#python,#raspberrypi,#weechat
49
-/set irc.server.sandnet.autojoin	#arab
50
-/set irc.server.silph.autojoin		#ramen
51
-/set irc.server.wormnet.autojoin	#anythinggoes
52
-/set irc.server.wormnet.password	ELSILRACLIHP
53
-/set irc.server.wormnet.realname	"48 0 US 3.7.2.1"
54
+/set irc.server.2f30.autojoin			#2f30
55
+/set irc.server.efnet.autojoin			#2600,#efnetnews,#exchange,#irc30,#lrh
56
+/set irc.server.efnet.ssl_dhkey_size	1024
57
+/set irc.server.freenode.autojoin		#archlinux,#ircv3,#music-theory,#python,#raspberrypi,#weechat
58
+/set irc.server.sandnet.autojoin		#arab
59
+/set irc.server.silph.autojoin			#ramen
60
+/set irc.server.wormnet.autojoin		#anythinggoes
61
+/set irc.server.wormnet.password		ELSILRACLIHP
62
+/set irc.server.wormnet.realname		"48 0 US 3.7.2.1"
63
 ```
64
 
65
 ### Services
66
diff --git a/scripts/python/greentext.py b/scripts/python/greentext.py
67
index c37e83e..15ee832 100644
68
--- a/scripts/python/greentext.py
69
+++ b/scripts/python/greentext.py
70
@@ -13,11 +13,12 @@ def cb_greentext(data,buffer,command):
71
 	if command=='/input return':
72
 		data=weechat.buffer_get_string(buffer,'input')
73
 		if data:
74
-			if data[0]=='>':data='\x0303'+data
75
-			if '!!' in data or '__' in data:
76
+			if data[0]=='>':
77
+				data='\x0303'+data
78
+			elif '!!' in data or '__' in data or '**' in data:
79
 				for word in data.split():
80
 					if word[:2] == '!!':
81
-						data = data.replace(word, '\x1F\x02\x0304' + word[2:].upper() + '\x0f', 1)
82
+						data = data.replace(word, '\x1F\x02\x0304 ' + word[2:].upper() + ' \x0f', 1)
83
 					elif word[:2] == '__':
84
 						data = data.replace(word, '\x1F\x02' + word[2:].upper() + '\x0f', 1)
85
 		weechat.buffer_set(buffer,'input',data)