-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtkbadword.tcl
705 lines (561 loc) · 19.9 KB
/
tkbadword.tcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
# description: Kicks/Bans people who say bad words. Words/pharses are stored in a file. Op protect is allowed. You can add/del/list words/pharses via priv msg. You don't need to rehash/restart your bot. You can define ban duration time etc. Script is very simple to use.
# Author: tomekk
# e-mail: tomekk/@/oswiecim/./eu/./org
# home page: http://tomekk.oswiecim.eu.org/
#
# Version 0.10
#
# This file is Copyrighted under the GNU Public License.
# http://www.gnu.org/copyleft/gpl.html
# ****** please delete old 'banned hosts file', there is a small change in 0.10 (neeed for ban on-join-restoration) ******
# if you need utf-8 support, please read this -> http://eggwiki.org/Utf-8
# fixed: some code fixes, read below - script is now much better, i think... :o)
# changed: from now, if you want to use this script on your channel you have to use .chanset before (info below)
# added: channel triggers, custom triggers names without script mods
# added: user nick tracking, nick change doesn't work now (ban avoiding)
# added: separate users files for each channel
# fixed: from now, if someone removes ban for the user which should be banned, bot will ban this user when he join the channel again
# some examples:
# you want to punish users for word 'test', no matter on which place in text line
# /msg <botnick> bword add *test*, this will match: test, text test, test text, text test text, texttesttext
# you want to punish users for single word 'test'
# /msg <botnick> bword addr test, this will match: test, text test, test text, text test text
# you want to punish users for 'test' and some text after it
# /msg <botnick> bword add test *, this will match: test text
# you want to punish users for pharse which starts with 'test' and ends with 'cool'
# /msg <botnick> bword add test*cool, this will match: test text cool, testcool
# you want to punish users for 'test', 'tess', 'tesx', 'tesa'
# /msg <botnick> bword add test?, this will match: test, tess, tesx, tesa, but no tes - ? means any char, not null
# you want to punish users for pharse witch starts with 'test', ends with 'cool' and with '*' between
# /msg <botnick> bword add test*\**cool, this will match: test text* cool, test*cool, test *text cool, test text*text cool, etc.
# you want to punish users for 'hello?'
# /msg <botnick> bword add hello\?, this will match: hello?
# you want punish users for 'test<single_number>test'
# /msg <botnick> bword add test[0-9]test, this will match: test0test, test1test, test2test etc.
# of course you can make more complicated sequences, like:
# /msg <botnick> bword add hello?*here*, this will match: hello? some1 here?, hello? tom are u here?????, hello! hello! are u here????
# etc etc, i think this is simple ;)
# remember, if you want to use chars: * ? [ ] \ like non special chars, you need to escape them with \, like: \* \? \[ \] \\
# USE '/msg <botnick> bword' for more information
# if you want to use this script on your chan, type in eggdrop console (via telnet or DCC chat)
# .chanset #channel_name +bword
# and later .save
# host allowed to use 'bword' commands
set bdw_hosts {*@siniStar.*.IRC4Fun.net}
# control script via (triggers binds below)
# 1 - priv msgs triggers
# 2 - chan triggers
set control_via 1
# sets ban type
# 1) *!*@*.domain.com
# 2) *!*@some.domain.com
# 3) *nick*!*@some.domain.com
# 4) *!*ident*@some.domain.com
set btype 2
# 1 - protect users with op, 0 - don't
set protectops 1
# 1 - enable ban, 0 - disable ban (just kick after bad word)
set want_ban 1
# wait 'waitb' times before ban, works only when want_ban is set to 1
# if you want to ban user after one bad word, set 'waitb' to 0
set waitb 0
# 'waitb' info type, works only when want_ban is set to 1
# 1 - kick after bad word and ban after 'waitb' times
# 2 - write message after bad word to the nick, 'nick: message' and ban after 'waitb' times
# 3 - do nothing, just ban after 'waitb' times
set waitb_type 3
# kick message.
set kmsg "bad word! - kick"
# ban message.
set bmsg "banned!"
# if you set 'waitb' to 2, then here is a option to set this message
set waitb_message "watch your language kid !"
# ban duration time (minutes, +/- 30 seconds for ban checker loop)
# 0 - infinite
set ban_duration 15
# "offence" duration time, how long bot should remember last bad word time (minutes)
# 0 - infinite
set offence_duration 0
# reload words/pharses DB every x minutes (this means that the new word will work after X minutes)
# bot loads whole word DB into memory
set reload_words_db_every 1440
# bind the triggers
# chan triggers
set action_bind(chan_add) "!bwordadd"
set action_bind(chan_addr) "!bwordaddr"
set action_bind(chan_del) "!bworddel"
set action_bind(chan_delr) "!bworddelr"
set action_bind(chan_list) "!bwordlist"
# priv triggers
set action_bind(priv_add) "add"
set action_bind(priv_addr) "addr"
set action_bind(priv_del) "del"
set action_bind(priv_delr) "delr"
set action_bind(priv_list) "list"
# dirs and files, better leave it as it is ;)
# base directory
set dirname "badwords.db"
# users directory [lusers / $channame / $user]
# separate data for each channel
set usersdir "$dirname/lusers"
# banned hosts file
set banned_hosts "$dirname/bndhosts"
# dbase with bad words
set bw_dbase "$dirname/words_bank.db"
##################################################################
bind pubm - "*" word_fct
bind nick - "*" nick_tracking
bind join - "*" nick_join
if {$control_via == 1} {
bind msgm - "*" bpmsg_fct
}
if {$control_via == 2} {
bind pub - $action_bind(chan_add) chan_trigger_add
bind pub - $action_bind(chan_addr) chan_trigger_addr
bind pub - $action_bind(chan_del) chan_trigger_del
bind pub - $action_bind(chan_delr) chan_trigger_delr
bind pub - $action_bind(chan_list) chan_trigger_list
}
setudef flag bword
if {[file exists $dirname] == 0} {
file mkdir $dirname
set crtdb [open $bw_dbase a+]
puts $crtdb "fuck\nshit\n* fuck *\n* shit *\nfuck *\nshit *\n* shit\n* fuck"
close $crtdb
}
if {[file exists $usersdir] == 0} {
file mkdir $usersdir
}
proc create_db { dbname definfo } {
if {[file exists $dbname] == 0} {
set crtdb [open $dbname a+]
puts $crtdb "$definfo"
close $crtdb
}
}
proc readdb { rdb } {
set fs_open [open $rdb r]
gets $fs_open dbout
close $fs_open
return $dbout
}
proc get_user_host { chan nick } {
global usersdir
set user_data [lindex [split [readdb $usersdir/$chan/$nick] "&"] 0]
return $user_data
}
proc get_all_lines { db } {
set bf [open $db r]
set all_lines [read $bf]
close $bf
set lines_split [split $all_lines "\n"]
return $lines_split
}
proc add_new_bword { bword } {
global bw_dbase
set bfile_handle [open $bw_dbase a]
puts $bfile_handle "$bword"
close $bfile_handle
}
proc add_new_bnd_host { new_host } {
global banned_hosts
set bnd_hosts [open $banned_hosts a]
puts $bnd_hosts $new_host
close $bnd_hosts
}
proc bnd_host_mask_update { chan uhost ban_mask} {
global banned_hosts
set before_update [get_all_lines $banned_hosts]
set after_update [open $banned_hosts w]
foreach old_host $before_update {
if {$old_host != ""} {
set old_host_data [split $old_host "&"]
set old_host_chan [lindex $old_host_data 0]
set old_host_host [lindex $old_host_data 1]
set old_host_time [lindex $old_host_data 2]
set old_host_mask [lindex $old_host_data 3]
set skip 0
if {$uhost == $old_host_host} {
if {$chan == $old_host_chan} {
puts $after_update "$old_host_chan&$old_host_host&$old_host_time&$ban_mask"
set skip 1
}
}
if {$skip == 0} {
puts $after_update "$old_host_chan&$old_host_host&$old_host_time&$old_host_mask"
}
}
}
close $after_update
}
proc delete_bword { dbword {dlall 0}} {
global bw_dbase
set old_bwdb [get_all_lines $bw_dbase]
set file_tow [open $bw_dbase w]
if {$dlall == 0} {
foreach chk_bw $old_bwdb {
if {$chk_bw != $dbword} {
if {$chk_bw != ""} {
puts $file_tow $chk_bw
}
}
}
}
close $file_tow
}
proc check_bw_exist { chword } {
global bw_dbase
set old_chbwdb [get_all_lines $bw_dbase]
set bw_exist 0
foreach check_bword $old_chbwdb {
if {[string match $chword $check_bword]} {
set bw_exist 1
}
}
return $bw_exist
}
proc ban_checker_timer { } {
ban_checker
if {[string match *ban_checker_timer* [utimers]] != 1} {
utimer 20 ban_checker_timer
}
}
proc words_reload_timer { } {
global nasty_words reload_words_db_every bw_dbase
set nasty_words [get_all_lines $bw_dbase]
putlog "tkbadword.tcl - reloading words DB"
if {[string match *words_reload_timer* [timers]] != 1} {
timer $reload_words_db_every words_reload_timer
}
}
set nasty_words [get_all_lines $bw_dbase]
proc word_fct { nick uhost hand chan arg } {
global botnick protectops usersdir waitb waitb_type waitb_message want_ban kmsg bmsg offence_duration ban_duration bdw_channels nasty_words action_bind
set arg [string trim $arg]
if {![channel get $chan bword]} {
return
}
# exceptions
set chan_binds {chan_add chan_addr chan_del chan_delr}
foreach chan_bind $chan_binds {
if {[string match $action_bind($chan_bind)* $arg]} {
return
}
}
if {$protectops == 1} {
if {[isop $nick $chan] == 1} {
return
}
}
# channel dir
if {![file exists $usersdir/$chan ]} {
file mkdir $usersdir/$chan
}
set kill 0
set ban_status 0
foreach i [string tolower $nasty_words] {
if {$i != ""} {
if {[string match $i [string tolower $arg]]} {
set kill 1
}
}
}
if {$kill == 1} {
if {$want_ban == 1} {
set time_in_seconds [clock seconds]
set user_ban_mask [banmask $uhost $nick]
if {$waitb == 0} {
putserv "KILL $nick :Spam is off-topic on IRC4Fun"
putserv "GLINE +$user_ban_mask * 3600 :Banned for spamming. If in error, contact [email protected]"
putserv "PRIVMSG Uworld2 :GLINE ADD $user_ban_mask !T 14d Banned for spamming. If in error, contact [email protected] with GID#."
# putserv "PRIVMSG X :BAN $chan $nick 30d 75 Spam"
# putquick "MODE $chan +b $user_ban_mask"
putserv "PRIVMSG #Opers :*** \002Warning\002 SpamTrap activated by $nick ($user_ban_mask) in \002$chan\002"
add_new_bnd_host "$chan&$uhost&$time_in_seconds&$user_ban_mask"
putkick $chan $nick $bmsg
set ban_status 1
} {
if {[file exists $usersdir/$chan/$nick] == 0} {
create_db "$usersdir/$chan/$nick" "$uhost&1&$time_in_seconds"
} {
set each_user_data [split [readdb "$usersdir/$chan/$nick"] "&"]
set ident [lindex $each_user_data 0]
set times [lindex $each_user_data 1]
set first_time [lindex $each_user_data 2]
if {([expr $time_in_seconds - $first_time] >= [expr $offence_duration * 60]) && ($offence_duration > 0)} {
file delete $usersdir/$chan/$nick
create_db "$usersdir/$chan/$nick" "$uhost&1&$time_in_seconds"
} {
file delete $usersdir/$chan/$nick
set overall [expr $times + 1]
create_db "$usersdir/$chan/$nick" "$ident&$overall&$first_time"
set ident [lindex [split [readdb "$usersdir/$chan/$nick"] "&"] 0]
if {$uhost == $ident} {
if {$overall >= $waitb} {
putserv "KILL $nick :Spam is off-topic on IRC4Fun"
putserv "GLINE +$user_ban_mask * 3600 :Banned for spamming. If in error, contact [email protected]"
putserv "PRIVMSG Uworld2 :GLINE ADD $user_ban_mask !T 14d Banned for spamming. If in error, contact [email protected] with GID#."
# putserv "PRIVMSG Uworld2 :AKILL ADD $nick !T 7d Spam is off-topic on IRC4Fun"
# putserv "PRIVMSG X :BAN $chan $nick 30d 75 Spam"
# putquick "MODE $chan +b $user_ban_mask"
putserv "PRIVMSG #Opers :*** \002Warning\002 SpamTrap activated by $nick ($user_ban_mask) in \002$chan\002"
add_new_bnd_host "$chan&$uhost&$time_in_seconds&$user_ban_mask"
file delete $usersdir/$chan/$nick
putkick $chan $nick $bmsg
set ban_status 1
}
} {
file delete $usersdir/$chan/$nick
create_db "$usersdir/$chan/$nick" "$uhost&1"
}
}
}
if {($ban_status == 0) && ($waitb_type < 3)} {
if {$waitb_type == 1} {
putkick $chan $nick $bmsg
} {
putquick "PRIVMSG $chan :$nick: $waitb_message"
}
}
}
} {
putkick $chan $nick $kmsg
}
}
}
proc chan_trigger_add { nick uhost hand chan arg } {
bpmsg_fct $nick $uhost $hand "bword add $arg"
}
proc chan_trigger_addr { nick uhost hand chan arg } {
bpmsg_fct $nick $uhost $hand "bword addr $arg"
}
proc chan_trigger_del { nick uhost hand chan arg } {
bpmsg_fct $nick $uhost $hand "bword del $arg"
}
proc chan_trigger_delr { nick uhost hand chan arg } {
bpmsg_fct $nick $uhost $hand "bword delr $arg"
}
proc chan_trigger_list { nick uhost hand chan arg } {
bpmsg_fct $nick $uhost $hand "bword list $arg"
}
proc bpmsg_fct { nick uhost hand arg } {
global bdw_hosts action_bind control_via bw_dbase
set check_host 0
foreach def_host $bdw_hosts {
if {$def_host != ""} {
if {[string match $def_host $uhost]} {
set check_host 1
break
}
}
}
if {$check_host == 0} {
return
}
set need_help 0
set all_bargs [split [string tolower $arg]]
set bargs_opt1 [lindex $all_bargs 0]
set bargs_opt2 [lindex $all_bargs 1]
set bargs_opt_newords [join [lrange $all_bargs 2 end]]
set bw_list [list]
# yeah, can be switch, who cares! ;-)
if {$bargs_opt1 == "bword"} {
if {$bargs_opt2 != ""} {
if {$bargs_opt2 == $action_bind(priv_add)} {
if {$bargs_opt_newords != ""} {
if {[check_bw_exist $bargs_opt_newords]} {
putquick "PRIVMSG $nick :word/pharse: '$bargs_opt_newords' allready exists"
} {
putquick "PRIVMSG $nick :word/pharse: '$bargs_opt_newords' has been added"
add_new_bword $bargs_opt_newords
}
} {
set need_help 1
}
} elseif {$bargs_opt2 == $action_bind(priv_addr)} {
if {$bargs_opt_newords != ""} {
if {[check_bw_exist $bargs_opt_newords]} {
putquick "PRIVMSG $nick :word/pharse: '$bargs_opt_newords' allready exists"
} {
putquick "PRIVMSG $nick :word/pharse: '$bargs_opt_newords' with regexps has been added"
add_new_bword "$bargs_opt_newords\n$bargs_opt_newords *\n* $bargs_opt_newords\n* $bargs_opt_newords *"
}
} {
set need_help 2
}
} elseif {$bargs_opt2 == $action_bind(priv_list)} {
set list_bwords [get_all_lines $bw_dbase]
if {$list_bwords != ""} {
foreach bw_word $list_bwords {
lappend bw_list "$bw_word"
}
putquick "PRIVMSG $nick :[join $bw_list ", "]"
} else {
putquick "PRIVMSG $nick :db is empty"
}
} elseif {$bargs_opt2 == $action_bind(priv_delr)} {
if {$bargs_opt_newords != ""} {
if {[check_bw_exist $bargs_opt_newords]} {
delete_bword $bargs_opt_newords
delete_bword "$bargs_opt_newords *"
delete_bword "* $bargs_opt_newords"
delete_bword "* $bargs_opt_newords *"
putquick "PRIVMSG $nick :word/pharse: '$bargs_opt_newords' with regexps has been deleted"
} {
putquick "PRIVMSG $nick :word/pharse: '$bargs_opt_newords' not found"
}
} {
set need_help 3
}
} elseif {$bargs_opt2 == $action_bind(priv_del)} {
if {$bargs_opt_newords != ""} {
if {$bargs_opt_newords == "delall"} {
delete_bword 0 1
putquick "PRIVMSG $nick :all words/pharses have been deleted"
} {
if {[check_bw_exist $bargs_opt_newords]} {
delete_bword $bargs_opt_newords
putquick "PRIVMSG $nick :word/pharse: '$bargs_opt_newords' has been deleted"
} {
putquick "PRIVMSG $nick :word/pharse: '$bargs_opt_newords' not found"
}
}
} {
set need_help 4
}
}
} {
set need_help 5
}
}
if {$need_help > 0} {
if {$control_via == 1} {
switch $need_help {
1 {
putquick "PRIVMSG $nick :use: /msg <botnick> bword $action_bind(priv_add) <word/pharse>"
}
2 {
putquick "PRIVMSG $nick :use: /msg <botnick> bword $action_bind(priv_addr) <word/pharse>"
}
3 {
putquick "PRIVMSG $nick :use: /msg <botnick> bword $action_bind(priv_delr) <word/pharse>"
}
4 {
putquick "PRIVMSG $nick :use: /msg <botnick> bword $action_bind(priv_del) <word/pharse>"
putquick "PRIVMSG $nick :if you want to delete all words/pharses use: /msg <botnick> $action_bind(priv_del) delall"
}
5 {
putquick "PRIVMSG $nick :use: /msg <botnick> bword <$action_bind(priv_add)|$action_bind(priv_addr)|$action_bind(priv_del)|$action_bind(priv_delr)|$action_bind(priv_list)>"
}
}
} else {
switch $need_help {
1 {
putquick "PRIVMSG $nick :use: $action_bind(chan_add) <word/pharse>"
}
2 {
putquick "PRIVMSG $nick :use: $action_bind(chan_addr) <word/pharse>"
}
3 {
putquick "PRIVMSG $nick :use: $action_bind(chan_delr) <word/pharse>"
}
4 {
putquick "PRIVMSG $nick :use: $action_bind(chan_del) <word/pharse>"
putquick "PRIVMSG $nick :if you want to delete all words use: $action_bind(chan_del) delall"
}
}
}
}
}
proc ban_checker { } {
global banned_hosts ban_duration
if {([file exists $banned_hosts]) && ($ban_duration > 0)} {
set banned_hts [get_all_lines $banned_hosts]
set time_in_seconds [clock seconds]
set rewrite_hosts_hand [open $banned_hosts w]
foreach banned_h $banned_hts {
if {$banned_h != ""} {
set split_banned_h [split $banned_h "&"]
set host_ban_chan [lindex $split_banned_h 0]
set host_ban_host [lindex $split_banned_h 1]
set host_ban_time [lindex $split_banned_h 2]
set host_ban_mask [lindex $split_banned_h 3]
if {[expr $time_in_seconds - $host_ban_time] >= [expr $ban_duration * 60]} {
putquick "MODE $host_ban_chan -b $host_ban_mask"
} {
puts $rewrite_hosts_hand "$host_ban_chan&$host_ban_host&$host_ban_time&$host_ban_mask"
}
}
}
close $rewrite_hosts_hand
}
}
proc nick_tracking { nick uhost hand chan newnick } {
global usersdir
if {![channel get $chan bword]} {
return
}
if {[file exists $usersdir/$chan/$nick]} {
file rename -force $usersdir/$chan/$nick $usersdir/$chan/$newnick
}
}
proc nick_join { nick uhost hand chan } {
global usersdir banned_hosts bmsg
if {![channel get $chan bword]} {
return
}
# compare nick and host in file
if {[file exists $usersdir/$chan/$nick]} {
if {$uhost != [get_user_host $chan $nick]} {
file delete $usersdir/$chan/$nick
}
}
# add ban if someone removed it
set banned_users [get_all_lines $banned_hosts]
foreach banned_user $banned_users {
if {$banned_user != ""} {
set banned_user_data [split $banned_user "&"]
set bn_user_chan [lindex $banned_user_data 0]
set bn_user_host [lindex $banned_user_data 1]
set bn_user_time [lindex $banned_user_data 2]
set bn_user_mask [lindex $banned_user_data 3]
if {$uhost == $bn_user_host} {
if {$chan == $bn_user_chan} {
set actual_ban_mask [banmask $uhost $nick]
#putserv "PRIVMSG Uworld2 :AKILL ADD $nick !T 7d Spam is off-topic on IRC4Fun"
putserv "PRIVMSG X :BAN $chan $nick 30d 75 Spam"
putquick "MODE $chan +b $actual_ban_mask"
putkick $chan $nick $bmsg
# update ban mask (someone could change it in script between joins)
bnd_host_mask_update $chan $uhost $actual_ban_mask
break
}
}
}
}
}
proc banmask { host nick } {
global btype
switch $btype {
1 {
set mask "*@[lindex [split [maskhost $host] "@"] 1]"
}
2 {
set mask "*@[lindex [split $host @] 1]"
}
3 {
set mask "*$nick*!*@[lindex [split $host "@"] 1]"
}
4 {
set mask "*!*[lindex [split $host "@"] 0]*@[lindex [split $host "@"] 1]"
}
return $mask
}
}
if {[string match *ban_checker_timer* [utimers]] != 1} {
utimer 30 ban_checker_timer
}
if {[string match *words_reload_timer* [timers]] != 1} {
timer $reload_words_db_every words_reload_timer
}
putlog "tkbadword.tcl (v0.11 by tomekk & siniStar) loaded"