←︎ weechat :: 0eb4071


1
commit 0eb40713970d52a5f3150511cf36251d36583ebd
2
Author: acidvegas <acid.vegas@acid.vegas>
3
Date:   Fri Mar 27 01:09:24 2020 -0400
4
5
    Initial commit
6
---
7
 README.md                        |  211 +++++++
8
 alias.conf                       |   96 +++
9
 scripts/antifuck.pl              |  367 +++++++++++
10
 scripts/perl/cflood.pl           |  150 +++++
11
 scripts/perl/color_popup.pl      |   38 ++
12
 scripts/perl/fuckyou.pl          |  188 ++++++
13
 scripts/perl/highmon.pl          | 1146 ++++++++++++++++++++++++++++++++++
14
 scripts/perl/hueg.pl             | 1255 ++++++++++++++++++++++++++++++++++++++
15
 scripts/perl/keepnick.pl         |  279 +++++++++
16
 scripts/python/autosort.py       | 1076 ++++++++++++++++++++++++++++++++
17
 scripts/python/bufsave.py        |   35 ++
18
 scripts/python/colorize_nicks.py |  139 +++++
19
 scripts/python/fullwidth.py      |   18 +
20
 scripts/python/go.py             |  459 ++++++++++++++
21
 scripts/python/greentext.py      |   25 +
22
 scripts/python/masshl.py         |   31 +
23
 scripts/python/rainbow.py        |   24 +
24
 17 files changed, 5537 insertions(+)
25
26
diff --git a/README.md b/README.md
27
new file mode 100644
28
index 0000000..10bd3ad
29
--- /dev/null
30
+++ b/README.md
31
@@ -0,0 +1,211 @@
32
+# WeeChat
33
+> backup of my weechat setup
34
+
35
+## Table of Contents
36
+- [Setup](#setup)
37
+  - [WeeChat](#weechat)
38
+  - [Relay](#relay)
39
+- [Settings](#settings)
40
+- [Triggers](#triggers)
41
+- [Servers](#servers)
42
+- [Services](#services)
43
+- [Proxy](#proxy)
44
+- [Relay](#relay)
45
+
46
+### Setup
47
+###### WeeChat
48
+```
49
+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"
50
+rm $HOME/.weechat/weechat.log && chmod 700 $HOME/.weechat && mkdir $HOME/.weechat/ssl
51
+git clone --depth 1 https://github.com/acidvegas/weechat.git $HOME/weechat
52
+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/
53
+mkdir $HOME/.weechat/logs
54
+openssl req -x509 -new -newkey rsa:4096 -sha256 -days 3650 -out $HOME/.weechat/ssl/cert.pem -keyout $HOME/.weechat/ssl/cert.pem
55
+chmod 400 $HOME/.weechat/ssl/cert.pem
56
+```
57
+
58
+###### Relay
59
+```
60
+certbot certonly --standalone -d chat.acid.vegas -m acid.vegas@acid.vegas
61
+
62
+echo -e "[Unit]\nDescription=cerbot renewal\n\n[Service]\nType=oneshot\nExecStart=/usr/bin/certbot renew -n --quiet --agree-tos --deploy-hook /home/acidvegas/.weechat/renew" > /etc/systemd/system/certbot.service
63
+echo -e "[Unit]\nDescription=cerbot renewal timer\n\n[Timer]\nOnCalendar=0/12:00:00\nRandomizedDelaySec=1h\nPersistent=true\n\n[Install]\nWantedBy=timers.target" > /etc/systemd/system/certbot.timer
64
+systemctl enable certbot.timer && systemctl start certbot.timer
65
+
66
+echo "#!/bin/bash" > /home/acidvegas/.weechat/renew
67
+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
68
+echo "chown -R acidvegas:acidvegas /home/acidvegas/.weechat/ssl/relay.pem && chmod 400 /home/acidvegas/.weechat/ssl/relay.pem" >> /home/acidvegas/.weechat/renew
69
+echo "printf '%b' '*/relay sslcertkey\n' > /home/acidvegas/.weechat/weechat_fifo" >> /home/acidvegas/.weechat/renew
70
+chmod +x /home/acidvegas/.weechat/renew
71
+```
72
+
73
+### Settings
74
+```
75
+/key bind meta-c /bar toggle buflist
76
+/key bind meta-n /bar toggle nicklist
77
+/set buflist.format.buffer						"${if:${type}==server?${if:${window[gui_current_window].buffer.local_variables.server}==${buffer.local_variables.server}?${if:${irc_server.is_connected}?${color:green,235}:${color:lightred,235}}• ${color:default,235}${name}:${if:${irc_server.is_connected}?${color:green,235}:${color:lightred,235}}• ${color:default,235}${indent}${name}}:}${if:${type}=~(channel|private)?${color_hotlist}${indent}${name}:}${if:${type}!~(channel|private|server)?${color:gray}${name}:}"
78
+/set buflist.format.buffer_current				"${if:${type}==server?${if:${window[gui_current_window].buffer.local_variables.server}==${buffer.local_variables.server}?${color:lightred}${if:${irc_server.is_connected}?${color:green,235}:${color:lightred,235}}• ${name}${format_hotlist}:${color:237}${if:${irc_server.is_connected}?${color:green,235}:${color:lightred,235}}• ${name}}${format_lag}${format_hotlist}:${if:${type}=~(channel|private)?• ${name}:${if:${type}!~(channel|private|server)?${color:lightblue}${name}:}}}"
79
+/set buflist.format.hotlist_highlight			"${color:yellow}"
80
+/set buflist.format.hotlist_message				"${color:cyan}"
81
+/set buflist.format.hotlist_private				"${color:yellow}"
82
+/set buflist.look.mouse_wheel					off
83
+/set irc.color.input_nick						default
84
+/set irc.color.nick_prefixes					"y:green;q:green;a:lightred;o:red;h:yellow;v:lightblue;*:lightmagenta"
85
+/set irc.color.reason_quit						darkgray
86
+/set irc.color.topic_new						lightblue
87
+/set irc.ctcp.clientinfo						""
88
+/set irc.ctcp.finger							""
89
+/set irc.ctcp.ping								""
90
+/set irc.ctcp.source							""
91
+/set irc.ctcp.time								""
92
+/set irc.ctcp.userinfo							""
93
+/set irc.ctcp.version							""
94
+/set irc.look.ctcp_time_format					""
95
+/set irc.look.display_ctcp_blocked				off
96
+/set irc.look.display_ctcp_reply				off
97
+/set irc.look.display_ctcp_unknown				off
98
+/set irc.look.display_join_message				""
99
+/set irc.look.display_old_topic					off
100
+/set irc.look.item_nick_modes					off
101
+/set irc.look.join_auto_add_chantype			on
102
+/set irc.look.server_buffer						independent
103
+/set irc.look.smart_filter						off
104
+/set irc.network.ban_mask_default				"*!*@$host"
105
+/set irc.server_default.anti_flood_prio_high	0
106
+/set irc.server_default.anti_flood_prio_low		0 
107
+/set irc.server_default.autorejoin				on
108
+/set irc.server_default.autorejoin_delay		3
109
+/set irc.server_default.capabilities			account-notify,away-notify,cap-notify,multi-prefix,server-time
110
+/set irc.server_default.command_delay			3
111
+/set irc.server_default.msg_part				"G-line: User has been permanently banned from this network."
112
+/set irc.server_default.msg_quit				"G-line: User has been permanently banned from this network."
113
+/set irc.server_default.nicks					"acidvegas,ac1dvegas,acidvega5"
114
+/set irc.server_default.realname				"MOST DANGEROUS MOTHERFUCK"
115
+/set irc.server_default.sasl_mechanism			external
116
+/set irc.server_default.sasl_username			"acidvegas"
117
+/set irc.server_default.ssl_cert				"%h/ssl/cert.pem"
118
+/set irc.server_default.ssl_password			"REDACTED"
119
+/set irc.server_default.ssl_verify				off
120
+/set irc.server_default.username				"stillfree"
121
+/set plugins.var.perl.highmon.first_run			false
122
+/set plugins.var.perl.highmon.short_names		on
123
+/set plugins.var.perl.keepnick.default_enable	1
124
+/set sec.crypt.hash_algo						sha512
125
+/set weechat.bar.buflist.size_max				20
126
+/set weechat.bar.fset.separator					off
127
+/set weechat.bar.input.color_delim				darkgray
128
+/set weechat.bar.input.conditions				"${window.buffer.full_name} != perl.highmon"
129
+/set weechat.bar.input.items					"[input_prompt]+(away),[input_search],[input_paste],input_text"
130
+/set weechat.bar.input.separator				off
131
+/set weechat.bar.nicklist.size_max				15
132
+/set weechat.bar.status.color_bg				default
133
+/set weechat.bar.status.color_delim				darkgray
134
+/set weechat.bar.status.conditions				"${window.buffer.full_name} != perl.highmon"
135
+/set weechat.bar.status.items					"buffer_name+(buffer_modes)+[buffer_nicklist_count]"
136
+/set weechat.bar.status.separator				off
137
+/set weechat.bar.title.color_bg					black
138
+/set weechat.bar.title.separator				off
139
+/set weechat.bar.title.size_max					2
140
+/set weechat.color.chat_delimiters				darkgray
141
+/set weechat.color.chat_highlight_bg			default
142
+/set weechat.color.chat_host					darkgray
143
+/set weechat.color.chat_nick					white
144
+/set weechat.color.chat_nick_colors				"cyan,magenta,green,brown,lightblue,default,lightcyan,lightmagenta,lightgreen,blue,31,35,38,40,49,63,70,80,92,99,112,126,130,138,142,148,160,162,167,169,174,176,178,184,186,210,212,215,247"
145
+/set weechat.color.chat_prefix_error			lightred
146
+/set weechat.color.chat_prefix_network			lightblue
147
+/set weechat.color.chat_prefix_suffix			darkgray
148
+/set weechat.color.chat_read_marker				darkgray
149
+/set weechat.color.chat_time					235
150
+/set weechat.color.chat_time_delimiters			235
151
+/set weechat.color.separator					darkgray
152
+/set weechat.color.status_name_ssl				white
153
+/set weechat.look.bar_more_down					"▼"
154
+/set weechat.look.bar_more_left					"◀"
155
+/set weechat.look.bar_more_right				"▶"
156
+/set weechat.look.bar_more_up					"▲"
157
+/set weechat.look.buffer_time_format			" %H:%M"
158
+/set weechat.look.confirm_quit					on
159
+/set weechat.look.day_change					off
160
+/set weechat.look.highlight						acidvegas,supernets
161
+/set weechat.look.item_buffer_filter			"•"
162
+/set weechat.look.mouse							off
163
+/set weechat.look.prefix_align_max				15
164
+/set weechat.look.prefix_join					"▬▬▶"
165
+/set weechat.look.prefix_quit					"◀▬▬"
166
+/set weechat.look.prefix_suffix					"│"
167
+/set weechat.look.quote_time_format				"%H:%M"
168
+/set weechat.look.read_marker_string			"─"
169
+/set weechat.look.separator_horizontal			"─"
170
+/set weechat.look.separator_vertical			"│"
171
+/set weechat.look.window_title					"hardchats"
172
+/set weechat.plugin.autoload					"alias,buflist,charset,exec,fifo,fset,irc,perl,python,relay,script,trigger"
173
+/set weechat.startup.display_logo				off
174
+/set weechat.startup.display_version			off
175
+```
176
+
177
+### Triggers
178
+```
179
+/trigger add hate					modifier	irc_out1_PRIVMSG			"" "/hate/04 HATE "
180
+/trigger add input_command_color	modifier	"500|input_text_display"	"${tg_string} =~ ^/($|[^/])" "#/(.+)#${color:39}/${color:74}${re:1}#"
181
+/trigger add url_color				modifier	"weechat_print"				"${tg_tags} !~ irc_quit" ";[a-z]+://\S+;${color:32}${color:underline}${re:0}${color:-underline}${color:reset};" ""
182
+```
183
+
184
+### Servers
185
+```
186
+/server add blackhat	breaking.technology/6697 -ssl
187
+/server add efnet		efnet.port80.se/6697,irc.choopa.net/6697 -ssl
188
+/server add freenode	irc.freenode.com/6697 -ssl
189
+/server add ircstorm	irc.ircstorm.net/6699 -ssl
190
+/server add oftc		irc.oftc.net/6697 -ssl
191
+/server add sandnet		irc.sandngz.net/6697 -ssl
192
+/server add silph		irc.silph.co/6697 -ssl
193
+/server add supernets	irc.supernets.org/6697 -ssl
194
+/server add unreal		irc.unrealircd.org/6697 -ssl
195
+/server add wtfux		irc.wtfux.org/6697 -ssl
196
+
197
+/set irc.server.efnet.autojoin		#2600,#efnetnews,#exchange,#irc30,#lrh
198
+/set irc.server.freenode.autojoin	#archlinux,#ircv3,#music-theory,#python,#raspberrypi,#weechat
199
+/set irc.server.sandnet.autojoin	#arab
200
+/set irc.server.silph.autojoin		#ramen
201
+```
202
+
203
+### Services
204
+```
205
+/secure passphrase CHANGEME
206
+/secure set networkname CHANGEME
207
+/set irc.server.networkname.command "/msg NickServ IDENTIFY ${sec.data.networkname}
208
+
209
+/msg NickServ register PASSWORD EMAIL
210
+/msg NickServ ACCESS DEL CHANGEME
211
+/msg NickServ ACCESS ADD *@big.dick.acid.vegas
212
+/msg NickServ AJOIN ADD <channel>
213
+/msg NickServ CERT ADD
214
+/msg NickServ SET AUTOOP ON
215
+/msg NickServ SET HIDE EMAIL ON
216
+/msg NickServ SET HIDE STATUS ON
217
+/msg NickServ SET HIDE USERMASK ON
218
+/msg NickServ SET HIDE QUIT ON
219
+/msg NickServ SET KEEPMODES ON
220
+/msg NickServ SET KILL QUICK
221
+/msg NickServ SET PRIVATE ON
222
+/msg NickServ SET SECURE ON
223
+/msg HostServ REQUEST MOST.DANGEROUS.MOTHER.FUCK
224
+/msg HostServ ON
225
+```
226
+
227
+### Proxy
228
+```
229
+/proxy add tor socks5 127.0.0.1 9050
230
+/set irc.server.CHANGEME.proxy tor
231
+```
232
+
233
+### Relay
234
+```
235
+/secure set relay PASSWORD
236
+/secure set totp SECRET
237
+/set relay.network.max_clients 2
238
+/set relay.network.password ${sec.data.relay}
239
+/set relay.network.totp_secret ${sec.data.totp}
240
+/relay sslcertkey
241
+/relay add ssl.weechat PORT
242
+```
243
diff --git a/alias.conf b/alias.conf
244
new file mode 100644
245
index 0000000..acc51ba
246
--- /dev/null
247
+++ b/alias.conf
248
@@ -0,0 +1,96 @@
249
+#  bold |  color |  underline |  reset
250
+
251
+[cmd]
252
+# Art
253
+derp     = "say 0,1    10,10  11,10 10,10  0,1  1,1 ; say 0,1   11,10______0,1  1,1 ; say 0,1  11,10|10,10 11,10|10,10 11,10|10,10 11,10|10,10 0,1 1,1 ; say 0,1 8,8 1,8__8,8   1,8__8,8 0,1 1,1 ; say 8,8   1,0o8,8   1,0.8,8   1,1 ; say 0,1 8,8   1,8<.8,8     1,1 ; say 0,1 8,8         0,1 1,1 ; say 0,1  8,8  0,1,'8,8   0,1  1,1 ; say 0,1   8,8    0,1    1,1.;"
254
+lovecock = "say 0,1                                                  ; say 0,1      5,7#######0,1                                     ; say 0,1   5,7#####0       0,1   hey guys im $1, let me tell  ; say 0,1  5,7#####0     5_1  5)0,1  you a little about myself...        ; say 0,1  5,7#####0     0100  1o0 0,1                                1 ; say 0,1  5,7###1@5# 0       1 0  0,1  i LOVE cock                   ; say 0,1  5,7#0   5# 0       1>0   0,1                               ; say 0,1  5,7#0        5\;\;\;\;\;\;\;\;0,1     i LOVE cock               ; say 0,1  0,7      0,1                                          ; say 0,1  0,7           0,1                              1 0      ; say 0,1  0,7          1 5...W.0,1    I ROMANTICIZE THE NOTION    ; say 0,1  0,7          1 5...0,1      OF HAVING COCKS AND BALLS   ; say 0,1 0,7           0,1          ON ME AT ALL TIMES OF MY    ; say 0,7     1 >0,1               LIFE.                       ; say 0,7      0,1;"
255
+pump     = "exec -o cat ascii/$1.txt | awk '{print \$0\; system("sleep $0")\;}'"
256
+pumpstop = "exec pkill -9 awk"
257
+umad     = "say 0,1<$1> umadyet?        0,7     0,1                                 ; say 0,1<$1> hemad         0,7  0,8   0,1 0,8 0,1  4hehe am ownin these fkn noobs; say 0,1<$1> umad          0,8        0,1                              ; say 0,1<$1> umad           0,8      0,1                               ; say 0,1<$1> umadyet?      0,5 0,8       0,1                    0,15   0,1       ; say 0,1<$1> nou           0,5 0,2         0,1                 0,11 0,15     0,1     ; say 0,1<$1> umad?         0,5 0,2     0,8       0,1              0,11 0,15      0,1    ; say 0,1<$1> umad          0,5 0,2      0,8              0,1      0,11 0,15       0,1   ; say 0,1<$1> cum @ me bra  0,5 0,2          0,8              0,1   0,15        0,1  ; say 0,1<$1> umad          0,5 0,2               0,1       0,8 0,1 0,8 0,1 0,5           ; say 0,1<$1> umadyet?      0,5 0,2               0,1       0,15    0,5 0,1         0,5 ; say 0,1<$1> umad          0,5 0,8                0,1      0,5     0,1         0,5 ; say 0,1<$1> somad         0,5 0,8                 0,1         0,5 0,1         0,5 ; say 0,1<$1> umadyet?      0,5 0,14                  0,1        0,5 0,1    0,15     0,5 ; say 0,1<$1> umad          0,5              0,1  0,14    0,1       0,5 0,1    0,15     0,5 ; say 0,1<$1> hes ragin     0,5 0,1            0,5 0,1  0,14    0,1      5 0,5 0,1    0,15     0,5 ; say 0,1<$1> umad          0,5 0,1            0,5 0,1  0,4  0,14  0,1      5 0,5 0,1    0,15     0,5 ; say 0,1<$1> umadyet?      0,5 0,1            0,5 0,1  0,4      0,1    5 0,5 0,1    0,15     0,5 ;"
258
+
259
+# Alerts
260
+chat_norm = "say 8,5▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄ NORMAL CHATS 8,5▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄"
261
+chat_srs  = "say 8,5▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄ SERIOUS CHATS 8,5▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄"
262
+emergency = "say 8!1,8!8!0,4 IRC EMERGENCY 8!1,8!8!0,4 IRC EMERGENCY 8!1,8!8!0,4 IRC EMERGENCY 8!1,8!8!0,4 IRC EMERGENCY 8!1,8!8!0,4 IRC EMERGENCY 8!1,8!8!0,4 IRC EMERGENCY 8!1,8!8!0,4 IRC EMERGENCY 8!1,8!8!0,4 IRC EMERGENCY 8!1,8!8!0,4 IRC EMERGENCY 8!1,8!8!"
263
+flashbang = "cflood -fg 0 -bg 8 FLASHBANG"
264
+prison    = "say 04----------------------------------------------------------------------[IMPENETRABLE IRC PRISON WALL]-----------------------------------------------------------------------"
265
+terminate = "kick $1 08,04                    T E R M I N A T E D                    "
266
+warning   = "say 1,8/!\08,04 WARNING 1,8/!\ 04$*"
267
+
268
+# Chatters
269
+dzl_credit  = "say im with a credit union"
270
+dzl_26      = "say i dont troll because im 26"
271
+dzl_job     = "say i need a better job im too good at entry level shit"
272
+dzl_reality = "say nice perception of reality"
273
+tp_boom     = "say just wait till i get a supernets then enough http requests then boom"
274
+tp_dumb     = "say your suck a dumb fucking idiot..."
275
+
276
+# Faces
277
+shrug  = "say ¯\_(ツ)_/¯"
278
+shades = "say (⌐■_■)"
279
+srs    = "say (ಠ_ಠ)"
280
+
281
+# Random
282
+beer     = "me throws $1 an ice cold 0,0 0,2 BUD 1,0c =)"
283
+beer2    = "me throw $1 an ice cold 0,0 0,5 BUD 1,0c =)"
284
+blog     = "say Hi! It looks like you're blogging on IRC. Would you like to: 2[Add Comments] 2[e-Mail this to a Friend] 2[Digg This!] 6[Submit to Slashdot] 2[Add to del.icio.us] 5[Kill yourself because0⬉5 nobody cares]"
285
+chatrain = "say              ya                                                                                                                                                                                          nice; say                                             chillin                                                                                                                                                                                 u?; say                                                                                     nice                                                                            ty                                                              np; say                                              ok                                                                                                                nice                                                                 %%                                                                                                       true; say                                                                                      same"
286
+cig      = "say 8,7\;.`-,:.`\;15,0||||||||||||||||||||4,14&8,14@14-\;`,-\;`"
287
+coffee   = "me hands $1 a 5,2""] of coffee! =)"
288
+cooldown = "say 1,8/!\8,4 WARNING 1,8/!\ 4This keyboard is currently on 12COOL DOWN4 until $1 can handle it."
289
+cooled   = "say [9ALERT] This keyboard is no longer on fire. Chats may proceed accordingly."
290
+doritos  = "say ▼ ◄ ▲ ► ▼ ◄ ▲ ► ▼ ◄ ▲ ► ▼ ◄ ▲ ► ▼ ◄ ▲ ▼ ◄ ▲ ► ▼ ◄ ▲ ► ▼ ◄▼ ◄ ▲ ► ▼ ◄ ▲ ► ▼ ▼ ◄ ▲ ► ▼ ◄ ▲ ► ▼ ◄ ▲ ► ▼ ◄ ▲ ► ▼ ◄ ▲ ▼ ◄ ▲ ► ▼ ◄ ▲ ► ▼ ◄▼ ◄ ▲ ► ▼ ◄ ▲ ► ▼▼ ◄ ▲ ► ▼ ◄ ▲ ► ▼ ◄ ▲ ► ▼ ◄ ▲ ► ▼ ◄ ▲ ▼ ◄ ▲ ► ▼ ◄ ▲ ► ▼ ◄▼ ◄ ▲ ► ▼ ◄ ▲ ► ▼▼ ◄ ▲ ► ▼ ◄ ▲ ► ▼ ◄ ▲ ► ▼ ◄ ▲ ► ▼ ◄ ▲ ▼ ◄ ▲ ► ▼ ◄ ▲ ► ▼ ◄▼ ◄ ▲ ► ▼ ◄ ▲ ► ▼ ▼ ◄ ▲ ► ▼ ◄ ▲ ► ▼ ◄ ▲ ► ▼ ◄ ▲ ► ▼ ◄ ▲ ▼ ◄ ▲ ► ▼ ◄ ▲ ► ▼ ◄▼ ◄ ▲ ► ▼ ◄ ▲ ► ▼ Ah Mannn! I dropped my bag of Doritos!!!"
291
+en_gold  = "say You must have an EFNet 8,7GOLD account to view this message."
292
+fadeop   = "me 14<02Mode14> [-o $114] by $nick"
293
+fakick   = "me 14<05Kick14> $1 was kicked by $nick 14[$2-14]"
294
+fbi      = "notice $channel The Federal Bureau of Investigation logged a record of your entry into this illegal chatroom along with your IP address due to potential violations of 18 U.S.C. º 1030. Your IP address is entered into our criminaldatabase as well as the Department of Homeland Security. If you are not associated with these claims we strongly advise you to type '/part'. Thank you."
295
+fred     = "say 4()_ <- FRED DURST'S HAT LOL"
296
+gotem    = "say 1,0 GOT EM "
297
+hate     = "say 4  HATE     4  HATE     4  HATE  "
298
+knuckz   = "say my knuckz: (C)(H)(A)(T)b d(L)(I)(F)(E)"
299
+mail     = "notice $channel You have unread messages from another user! Type /server mail read to read them."
300
+wave     = "cflood ▁▂▃▄▅▆▇█▇▆▅▄▃▂▁"
301
+weed     = "say 9DUUUUUUUUUUUUUUUUUUUUUUUUUUUUDE DUDE DUDE DUDE DUDE DUDE DUDE DUDE FUCKING WEEEEEEEEED AHAHAHAHAHAHAHA DUDE!!!!!!!!!! WEED!!!!!!!!!!!! *hits bong* FUCKING DUUUUUUDE that WEEED like just...................DUDE"
302
+
303
+# Text
304
+1stup      = "say YO BITCH IM THE 1ST UP IN THIS PIECE. RESPECT MY ABILITY TO BE UP EARLY AND CHAT BEFORE YOU COCK SUCKER!!!!!!!!!"
305
+chatmaster = "say YOUR CHAT MASTER WILL RETURN SHORTLY"
306
+dna        = "say i got your moms dna inserted into each of my sperms and everytime i fuck you your mom is somehow cumming inside you"
307
+heartbeat  = "say $1: your heart will skip one (1) beat in -5 seconds; say do not read this message;"
308
+icmp       = "say how about i do a nice icmp ping 2 u, figure out where you are and what you are on, spawn your command.com to a port of my choice and log in with telnet and have a field day with you"
309
+limp       = "say OR YOULL BE LEAVIN WITH A FAT LIP; say ITS ALL ABOUT THE HE SAYS SHE SAYS BULL SHIT.; say I THINK YOU BETTER QUIT TALKIN THAT SHIT PUNK; say SO COME ON AND GET IT.; say ITS JUST ONE OF THOSE DAYS"
310
+linkin     = "say CRAWLING IN MY SKIN. THESE WOUNDS THEY WILL NOT HEAL. FEAR IS HOW I FALL. CONFUSING WHAT IS REAL."
311
+money      = "say u look like a fucking money irl"
312
+operscum   = "say I have like 50,000 shells/vhosts/bncs. Bans won't do a thing except fill your list. And 'get to where i am today' is a sad testament to your life apparently. On a side note, I used to op other chans that are far bigger than this chan. I didn't get ops by k/b'ing everyone in sight or anyone that carried a touch of annoyance to me. I reserved k/bs for spammers and flooders, that's it. Everyone else I /ignored"
313
+peep       = "say ight so boom, i told son chill ah ah ah, he like nah, this that and the 3rd, blazhee blah, so i ping ponged poofed ol boi shit then i peeped the boyz so"
314
+worms      = "say super models give me dome while i count stacks and play worms"
315
+your       = "say look its not hard, your isnt you're.. you're is YOU ARE. jesus. did you even make it out of 8th grade. can you even COUNT TO EIGHT, fuckin your an IDIOT.. and im sure right now your eaiting to CORRECT ME on using your in the wrong context now that i've TAUGHT YOU HOW TO USE IT OMG JESUS"
316
+
317
+# SuperNETs (Oper)
318
+botsay    = "msg BotServ SAY $channel"
319
+deprotect = "msg ChanServ MODE $channel LOCK DEL +eI ~a:$1 ~a:$1; mode $channel -eI ~a:$1 ~a:$1"
320
+protect   = "mode $channel +eI ~a:$1 ~a:$1; msg chanserv mode $channel lock add +eI ~a:$1 ~a:$1"
321
+sf        = "spamfilter add simple cpnN kill - "ENTER THE VOID" "$*"
322
+
323
+# SuperNETs
324
+sn_ad1    = "masshl 1,8/!\08,04 WARNING 1,8/!\ 04This channel has moved to 12IRC.SUPERNETS.ORG #SUPERBOWL"
325
+sn_ad2    = "masshl 04CAN WE CONTINUE THIS CONVERSATION AT IRC.SUPERNETS.ORG #SUPERBOWL FOR FUCKS SAKE"
326
+sn_auto   = "say yeah you can go ahead and add irc.supernets.org to your clients auto-connect config now."
327
+sn_dad    = "say this isnt your dads football channel"
328
+sn_gold   = "say You must have a SuperNETs 8,7GOLD account to view this message."
329
+
330
+# Useful
331
+clear     = "buffer clear"
332
+close     = "buffer close"
333
+exempt    = "mode +eI *!$X *!$X"
334
+gh        = "say https://github.com/$*"
335
+msgbuf    = "command -buffer $1 * /input send $2-"
336
+nofakelag = "/set irc.server.$server.anti_flood_prio_high 0 ; /set irc.server.$server.anti_flood_prio_low 0"
337
+ns_ident  = "msg NickServ IDENTIFY ${sec.data.${server}}"
338
+redraw    = "color reset;window refresh"
339
+say       = "msg *"
340
+v         = "voice * -yes"
341
+wx        = "who * n%nc"
342
+
343
+[completion]
344
+msgbuf = "%(buffers_plugins_names)"
345
diff --git a/scripts/antifuck.pl b/scripts/antifuck.pl
346
new file mode 100644
347
index 0000000..b1a7353
348
--- /dev/null
349
+++ b/scripts/antifuck.pl
350
@@ -0,0 +1,367 @@
351
+use strict;
352
+use warnings;
353
+
354
+no strict 'subs';
355
+
356
+my $SCRIPT_NAME = 'antifuck';
357
+my $SCRIPT_AUTHOR = 'The Krusty Krab <wowaname@volatile.ch>';
358
+my $SCRIPT_VERSION = '1.1';
359
+my $SCRIPT_LICENCE = 'Public domain';
360
+my $SCRIPT_DESC = 'Defend against forcejoins (e.g. from fuckyou.pl) and '.
361
+	'forceparts (e.g. from /remove)';
362
+
363
+my %OPTIONS = (
364
+	autopart => ['Whether to automatically part forcejoined channels. '.
365
+		'You can always do this manually with /antifuck part', '0'],
366
+	delay => ['Delay in milliseconds to wait before autoparting', '5000'],
367
+	forward => ['Whether to allow channel forwards (+f on freenode)', '1'],
368
+	ignore => ['Servers to ignore (e.g. for bouncers), separated by comma', ''],
369
+	nobufs => ['If 1, do not create buffers for forcejoined channels', '0'],
370
+	timeout =>
371
+		['Delay in milliseconds to wait for server to send JOIN after join',
372
+		'60000'],
373
+	);
374
+
375
+# %channels: channels we joined and received JOIN / NAMES for
376
+# %zombie: channels we joined but aren't yet in
377
+# %part: channels we were forced into and will part soon
378
+# %partbuf: buffers belonging to parted channels, we'll close these on
379
+#           /antifuck part
380
+our (%channels, %zombie, %part, %partbuf, $fuckbuf, $timeout_cb, $gc_cb);
381
+
382
+if (weechat::register($SCRIPT_NAME, $SCRIPT_AUTHOR, $SCRIPT_VERSION,
383
+ $SCRIPT_LICENCE, $SCRIPT_DESC, '', '')) {
384
+	weechat::hook_command('antifuck', $SCRIPT_DESC, 'part', <<'HELP',
385
+This script defends against forced joins, such as from irssi's fuckyou.pl or
386
+from channel forwards, as well as forced parts, such as from the /remove
387
+command. You can configure certain behaviour using the options under
388
+"plugins.var.perl.antifuck.*". Configure rejoin-on-/remove with the
389
+irc.server_default.autorejoin and .autorejoin_delay commands.
390
+
391
+Running "/antifuck part" will close all forcejoined channels and part them where
392
+appropriate.
393
+HELP
394
+		'part', 'cmd_antifuck', '');
395
+	weechat::hook_signal('irc_server_connected', 'irc_connect', '');
396
+	weechat::hook_signal('irc_server_disconnected', 'irc_disconnect', '');
397
+	weechat::hook_signal('irc_channel_opened', 'buffer_opened', '');
398
+	weechat::hook_signal('buffer_closed', 'buffer_closed', '');
399
+	weechat::hook_signal('*,irc_out1_join', 'client_join', '');
400
+	weechat::hook_signal('*,irc_out1_part', 'client_part', '');
401
+	weechat::hook_signal('*,irc_raw_in_001', 'irc_001', '');
402
+	weechat::hook_signal('*,irc_raw_in_470', 'irc_470', '');
403
+	weechat::hook_modifier('irc_in_366', 'irc_366', '');
404
+	weechat::hook_modifier('irc_in_join', 'irc_join', '');
405
+	weechat::hook_modifier('irc_in_part', 'irc_part', '');
406
+
407
+	for my $option (keys %OPTIONS) {
408
+		weechat::config_set_plugin($option, $OPTIONS{$option}[1])
409
+		 unless weechat::config_is_set_plugin($option);
410
+		weechat::config_set_desc_plugin($option, $OPTIONS{$option}[0]);
411
+	}
412
+
413
+	my $iptr = weechat::infolist_get('buffer', '', '');
414
+
415
+	while (weechat::infolist_next($iptr)) {
416
+		next unless weechat::infolist_string($iptr, 'plugin_name') eq 'irc';
417
+		my $buf = weechat::infolist_pointer($iptr, 'pointer');
418
+		$channels{
419
+			lc weechat::buffer_get_string($buf, 'localvar_server')}{
420
+			lc weechat::buffer_get_string($buf, 'localvar_channel')} = 1;
421
+	}
422
+	weechat::infolist_free($iptr);
423
+}
424
+
425
+sub mynick
426
+{
427
+	my ($buf, $nick) = ($_[0], $_[1]);
428
+
429
+	return lc weechat::buffer_get_string($buf, 'localvar_nick') eq lc $nick;
430
+}
431
+
432
+sub ignored
433
+{
434
+	my $server = shift;
435
+	my $ignore_conf = lc weechat::config_get_plugin('ignore');
436
+
437
+	return $ignore_conf =~ /(^|,)$server($|,)/;
438
+}
439
+
440
+sub nobufs { weechat::config_get_plugin('nobufs') }
441
+
442
+sub ircbuf { weechat::buffer_search('irc', "(?i)".(join '.', @_)) }
443
+sub ircparse { weechat::info_get_hashtable(irc_message_parse =>
444
+	{ message => shift }) }
445
+
446
+sub servchan
447
+{
448
+	my $buf = shift;
449
+
450
+	return (lc weechat::buffer_get_string($buf, 'localvar_server'),
451
+		lc weechat::buffer_get_string($buf, 'localvar_channel'));
452
+}
453
+
454
+sub reset_gc
455
+{
456
+	weechat::unhook($gc_cb) if $gc_cb;
457
+	$gc_cb = weechat::hook_timer(weechat::config_get_plugin('timeout'), 0, 1,
458
+		'run_gc', '');
459
+}
460
+
461
+sub cmd_antifuck
462
+{
463
+	my (undef, $buffer, $args) = @_;
464
+
465
+	if ($args eq 'part') {
466
+		# TODO: we really need to spend more time here making sure we send the
467
+		# fewest PARTs possible, a la irc_join_delay
468
+		weechat::buffer_close($fuckbuf);
469
+	}
470
+
471
+	return weechat::WEECHAT_RC_OK;
472
+}
473
+
474
+sub fuckbuf_input { return weechat::WEECHAT_RC_OK; }
475
+
476
+sub fuckbuf_close
477
+{
478
+	weechat::buffer_close($_) for (keys %partbuf);
479
+	%partbuf = ();
480
+	$fuckbuf = '';
481
+
482
+	return weechat::WEECHAT_RC_OK;
483
+}
484
+
485
+sub irc_connect
486
+{
487
+	my $server = pop;
488
+	my ($autojoin) = (weechat::config_string(weechat::config_get(
489
+		"irc.server.$server.autojoin")) =~ /^([^ ]*)/);
490
+
491
+	$zombie{$server}{$_} = 1 for (split ',', lc($autojoin));
492
+
493
+	return weechat::WEECHAT_RC_OK;
494
+}
495
+
496
+sub irc_disconnect
497
+{
498
+	my $server = pop;
499
+
500
+	$server = lc $server;
501
+	delete $channels{$server};
502
+	delete $zombie{$server};
503
+	delete $part{$server};
504
+
505
+	return weechat::WEECHAT_RC_OK;
506
+}
507
+
508
+sub buffer_opened {
509
+	my $buffer = pop;
510
+	my ($server, $channel) = servchan($buffer);
511
+	return weechat::WEECHAT_RC_OK if exists $channels{$server}{$channel};
512
+	return weechat::WEECHAT_RC_OK if ignored($server);
513
+
514
+	$fuckbuf = weechat::buffer_new(
515
+		'antifuck',
516
+		'fuckbuf_input',
517
+		'',
518
+		'fuckbuf_close',
519
+		''
520
+		) unless $fuckbuf;
521
+
522
+	weechat::buffer_merge($buffer, $fuckbuf);
523
+	#return weechat::WEECHAT_RC_OK unless weechat::config_get_plugin('autopart');
524
+
525
+	$partbuf{$buffer} = 1;
526
+	return weechat::WEECHAT_RC_OK;
527
+}
528
+
529
+sub buffer_closed {
530
+	my $buffer = pop;
531
+
532
+	delete $partbuf{$buffer};
533
+	return weechat::WEECHAT_RC_OK;
534
+}
535
+
536
+sub client_join
537
+{
538
+	my (undef, $server, $channel) = (shift,
539
+		shift =~ /(.+),irc_out1_join/i,
540
+		shift =~ /^join :?([^ ]*)/i);
541
+	($server, $channel) = (lc $server, lc $channel);
542
+
543
+	reset_gc();
544
+
545
+	($_ eq '0' ? %{$channels{$server}} = () : $zombie{$server}{$_} = 1)
546
+		for (split ',', $channel);
547
+	return weechat::WEECHAT_RC_OK;
548
+}
549
+
550
+sub client_part
551
+{
552
+	my (undef, $server, $channel) = (shift,
553
+		shift =~ /(.+),irc_out1_part/i,
554
+		shift =~ /^part ([^ ]*)/i);
555
+	($server, $channel) = (lc $server, lc $channel);
556
+
557
+	delete $channels{$server}{$_} for (split ',', $channel);
558
+	return weechat::WEECHAT_RC_OK;
559
+}
560
+
561
+# RPL_WELCOME
562
+sub irc_001
563
+{
564
+	my (undef, $server, $message) = (shift,
565
+		shift =~ /(.+),irc_raw_in_001/, shift);
566
+
567
+	$server = lc $server;
568
+	return weechat::WEECHAT_RC_OK unless $message =~ / :- Welcome to ZNC -$/;
569
+
570
+	my $ignore_conf = lc weechat::config_get_plugin('ignore');
571
+	return weechat::WEECHAT_RC_OK if $ignore_conf =~ /(^|,)$server($|,)/;
572
+
573
+	weechat::config_set_plugin('ignore', "$ignore_conf,$server");
574
+
575
+	return weechat::WEECHAT_RC_OK;
576
+}
577
+
578
+sub irc_join
579
+{
580
+	my ($server, $message, $msghash) = (lc $_[2], $_[3], ircparse($_[3]));
581
+	my ($nick, $channel) = ($msghash->{nick}, lc $msghash->{channel});
582
+	my $buffer = ircbuf("$server.$channel");
583
+
584
+	return $message if exists $channels{$server}{$channel};
585
+	if (exists $zombie{$server}{$channel} || ignored($server)) {
586
+		delete $zombie{$server}{$channel};
587
+		$channels{$server}{$channel} = 1;
588
+		return $message;
589
+	}
590
+	# XXX return $message unless mynick($buffer, $nick);
591
+
592
+	$part{$server}{$channel} = 1;
593
+	$timeout_cb = weechat::hook_timer(
594
+		weechat::config_get_plugin('delay'), 0, 1, 'irc_join_delay', $buffer)
595
+		unless $timeout_cb || !weechat::config_get_plugin('autopart');
596
+
597
+	return $message unless nobufs();
598
+
599
+	$fuckbuf = weechat::buffer_new(
600
+		'antifuck',
601
+		'fuckbuf_input',
602
+		'',
603
+		'fuckbuf_close',
604
+		''
605
+		) unless $fuckbuf;
606
+	weechat::print($fuckbuf, weechat::prefix('join').
607
+		weechat::color('irc.color.message_join').
608
+		'You were forced to join '.weechat::color('chat_channel').$channel.
609
+		weechat::color('irc.color.message_join').', leaving');
610
+
611
+	return '';
612
+}
613
+
614
+# RPL_ENDOFNAMES
615
+sub irc_366
616
+{
617
+	my ($server, $message) = ($_[2], $_[3]);
618
+	my ($nick, $channel) = $message =~ /^:[^ ]* 366 ([^ ]*) ([^ ]*)/i;
619
+	my $buffer = ircbuf("$server.$channel");
620
+	($server, $channel) = (lc $server, lc $channel);
621
+
622
+	return $message if exists $channels{$server}{$channel};
623
+	return '' if nobufs();
624
+
625
+	weechat::print($buffer, weechat::prefix('network').
626
+		'Forcejoined, not syncing modes');
627
+
628
+	return '';
629
+}
630
+
631
+# ERR_LINKCHANNEL
632
+sub irc_470
633
+{
634
+	my (undef, $server, $oldchan, $newchan) = (shift,
635
+		shift =~ /(.+),irc_raw_in_470/,
636
+		shift =~ /^:[^ ]* 470 [^ ]+ ([^ ]+) ([^ ]+)/);
637
+	($server, $oldchan, $newchan) = (lc $server, lc $oldchan, lc $newchan);
638
+
639
+	delete $channels{$server}{$oldchan};
640
+	$channels{$server}{$newchan} = 1 if weechat::config_get_plugin('forward');
641
+	return weechat::WEECHAT_RC_OK;
642
+}
643
+
644
+sub irc_join_delay
645
+{
646
+	my $buffer = shift;
647
+
648
+	for my $server (keys %part) {
649
+		my $chans = '';
650
+
651
+		for my $chan (keys %{$part{$server}}) {
652
+			if (length($chans) + length($chan) > 500) {
653
+				weechat::hook_signal_send('irc_input_send',
654
+					weechat::WEECHAT_HOOK_SIGNAL_STRING,
655
+					"$server;;priority_low;;/part $chans");
656
+				$chans = '';
657
+			}
658
+
659
+			$chans .= "$chan,";
660
+		}
661
+
662
+		weechat::hook_signal_send('irc_input_send',
663
+			weechat::WEECHAT_HOOK_SIGNAL_STRING,
664
+			"$server;;priority_low;;/part $chans");
665
+	}
666
+	$timeout_cb = '';
667
+	%part = ();
668
+	return weechat::WEECHAT_RC_OK;
669
+}
670
+
671
+sub run_gc
672
+{
673
+	%zombie = ();
674
+	return weechat::WEECHAT_RC_OK;
675
+}
676
+
677
+sub irc_part
678
+{
679
+	my ($server, $message, $msghash) = ($_[2], $_[3], ircparse($_[3]));
680
+	my ($arj, $arj_delay, $arjd, $arjd_delay) = (
681
+		weechat::config_get("irc.server.$server.autorejoin"),
682
+		weechat::config_get("irc.server.$server.autorejoin_delay"),
683
+		weechat::config_get("irc.server_default.autorejoin"),
684
+		weechat::config_get("irc.server_default.autorejoin_delay")
685
+		);
686
+	return $message unless (
687
+		weechat::config_option_is_null($arj) ?
688
+		weechat::config_boolean($arjd) :
689
+		weechat::config_boolean($arj)
690
+		);
691
+
692
+	my ($nick, $channel, $reason) = ($msghash->{nick}, $msghash->{channel},
693
+		$msghash->{text});
694
+
695
+	my $buffer = ircbuf("$server.$channel");
696
+	my ($lserver, $lchannel) = (lc $server, lc $channel);
697
+
698
+	return $message unless mynick($buffer, $nick);
699
+	return $message unless exists $channels{$lserver}{$lchannel};
700
+	return $message if ignored($lserver);
701
+
702
+	weechat::print($buffer, weechat::prefix('quit').
703
+		weechat::color('irc.color.message_quit').
704
+		'You were forced to part '.weechat::color('chat_channel').$channel.
705
+		weechat::color('chat_delimiters').' ('.weechat::color('reset').
706
+		$reason.weechat::color('chat_delimiters').')'.
707
+		weechat::color('irc.color.message_quit').', rejoining');
708
+	my $delay = (
709
+		weechat::config_option_is_null($arj_delay) ?
710
+		weechat::config_integer($arjd_delay) :
711
+		weechat::config_integer($arj_delay)
712
+		);
713
+	weechat::command($buffer, ($delay ? "/wait $delay " : "").
714
+		"/join $channel");
715
+
716
+	return '';
717
+}
718
diff --git a/scripts/perl/cflood.pl b/scripts/perl/cflood.pl
719
new file mode 100644
720
index 0000000..49825da
721
--- /dev/null
722
+++ b/scripts/perl/cflood.pl
723
@@ -0,0 +1,150 @@
724
+#{{{ BSD License
725
+# Copyright (c) 2008 hzu/zionist
726
+# All rights reserved.
727
+#
728
+# Redistribution and use in source and binary forms, with or
729
+# without modification, are permitted provided that the following
730
+# conditions are met:
731
+#
732
+# 1. Redistributions of source code must retain the above copyright
733
+#    notice, this list of conditions and the following disclaimer.
734
+# 2. The name of the author may not be used to endorse or promote products
735
+#    derived from this software without specific prior written permission.
736
+#
737
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
738
+# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
739
+# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
740
+# THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
741
+# EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLUDING, BUT NOT LIMITED TO,
742
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
743
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
744
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
745
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
746
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
747
+#}}}
748
+
749
+# Ported from irssi to WeeChat by the Krusty Krab
750
+
751
+use strict;
752
+use warnings;
753
+no strict 'subs';
754
+
755
+my $SCRIPT_NAME = 'colourflood';
756
+my $SCRIPT_AUTHOR = 'hzu';
757
+my $SCRIPT_VERSION = '0.3';
758
+my $SCRIPT_LICENCE = 'BSD';
759
+my $SCRIPT_DESC = 'A-rab style ircing';
760
+
761
+my $USAGE = <<EOF;
762
+options:
763
+    -r      Random back & foreground colours (default)
764
+    -f      Amount of times the message is flooded
765
+    -fg     font colour, available colours:
766
+                black, blue, green
767
+                lightred, red, magenta, orange
768
+                yellow, lightgreen, cyan,
769
+                lightcyan, lightblue,
770
+                lightmagenta, gray, lightgray.
771
+    -bg     background colour, available colours:
772
+                black, blue, green, red,
773
+                magenta, orange, green, cyan,
774
+                lightcyan, lightblue,
775
+                lightmagenta, gray, lightgray
776
+EOF
777
+
778
+our %clr = (
779
+  black        => 1,
780
+  blue         => 2,
781
+  green        => 3,
782
+  lightred     => 4,
783
+  red          => 5,
784
+  magenta      => 6,
785
+  orange       => 7,
786
+  yellow       => 8,
787
+  lightgreen   => 9,
788
+  cyan         => 10,
789
+  lightcyan    => 11,
790
+  lightblue    => 12,
791
+  lightmagenta => 13,
792
+  gray         => 14,
793
+  lightgray    => 15,
794
+);
795
+
796
+if (weechat::register($SCRIPT_NAME, $SCRIPT_AUTHOR, $SCRIPT_VERSION,
797
+ $SCRIPT_LICENCE, $SCRIPT_DESC, '', '')) {
798
+	weechat::hook_command('cflood', $SCRIPT_DESC, '[options] text',
799
+		$USAGE, '', 'cmd_cflood', '');
800
+
801
+	my %OPTIONS = (
802
+		dir => ['Database directory',
803
+			weechat::info_get('weechat_dir', '').'/yiffs'],
804
+		db => ['Default database', 'yiffs'],
805
+		solodb => ['Default database when nick is omitted', 'solos'],
806
+		);
807
+
808
+	for my $option (keys %OPTIONS) {
809
+		weechat::config_set_plugin($option, $OPTIONS{$option}[1])
810
+		 unless weechat::config_is_set_plugin($option);
811
+		weechat::config_set_desc_plugin($option, $OPTIONS{$option}[0]);
812
+	}
813
+}
814
+
815
+sub colour {
816
+	my ($fg, $bg, $text) = @_;
817
+	my $fore = ($fg =~ /^[0-9][0-9]?$/) ? $fg : $clr{$fg};
818
+	my $back = ($fg =~ /^[0-9][0-9]?$/) ? $bg : $clr{$bg};
819
+	$fore-- if $fore == $back;
820
+	$text = "\003$fore,$back $text \003$back,$fore $text ";
821
+	$text x= (int 400 / length $text);
822
+	return "$text\003";
823
+}
824
+
825
+sub parse {
826
+	my @args = ( split / +/, shift );
827
+	my ( %todo, $text, $body );
828
+
829
+	while ( ($_ = shift @args) ne '' ) {
830
+		/^-r$/ and next;
831
+		/^-f$/ and $todo{f} = shift @args, next;
832
+		/^-fg$/ and $todo{fg} = shift @args, next;
833
+		/^-bg$/ and $todo{bg} = shift @args, next;
834
+		/^-/ and weechat::print('', weechat::prefix('error').
835
+			'Invalid arguments (see /help cflood)'), return;
836
+		$text = @args < 1 ? $_ : "$_ " . join ' ', @args;
837
+		last;
838
+	}
839
+
840
+	if (!(defined $todo{fg}) || !(defined $todo{bg})) {
841
+		$body = "";
842
+		my @rnd_clr = keys %clr;
843
+		foreach ( 1 .. (defined $todo{f} ? $todo{f} : 1 ) ) {
844
+			$body .= colour($rnd_clr[rand @rnd_clr],
845
+				$rnd_clr[rand @rnd_clr], $text, $todo{f});
846
+			$body .= "\n";
847
+		}
848
+	} else {
849
+		$body = "";
850
+		foreach ( 1 .. (defined $todo{f} ? $todo{f} : 1 ) ) {
851
+			$body .= colour( $todo{fg}, $todo{bg}, $text );
852
+			$body .= "\n";
853
+		}
854
+	}
855
+	return $body;
856
+}
857
+
858
+sub cmd_cflood {
859
+	my (undef, $buffer, $data) = @_;
860
+	my $ret;
861
+
862
+	return weechat::WEECHAT_RC_OK if ($data eq '');
863
+
864
+	chomp( $ret = parse($data) );
865
+
866
+	if ($ret =~ /\n/) {
867
+		map { weechat::command($buffer, "/msg * $_") } (split /\n/, $ret);
868
+	} else { 
869
+		weechat::command($buffer, "/msg * $ret");
870
+	}
871
+
872
+	return weechat::WEECHAT_RC_OK;
873
+}
874
diff --git a/scripts/perl/color_popup.pl b/scripts/perl/color_popup.pl
875
new file mode 100644
876
index 0000000..02ea51c
877
--- /dev/null
878
+++ b/scripts/perl/color_popup.pl
879
@@ -0,0 +1,38 @@
880
+use strict; use warnings;
881
+$INC{'Encode/ConfigLocal.pm'}=1;
882
+require Encode;
883
+use utf8;
884
+
885
+use constant SCRIPT_NAME => 'color_popup';
886
+weechat::register(SCRIPT_NAME, 'Nei <anti.teamidiot.de>', '0.4', 'GPL3', 'show mirc color codes', '', '') || return;
887
+
888
+my %ones = map { $_ => 1 } 0, 8, 14, 15, 42, 43, 45, 53 .. 58, 65 .. 86, 95 .. 98;
889
+weechat::hook_modifier('input_text_display_with_cursor', 'color_popup', '');
890
+
891
+## color_popup -- show mirc colors
892
+## () - modifier handler
893
+## $_[2] - buffer pointer
894
+## $_[3] - input string
895
+## returns modified input string
896
+sub color_popup {
897
+	Encode::_utf8_on($_[3]);
898
+	my $cc = qr/(?:\03(?:\d{1,2}(?:,(?:\d{1,2})?)?)?|\02|\x1d|\x0f|\x12|\x15|\x16|\x1f)/;
899
+	my ($p1, $x, $p2) = split /((?:$cc)?\x19b#)/, $_[3], 2;
900
+	for ($p1, $p2) {
901
+		s/($cc)/$1■/g if weechat::config_string_to_boolean(weechat::config_get_plugin('reveal'));
902
+		Encode::_utf8_on($_ = weechat::hook_modifier_exec(irc_color_decode => 1, weechat::hook_modifier_exec(irc_color_encode => 1, $_)));
903
+	}
904
+	$x .= ' ' . weechat::hook_modifier_exec(
905
+	    irc_color_decode => 1, sub {
906
+		$x =~ /\cC(\d{1,2})(,(\d{1,2})?)?/;
907
+		my ($fg, $bg) = ($1//-1, $3//-1);
908
+		my $sc = $bg >= 0 ? $bg : $2?-1:$fg;
909
+		(join '', map {
910
+		     "\03" . ($ones{0+$_} // 0) . ",$_$_"
911
+		}
912
+		    $sc >= 0 ? grep /^0?$sc/, '00' .. '99' : ('00' .. '15'))
913
+		. "\03"
914
+	    }->()
915
+	   ) if $x =~ /^\03/ and weechat::current_buffer() eq $_[2];
916
+	"$p1$x$p2"
917
+}
918
diff --git a/scripts/perl/fuckyou.pl b/scripts/perl/fuckyou.pl
919
new file mode 100644
920
index 0000000..c2c4fca
921
--- /dev/null
922
+++ b/scripts/perl/fuckyou.pl
923
@@ -0,0 +1,188 @@
924
+# Ported from irssi to WeeChat by the Krusty Krab
925
+
926
+use Time::HiRes qw(time);
927
+use Digest::MD5 qw(md5_hex);
928
+
929
+
930
+#__        ___    ____  _   _ ___ _   _  ____   _   _ ____ ___ _   _  ____
931
+#\ \      / / \  |  _ \| \ | |_ _| \ | |/ ___| | | | / ___|_ _| \ | |/ ___|
932
+# \ \ /\ / / _ \ | |_) |  \| || ||  \| | |  _  | | | \___ \| ||  \| | |  _
933
+#  \ V  V / ___ \|  _ <| |\  || || |\  | |_| | | |_| |___) | || |\  | |_| |
934
+#   \_/\_/_/   \_\_| \_\_| \_|___|_| \_|\____|  \___/|____/___|_| \_|\____|
935
+#
936
+# _____ _   _ _____ ____  _____   ____   ____ ____  ___ ____ _____ ____
937
+#|_   _| | | | ____/ ___|| ____| / ___| / ___|  _ \|_ _|  _ \_   _/ ___|
938
+#  | | | |_| |  _| \___ \|  _|   \___ \| |   | |_) || || |_) || | \___ \
939
+#  | | |  _  | |___ ___) | |___   ___) | |___|  _ < | ||  __/ | |  ___) |
940
+#  |_| |_| |_|_____|____/|_____| |____/ \____|_| \_\___|_|    |_| |____/
941
+#
942
+# __  __    _ __   __  ____  _____    _    _     _  __   __
943
+#|  \/  |  / \\ \ / / |  _ \| ____|  / \  | |   | | \ \ / /
944
+#| |\/| | / _ \\ V /  | |_) |  _|   / _ \ | |   | |  \ \//
945
+#| |  | |/ ___ \| |   |  _ <| |___ / ___ \| |___| |___| |
946
+#|_|  |_/_/   \_\_|   |_| \_\_____/_/   \_\_____|_____|_|
947
+#
948
+# _____ _   _  ____ _  _____ _   _  ____      _    _   _ _   _  _____   __
949
+#|  ___| | | |/ ___| |/ /_ _| \ | |/ ___|    / \  | \ | | \ | |/ _ \ \ / /
950
+#| |_  | | | | |   | ' / | ||  \| | |  _    / _ \ |  \| |  \| | | | \ V /
951
+#|  _| | |_| | |___| . \ | || |\  | |_| |  / ___ \| |\  | |\  | |_| || |
952
+#|_|    \___/ \____|_|\_\___|_| \_|\____| /_/   \_\_| \_|_| \_|\___/ |_|
953
+#
954
+#__   _____  _   _ ____    _   _ ____  _____ ____  ____
955
+#\ \ / / _ \| | | |  _ \  | | | / ___|| ____|  _ \/ ___|
956
+# \ V / | | | | | | |_) | | | | \___ \|  _| | |_) \___ \
957
+#  | || |_| | |_| |  _ <  | |_| |___) | |___|  _ < ___) |
958
+#  |_| \___/ \___/|_| \_\  \___/|____/|_____|_| \_\____/
959
+
960
+
961
+my $SCRIPT_NAME = 'fuckyou';
962
+my $SCRIPT_AUTHOR = 'Goat-See <mrtheplague@gmail.com>';
963
+my $SCRIPT_VERSION = '2.3';
964
+my $SCRIPT_LICENCE = 'urmom';
965
+my $SCRIPT_DESC = '/fuckyou NICK numberchannels';
966
+
967
+my %OPTIONS = (
968
+	forcejoin => ['Command to forcejoin. ratbox uses forcejoin, unreal sajoin',
969
+		'forcejoin'],
970
+	forcepart => ['Command to forcepart. ratbox uses forcepart, unreal sapart',
971
+		'forcepart'],
972
+	furry => ['Channel prefix (include # or &)', '&HYE'],
973
+	parallel => ['Number of channels to send per forcejoin command', 1],
974
+	whois_cmd => ['Prefix to whois user (e.g. for ratbox operspy, "/whois !")',
975
+		'/whois '],
976
+	);
977
+
978
+sub fuckyou
979
+{
980
+	my $buffer = shift;
981
+	my $nig = $$ * time;
982
+	my @jews;
983
+	push @jews, "${FURRY}_".md5_hex($nig + $_) for (1..$PARALLEL);
984
+
985
+	weechat::command($buffer, "/quote $FORCEJOIN $target ".join(',', @jews));
986
+
987
+	return weechat::WEECHAT_RC_OK;
988
+}
989
+
990
+sub cmd_fuckyou
991
+{
992
+	my (undef, $buffer, $data) = @_;
993
+	my $server = weechat::buffer_get_string($buffer, 'localvar_server');
994
+	my $amt_end;
995
+	($target, $amt_end) = split / +/, $data;
996
+	our ($FORCEJOIN, $FURRY, $PARALLEL) = (
997
+		weechat::config_get_plugin('forcejoin'),
998
+		weechat::config_get_plugin('furry'),
999
+		weechat::config_get_plugin('parallel'));