-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathallprotection.tcl
2897 lines (2512 loc) · 113 KB
/
allprotection.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
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
###########################[ ALL PROTECTION 4.9b4 ]##########################
# #
# Author : Opposing a.k.a Sir_Fz (Fayez Zouheiry) #
# Version : 4.9b4 #
# Released: September 08, 2016 #
# Source: https://github.com/sirfz/allprotection.tcl #
## #
# Description: Has all kinds of channel protections + Botnet channel flood #
# protections and private protections. #
# #
# Commands: #
# DCC: #
# .ap:import <oldchan> <*/newchan> (This sets the AP settings #
# of <oldchan> on <newchan> or all chans if *) #
# .ap:reset <*/chan> (This will reset the AP settings of chan #
# or all chans if * to the default settings) #
# .ap:disable <*/chan> (This will disable all protections on #
# chan or all chans if *) #
# .ap:monitor (displays info about followed punishments) #
# .ap:add <list> <chan/global> <elements> #
# .ap:rem <list> <chan/global> <elements> #
# .ap:list <list> <chan/global> #
# .ap:priv <set/list> <setting> <value> (priv flood settings) #
# ** Available lists: bchans, bnicks, bidents, bwords, adexempts, #
# droneexempts, adwords, bctcrs & greetexempts. #
# #
# All protections are enabled via .chanset DCC command. #
# Use: .chaninfo to know AllProtection's settings (ap:<setting>) #
# NOTE: To set an AP channel setting use: (* means all channels) #
# .chanset <chan> <setting> <value> <btime> <punish> <btype> #
# #
# Credits: #
# - Thanks to my friend Salah Rifai who introduced me to Eggdrops #
# & *nix. He is the person who guided me to Eggdrops' resources. He #
# also was the founder of nexushells.net which was my first shell #
# which hosted my Eggdrop (Shrider). #
# - Thanks to http://forum.egghelp.org which was and still is my #
# tcl toutor, I've learned tcl through this community. #
# - Thanks to slennox for adding a link on the main page of #
# www.egghelp.org to the topic of AllProtection, and for hosting #
# the script on his site when my site went down. #
# - Thanks Silence, Marcel, dotslasher & others for reporting bugs #
# which was an important step for the developement of this script. #
# - Thanks to all who suggested ideas & features at egghelp.org. #
# - Used maskhost & wordwrap procs by user from the egghelp forum. #
# Edited wordwrap slightly to suite its purpose in the script. #
# - Used massmode proc's algorithm for ban-queueing (by user). #
# - Used checkbcd proc by Marcel (edited by me). #
# #
# History: #
# - 4.9b4: Eggdrop 1.8 compatibility (working Antispam bot). #
# - 4.9b3: bad nicks/nicks flood on nick-change punishment fixed. #
# Fixed punishment execution. Minor optimizations. #
# - 4.9b2: fixed bug introduced in 4.9b regarding clones count in #
# kick messages. #
# - 4.9b: Added bk punishment (ban then kick). Code formatting and #
# cleanup + some optimizations. #
# - 4.8: Updated contact information and LICENSE file. Centralized #
# version number. #
# - 4.7: Stable release of the 4.6 series. Got the bad nicks/idents #
# & perhaps other fixes I haven't logged. It was a good ride :) #
# - 4.6b9: The script would not ban if a channel was not added in #
# lower case; fixed now. Fixed other issues... #
# - 4.6b8: Integrated queues, enhanced AntiSpamBot, modulated #
# exempt types, scanning bad/excess chans and bad CTCP replies #
# when bot gains ops, flexible warn method (notice or privmsg), #
# fixed AntiSpamBot IP problem, added ability to exempt hostmasks #
# from greets by antispambot, AntiSpam bans spammers only if on #
# chan (optional), ability to immediately ban thru X, enable or #
# disable bad words/ads ban for quit/part, queue for bad/excess #
# chans scan. Punish bad chan users in all channels. #
# - 4.6b7: Throttle kicking (halt redundant kicks). Bad words/ads #
# now detected in notices, parts & quits. Choose CTCP requests 4 #
# bad ctcp replies (bad version before). Ability to ban thru X. #
# Following now occurs in 1 array (less memory). All flood types #
# now have a punishment method. Added AntiSpamBot. Enhancements #
# made over code. #
# - 4.6b6: Adding drone exempts via .ap:add cmd. Fixed undiscovered #
# exploit in string splitting (string2list). Added extra 2 ban #
# types. Added exemption for part msgs in revdoor protection. #
# Bad version-reply kick, set private flood settings via DCC, log #
# everyday (configurable), scan channels in intervals for bad or #
# excess chans or bad version-replies and ability to add custom #
# advertising words. #
# - 4.6b5: Fixed bugs in badchan and clones protections. Enhanced #
# advertisement detection to avoid false detections. #
# - 4.6b4: Fixed lists saving, uninstalling error. Added ability to #
# remove bans on full banlist + enhanced the drones detecting #
# procedure and the ap:import DCC command to accept *. #
# - 4.6b3: More code fixes and enhancements. You can now add words #
# to be exempted from advertising (channel specific as well) and #
# log bot's kicks and bans. Join flood can now check joins from #
# same idents if enabled. Implemented queueing bans. #
# - 4.6b2: Major coding changes, changed style of binding and procs #
# for better and faster performance. Reduced code & implemented #
# the use of namespaces in order not to conflict with other #
# scripts. Added excess chans protection + several bug fixes. #
# - 4.6b1: Major coding changes, added bad chans protections + bug #
# fixes. #
# #
# Report bugs/suggestions at https://github.com/sirfz/allprotection.tcl #
# #
# Copyright © 2005-2016 Opposing (aka Sir_Fz) #
# #
# This program is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program; if not, write to the Free Software #
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 #
# USA. #
# #
#############################################################################
#
########################
# SETTINGS & iNFO #
########################
### READ THIS FIRST:
# * AllProtection works best with eggdrop1.6.18 and above. (so upgrade)
#
# * AllProtection exempts channel ops, friends (+f) and masters (+mo) from protection by default.
# That means users with the +f or +mo flags will not be affected by any protection.
# (You can add hosts to the +f handle if you don't want the bot to ban them). To prevent from banning
# ChanServ, add chanserv to your bot with the +f or +mo flag.
#
# * AllProtection does not use the internal banlist of the bot so you will not have to worry
# about other ops not being able to remove the bans, they can! (feature or bug, I dont care :P)
#
# * AllProtection will not trigger protection on a channel where the bot is not oped, so your
# bot will not send redundant commands to the server. (good for the lag)
#
# * AllProtection strips control-codes (i.e. bold, underline, colors...etc) from text when checking for
# repeats, bad words or advertising.
#
# * All settings are enabled via .chanset DCC command. Example: .chanset #channel ap:textl 5:2 15 w:k:kb 2
# this will enable the text flood (lines) protection on #channel (punish on 5 lines or more in 2 seconds)
# 1st warn - 2nd kick - 3rd kickban. ban is 15 minutes and ban type is 2.
#
# * You can use mode lock modes such as "mR-k type.flood" which will work fine with AllProtection.
#
# * Adding elements to the lists (bad words, chans...etc) can ONLY be done via the DCC commands.
#
# * Read all the comments during configuration so you won't miss any important info.
### Enjoy configuring...
# You can change the name of the namespace (AllProtection).
namespace eval AllProtection {
## Basic declarations: (don't touch)
variable declr
foreach declr {textl textc notcl notcc capsp repeatf codesf adexempts adwords greetexempts adv antispam bwords
swear ctcpf massdeop massdeop masskick massb joinflood pmsgf revdoor nickflood eclones bnick bnicks drone
bident bidents droneexempts bchans bchan bctcrs bctcr apfp ptextl ptextc pnotil pnotic pctcpf NumKicks apudef
apqueue banthruX ap:udefs logkbs btclocked kckcount cbcd serv kline kcfop} { variable $declr }
unset declr
# Eggdrop version compatibility settings
variable _EGGDROP_1_8 1080000
if {$::numversion >= $_EGGDROP_1_8} {
variable _vhost4 $::vhost4
variable _vhost6 $::vhost6
variable _hostname $_vhost4
} {
variable _vhost4 ${::my-ip}
variable _vhost6 ""
variable _hostname ${::my-hostname}
}
## Basic declaraions complete
##############################
# Configurations start here: #
# __________________________ #
# Do you want your bot to queue bans? set here the time in seconds before dumping bans:
# NOTE: 0 means the bot will set the ban immediately
# The modes-per-line setting in eggdrop.conf is the number of modes allowed per command.
set apqueue(time) 1
# Set here the numbers of last bans to be removed on full banlist? (0: remove none)
# NOTE: Full banlist is when the channel has max-bans bans set. (from eggdrop.conf)
variable removebs 20
# Do you want the bot to ban through services?
# 0: Never
# 1: Only when banlist is full (determined by max-bans)
# 2: always
set banthruX(do) 0
# If banthruX is 1/2, set the command here to ban through services:
# %nick = nickname
# %ban = ban-mask
set banthruX(cmd) "privmsg X :ban %chan %ban %btime %level %reason"
# If banthruX is 1/2, set here the default level to be used on all channels
lappend ap:udefs {ap:level 75}
# Do you want AP to log all the kicks/bans done by the bot? (0: no, 1: daily, 2: forever)
set logkbs(do) 0
# If yes, set the logfile here: (will be reset everyday at 3:00 a.m.)
set logkbs(file) "logs/aplogs.log"
# Set here any additional exempts, you can exempt the following:
# ops: Channel ops
# halfops: Channel halfops
# voices: Channel voices
# +flags|+flags: Users with global or channel specific flags (e.g. +fm friends and masters...)
# -flags&-flags: Users which do not have the specified flags (e.g. -k&-k)
variable exmptype {ops voices +fmo|+fmo}
# Set here the handles of the users you want to notify when the bots locks a channel
# for mass (botnet) flood.
# example: set notifyusers {TheOwner LamerDude}
variable notifyusers {}
# Set here the notice to be sent to the channel when the bot locks the channel because of a
# Botnet flood. leave "" if you don't wish the notice to be sent.
set btclocked(lnotc) "Channel has been locked due to flood, sorry for any inconvenience this may have caused."
# What info do you wanna add to your kick message?
# After setting this variable, you can use $kckcount(form) to add a these info to the bot's
# kick msg.
### NOTE:
## %kcount = number of kicks.
## %btime = ban time
## %chan = channel name
## %date = kick date
## %rate = offenses in seconds, bad words/nicks/idents/chans/ads or clone/clones (depends on type of offense)
### PS: You can use the above directly in the kick message (not only here)
set kckcount(form) "(%rate) :: \[%date\] - Banned %btime minutes ·%kcount·"
# Set the file in which the number of kicks will be stored.
set kckcount(file) "scripts/kcount.txt"
# Do you want the bot to check for bad nicks/idents and clones when it first joins the channels
# and gains op ? (0: no , 1: yes)
# NOTE: This may be CPU intensive if your bot is on big channels or on alot of channels.
# NOTE: This may (probably will) cause huge self-lag on the bot.
set cbcd(check) 0
# If cbcd(check) is set to 1, change this if you want the bot to only check for certain types
# of protection in the nicklist.
# drones : Random drones
# clones : Excess clones and kick them
# bnicks : Bad nicks
# bidents: Bad idents.
# bchans : Bad/Excess channels.
# bctcrs : Bad CTCP replies
set cbcd(procs) {drones clones bnicks bidents bchans bctcrs}
# If cbcd(check) is set to 1, on what channels do you want it to be applied ? (use "*" to make it work on all chans)
# example: set cbcd(chans) "#chan1 #chan2"
set cbcd(chans) "*"
# Your service's chanserv nick.
# example: set serv(nick) "ChanServ" or "PRIVMSG [email protected]"
set serv(nick) "ChanServ"
# Chanserv deop command.
# use %nick for the nick you want to deop and %chan for the channel name.
# example: set serv(deop) "deop %chan %nick"
set serv(command) "deop %chan %nick"
# Set the time in seconds to wait before reseting the punishment monitor:
# Note: this setting means the bot will apply the punishment steps on each user
# within this period of time, otherwise it'll trigger steps from the beginning.
variable pwait 180
# Set here the warning method you wish to use: (PRIVMSG or NOTICE)
variable wmeth NOTICE
# Edit this only if your bot is an ircop and will use the kline command:
# Set here the kline command used on your server.
# for example some ircds user:
# kline %mask %time %reason
# others use:
# kline %time %mask %reason
## NOTE:
# %mask = the klined mask.
# %time = the kline time.
# %reason = the kline reason.
##
set kline(cmd) "kline %time %mask :%reason"
# set the default kline time. (seconds or minutes depends on your ircd)
set kline(time) 30
## Available punishment methods:
# v : Void - do nothing
# w : Warn offender
# k : Kick offender
# b : Ban offender
# kb : Kick + Ban offender
# bk : Ban + Kick offender
# kl : KLine offender
# kil: Kill offender
#
## You can use them like this for example:
# w:k:kb
# this means, first Warn then Kick then Kickban. (if offence is repeated ofcourse)
## these steps will be triggered if the offences happend during <pwait> seconds.
# NOTE: These methods are not applicable on all flood types. I only applied this
# feature on the flood types I think they're needed.
## Available ban types:
# 0 : *[email protected]
# 1 : *!*[email protected]
# 2 : *!*@full.host.tld
# 3 : *!*user@*.host.tld
# 4 : *!*@*.host.tld
# 5 : [email protected]
# 6 : nick!*[email protected]
# 7 : nick!*@full.host.tld
# 8 : nick!*user@*.host.tld
# 9 : nick!*@*.host.tld
# 10: *!user@*
# 11: nick!*@*
## Available kline mask types:
# 0 : [email protected]
# 1 : *[email protected]
# 2 : *@full.host.tld
# 3 : *user@*.host.tld
# 4 : *@*.host.tld
# 5 : [email protected]
# 6 : *[email protected]
# 7 : *@full.host.tld
# 8 : *user@*.host.tld
# 9 : *@*.host.tld
# 10: user@*
##########################
# TEXT FLOOD #
##########################
#
## 1 ## Text flood (lines)
#
# use .chanset #channel ap:textl <lines>:<seconds> <btime> <pmeth> <btype> (in DCC, 0:0 to disable)
# Set default rate here:
lappend ap:udefs {ap:textl "5:2 60 k:kb 2"}
# Text flood (lines) kick msg.
set textl(kmsg) "Text flood detected. $kckcount(form)"
# Text flood (lines) warn msg.
set textl(wmsg) "Warning: You've triggered text flood (lines) protection, slow down your typing."
## Edit the following only if you choose a punish method above 5 (oper commands):
# Text flood (lines) kline mask type.
set textl(ktype) 2
# Text flood (lines) kline/kill reason.
set textl(klmsg) "Text flooding is not permissable on this network."
# Text flood (lines) kline time (seconds or minutes depends on your ircd).
set textl(ktime) 0
#
## 2 ## Text flood (chars)
#
lappend ap:udefs {ap:textc "215:3 120 kb 2"}
set textc(kmsg) "Excess chars detected. $kckcount(form)"
set textc(wmsg) "Warning: You've triggered text flood (chars) protection, decrease your text legnth."
## Edit the following only if you choose a punish method above 5 (oper commands):
set textc(ktype) 2
set textc(klmsg) "Text flooding (chars) is not permissable on this network."
set textc(ktime) 0
#
## 3 ## Notice flood (lines)
#
lappend ap:udefs {ap:notcl "1:3 120 kb 2"}
set notcl(kmsg) "Notice not allowed. $kckcount(form)"
set notcl(wmsg) "Warning: you've triggered notice flood (lines) protection, slow down your notices."
## Edit the following only if you choose a punish method above 5 (oper commands):
set notcl(ktype) 2
set notcl(klmsg) "Notice flooding is not permissable on this network."
set notcl(ktime) 0
#
## 4 ## Notice flood (chars)
#
lappend ap:udefs {ap:notcc "200:3 180 kb 2"}
set notcc(kmsg) "Excess chars (notice) detected. $kckcount(form)"
set notcc(wmsg) "Warning: you've triggered notice flood (chars) protection, decrease your text length."
## Edit the following only if you choose a punish method above 5 (oper commands):
set notcc(ktype) 2
set notcc(klmsg) "Notice flooding (chars) is not permissable on this network."
set notcc(ktime) 0
###################
# TEXT #
###################
#
## 5 ## Caps flood.
#
# Use .chanset #channel ap:caps <percent>:<line-length> <btime> <pmeth> <btype> (in DCC, 0:0 to disable)
# Set default rate here:
lappend ap:udefs {ap:caps "60:90 120 kb 2"}
set capsp(kmsg) "Excess CAPS detected. $kckcount(form)"
set capsp(wmsg) "Warning: You've triggered caps flood protection, release your caps."
## Edit the following only if you choose a punish method above 5 (oper commands):
set capsp(ktype) 2
set capsp(klmsg) "Caps flooding is not permissable on this network."
set capsp(ktime) 0
#
## 6 ## Text repeating.
#
lappend ap:udefs {ap:repeatl "3:10 60 k:kb 2"}
## Text repeating Kick on how many consecutive repeated letters?
## Example: if this is set to 5 then the bot will kick any user who types (example):
# Hellooooo (5 consecutive o's)
# Hello!!!!!!!!! (5 and more consecutive ! marks)
## Use .chanset #channel ap:repeatc <number-of-letters> <btime> <pmeth> <btype> (in DCC, 0 to disable)
# Set default value here:
lappend ap:udefs {ap:repeatc "25 30 w:k:kb 2"}
set repeatf(kmsg) "Text repeating detected. $kckcount(form)"
set repeatf(lkmsg) "Letter repeats detected, do not use excess consecutive letters. $kckcount(form)"
set repeatf(wmsg) "Warning: You've triggered %type repeating protection, stop repeating."
## Edit the following only if you choose a punish method above 5 (oper commands):
set repeatf(ktype) 2
set repeatf(klmsg) "Constant repeating is not permissable on this network."
set repeatf(ktime) 0
#
## 7 ## Control codes.
#
# Use .chanset #channel ap:codes r:<n> b:<n> u:<n> c:<n> <btime> <pmeth> <btype> (in DCC)
# Example: If you set ap:codes to: r:35 b:35 u:35 c:35
# Then 35 (or more) characters affected by Reverse or Bold or Underline or Color
# will be considered an offence.
# Set default rate here:
lappend ap:udefs {ap:codes "r:35 b:80 u:80 c:80 90 kb 2"}
set codesf(kmsg) "Excess codes detected. $kckcount(form)"
set codesf(wmsg) "Warning: You've triggered control codes protection, release your msgs from codes."
## Edit the following only if you choose a punish method above 5 (oper commands):
set codesf(ktype) 2
set codesf(klmsg) "Excess use of control codes is not permissable on this network."
set codesf(ktime) 0
#
## 8 ## Advertising.
#
# NOTE: This protection also works for private advertising.
# Use .chanset #channel ap:adv + <btime> <pmeth> <btype> (to enable)
# set default value here: (+ enabled, - disabled)
lappend ap:udefs {ap:adv "+ 180 kb 2"}
# Set here the string you want to exempt (don't consider as spam):
# Note: %chan = current channel. Also, you can change these for every channel via DCC
# using the .ap:add command. (no wildcards used)
set adexempts(global) { %chan www.egghelp.org }
set adwords(global) { "*join *" "*plz visit*" }
set adv(kmsg) "Advertising detected. $kckcount(form)"
set adv(wmsg) "Warning: You've triggered adverting protection, advertisements are not allowed."
# ANTI SPAM BOT: (NOTE: Some networks may not allow such bots.)
# Use: .chanset #channel ap:antispam + <greet> <cycle-time> <idle-time> (to enable)
# the antispam bot will not cycle a channel where last join occured in <idle-time> or more minutes.
# <greet> is either + or - which will enable or disable the on-join message.
# set default value here:
lappend ap:udefs {ap:antispam "- + 10 10"}
# AntiSpamBot basic settings
# You can edit all these settings as you wish
# example: set antispam(nick) AntiSpamBot
set antispam(nick) $::altnick
set antispam(altnick) ${::altnick}1
# Antispam ident & real name
set antispam(user) AP
set antispam(realname) "AllProtection Anti-Spam"
##
# The following settings specify the desired vhost for your forked Antispam bot.
# Uncomment and edit these settings only if you wish to use settings other than
# you Eggdrop's defaults.
##
# Antispam bot's vhost (ipv4). Example: set antispam(vhost4) 127.0.0.1
#set antispam(vhost4) $_vhost4
# ipv6 (Eggdrop >= v1.8)
#set antispam(vhost6) $_vhost6
# hostname example: set antispam(hostname) my.lame.vhost.net (Eggdrop < v1.8)
#set antispam(hostname) $_hostname
# Ban spammer in all channels or only in channels it's in? (0: It's in, 1: All)
set antispam(banall) 1
# Exempt list from greets:
set greetexempts(global) { *example*!*@* *!*example*@*.example.net }
# If you want your bot to reply to users with random message, set messages here:
set antispam(r) {
"hey, what's up"
"I'm feeling good today, what about you ?"
"I feel you're too busy ?"
"Are you nice ?"
"Hiiii lol"
"hello there, just teasing"
}
# On what messages do you want the bot to reply:
set antispam(t) {
"*hi*"
"*h r u*"
"*hello*"
"*hola*"
"*how *y*"
"*how *u*"
"*hey*"
"*asl*"
"*a/s/l*"
}
# Do you want the bot to msg users on join? (leave "" if no)
set antispam(greet) "Hello %nick, checking for spam. Please do not reply..."
# Stop greeting after how many joins in secs:
set antispam(jprot) 4:2
# Stop replying to messages after how many msgs in secs:
set antispam(mprot) 8:4
## Edit the following only if you choose a punish method above 5 (oper commands):
set adv(ktype) 2
set adv(klmsg) "Constant advertising is not permissable on this network."
set adv(ktime) 0
#
## 9 ## Swearing.
#
lappend ap:udefs {ap:swear "+ 120 kb 2"}
set bwords(global) {
*fuck*
"*bastard *"
*cock*
"* cunt *"
*ommak*
*fag*
"* shit*"
*asshole*
*bitch*
*pussy*
"* whore *"
"* slut *"
*dickhead*
*horny*
"* shithead *"
*fagget*
"* dick? *"
"* fag? *"
"* fuker *"
*penis*
"* fuk *"
}
set swear(kmsg) "Bad word detected. $kckcount(form)"
set swear(wmsg) "Warning: You've triggered swearing protection, cussing is prohibited."
## Edit the following only if you choose a punish method above 5 (oper commands):
set swear(ktype) 2
set swear(klmsg) "Swearing is not permissable on this network."
set swear(ktime) 0
#
## 8-9 ## Swearing/Advertising in part/quit messages
#
# Exampl: "s:1 a:1" Enables banning of users with part/quit msgs containing swear/advertisement
lappend ap:udefs {ap:pqsadv "s:1 a:1"}
###################
# CTCP #
###################
#
## 10 ## CTCP/CTCR flood
#
lappend ap:udefs {ap:ctcps "2:30 180 kb 2"}
set ctcpf(kmsg) "CTCP flood detected. $kckcount(form)"
set ctcpf(wmsg) "Warning: You've triggered CTCP/CTCR flood protection, decrease your ctcps."
## Edit the following only if you choose a punish method above 5 (oper commands):
set ctcpf(ktype) 2
set ctcpf(klmsg) "CTCP/CTCR floods are not permissable on this network."
set ctcpf(ktime) 0
###################
# TAKEOVER #
###################
#
## 11 ## Mass deop.
#
lappend ap:udefs {ap:massd "5:1 30 kb 2"}
# Mass deop: deop abuser ? (0: no , 1: yes)
set massdeop(deop) 1
set massdeop(kmsg) "Mass deop detected. $kckcount(form)"
set massdeop(wmsg) "Warning: You've triggered the mass deop protection, do not repeat this action."
## Edit the following only if you choose a punish method above 5 (oper commands):
set massdeop(ktype) 2
set massdeop(klmsg) "Mass deops are not allowed on this network."
set massdeop(ktime) 0
#
## 12 ## Mass kick.
#
lappend ap:udefs {ap:massk "8:2 30 kb 2"}
# Mass kick: deop abuser ? (0: no , 1: yes)
set masskick(deop) 1
set masskick(kmsg) "Mass kick detected. $kckcount(form)"
set masskick(wmsg) "Warning: You've triggered mass kick protection, do not repeat this action."
## Edit the following only if you choose a punish method above 5 (oper commands):
set masskick(ktype) 2
set masskick(klmsg) "Mass kicks are prohibited on this network."
set masskick(ktime) 0
#
## 13 ## Mass ban (bans).
#
lappend ap:udefs {ap:massb "18:2 30 kb 2"}
# Mass ban (bans) deop abuser ? (1: yes , 0: no)
set massb(deop) 1
set massb(kmsg) "Mass ban is not allowed. $kckcount(form)"
set massb(wmsg) "Warning: You've triggered mass ban protection, do not repeat this action."
## Edit the following only if you choose a punish method above 5 (oper commands):
set massb(ktype) 2
set massb(klmsg) "Mass banning (bans) is prohibited on this network."
set massb(ktime) 0
#
## 14 ## Channel limit.
#
# Use .chanset #channel ap:limit <limit> (in DCC, 0 to disable)
# Note: this be the number that will be added to the channel's limit.
# Set default limit here:
lappend ap:udefs {ap:limit 8}
###################
# MISCELLANEOUS #
###################
#
## 15 ## Join flood.
#
lappend ap:udefs {ap:cjoin "3:2 120 kb 2"}
# Join flood: Check for join flood from same idents as well? (0: no, 1: yes)
set joinflood(checkident) 1
# Join flood: Lock channel when triggered ? (1: yes , 0: no)
set joinflood(lockchan) 1
# Join flood: If lock channel is enable, what modes ?
set joinflood(lockmode) "mR-k clone.join.flood"
# Join flood: lock time in seconds.
set joinflood(locktime) 45
set joinflood(kmsg) "Join flood detected. $kckcount(form)"
set joinflood(wmsg) "Warning: you've triggered join flood protection, further offence will cause harsher actions."
## Edit the following only if you choose a punish method above 5 (oper commands):
set joinflood(ktype) 2
set joinflood(klmsg) "Join floods are not permissable on this network."
set joinflood(ktime) 0
#
## 16 ## Part msg flood.
#
# Use .chanset #channel ap:partmsgs <message-length> <btime> <pmeth> <btype> (in DCC, 0 to disable)
# Set default value here:
lappend ap:udefs {ap:partmsgs "180 120 kb 2"}
# Also, you can ban if excess codes are used in a part msg:
# Use .chanset #channel ap:partmsgc r:<n> b:<n> u:<n> c:<n> <btime> <pmeth> <btype> (in DCC)
# Note: check codes protection to understand how codes checking work.
# r = reverse, b = bold, u = underline and c = colors.
# Set default rate here:
lappend ap:udefs {ap:partmsgc "r:35 b:35 u:35 c:35 30 kb 2"}
set pmsgf(kmsg) "Part msg flood detected. $kckcount(form)"
set pmsgf(wmsg) "Warning: You've triggered part msg flood protection, decrease text in your part reason."
## Edit the following only if you choose a punish method above 5 (oper commands):
set pmsgf(ktype) 2
set pmsgf(klmsg) "Part msg floods are not permissable on this network."
set pmsgf(ktime) 0
#
## 17 ## Revolving door.
#
# Use .chanset #channel ap:revdoor <seconds> <btime> <pmeth> <btype> (in DCC)
# example: setting this to 3 will make the bot ban whoever joins and parts/quits in 3 or less seconds.
# Set default value here:
lappend ap:udefs {ap:revdoor "3 120 kb 2"}
set revdoor(kmsg) "Join-part revolving door attempt detected. $kckcount(form)"
# Part messages that should not be considered as revdoor: (can use wildcards)
# Example: set revdoor(exempt) {"Registered."}
set revdoor(exempt) {}
set revdoor(wmsg) "Warning! you have triggered revolving-door protection, do not join-part channels."
## Edit the following only if you choose a punish method above 5 (oper commands):
set revdoor(ktype) 2
set revdoor(klmsg) "Revolving-door bots are not allowed on this network."
set revdoor(ktime) 0
#
## 18 ## Nick flood.
#
lappend ap:udefs {ap:nickf "4:12 60 w:k:kb 2"}
set nickflood(kmsg) "Nick flood detected. $kckcount(form)"
set nickflood(wmsg) "Warning: You've triggered nick flood protection, slow down your nick changes."
## Edit the following only if you choose a punish method above 5 (oper commands):
set nickflood(ktype) 2
set nickflood(klmsg) "Nick floods are not permissable on this network."
set nickflood(ktime) 0
#
## 19 ## Clones.
#
# Use .chanset #channel ap:clones <clones-number> <btime> <pmeth> <btype> (in DCC)
# Note: This will be the number of clones that triggers punishment.
# Set default value here:
lappend ap:udefs {ap:clones "8 120 kb 2"}
set eclones(kmsg) "Excess clones detected. $kckcount(form)"
set eclones(wmsg) "Warning: You've exceeded the maximum number of clones, remove your clones now."
# Do you want to check if the clones are still excess after warn?
# if yes then set this to the number of seconds to wait before checking again. (0 means no)
# NOTE: This should be less than <pwait> (at the beginning of the configuration).
set eclones(caw) 60
## Edit the following only if you choose a punish method above 5 (oper commands):
set eclones(ktype) 2
set eclones(klmsg) "Excess clones are not allowed on this network."
set eclones(ktime) 0
#
## 20 ## Bad nick.
#
# Use .chanset #channel ap:bnicks + <btime> <pmeth> <btype> (in DCC to enable)
# Set default value here: (+ enabled, - disabled)
lappend ap:udefs {ap:bnicks "+ 120 kb 2"}
set bnicks(global) {
*porno*
*horny*
*horney*
*fuck*
*asshole*
*dick*
*bitch*
*fagget*
*shithead*
*shitter*
*penis*
*pussy*
*fukker*
}
set bnick(kmsg) "Bad nick detected. $kckcount(form)"
set bnick(wmsg) "Warning! you are using a bad nick, type /nick <nick> to change it."
set bnick(caw) 60
## Edit the following only if you choose a punish method above 5 (oper commands):
set bnick(ktype) 2
set bnick(klmsg) "Bad nicks are not allowed on this network."
set bnick(ktime) 0
#
## 21 ## Random drones.
#
# Use .chanset #channel ap:drones + <btime> <pmeth> <btype> (in DCC to enable)
# Set default value here: (+ enabled, - disabled)
# If you set <pmeth> to a positive-integer then the bot will only kick the drone once.
# So if the drone rejoins within this amount of seconds it won't be kicked again.
lappend ap:udefs {ap:drones "+ 180 45 2"}
# Random drones: What masks to exempt? (remember to change these or remoce them)
set droneexempts(global) { *example1*!*@* *!*example2*@* *!*@example3.net }
set drone(kmsg) "Possible random drone detected. $kckcount(form)"
set drone(wmsg) "Warning: You've triggered random drones protection, change your nick now."
## Edit the following only if you choose a punish method above 5 (oper commands):
set drone(ktype) 2
set drone(klmsg) "Random drones are not allowed on this network."
set drone(ktime) 0
#
## 22 ## Bad ident.
#
# Use .chanset #channel ap:bidents + <btime> <pmeth> <btype> (in DCC to enable)
# Set default value here: (+ enabled, - disabled)
lappend ap:udefs {ap:bidents "+ 120 kb 2"}
set bidents(global) {
*porno*
*horny*
*horney*
*fuck*
*asshole*
*dick*
*bitch*
*fagget*
*shithead*
*shitter*
*penis*
*pussy*
*fukker*
}
set bident(kmsg) "Bad ident detected. $kckcount(form)"
set bident(wmsg) "Warning! you're using a bad ident. Disconnect, change it and then connect again."
set bident(caw) 60
## Edit the following only if you choose a punish method above 5 (oper commands):
set bident(ktype) 2
set bident(klmsg) "Bad idents are not allowed on this network."
set bident(ktime) 0
#
## 23 ## Bad chans/Excess chans.
#
# Use .chanset #channel ap:bchans + <btime> <pmeth> <btype> <scan-time> (in DCC to enable)
# <scan-time> is the time in minutes in which the bot will scan the channel for users in bad chans. (0 disable)
# Set default value here: (+ enabled, - disabled)
lappend ap:udefs {ap:bchans "- 90 kb 2 0"}
# For excess channels use:
# .chanset #channel ap:echans <excess-chan-number> <btime> <pmeth> <btype> <scan-time> (in DCC to enable)
# if <excess-chan-number> is 0, then it is disabled.
lappend ap:udefs {ap:echans "0 60 w:kb 2 0"}
# Set default global badchan list here:
set bchans(global) { #example1 #example2 #example3 }
# Bad chans flood protect, stop whois/ctcp incase of x joins in y seconds: (applies on bad versions too)
set bchan(floodprot) 4:10
# Bad chans kick message:
set bchan(kmsg) "Bad chan detected. $kckcount(form)"
# Excess chans kick message:
set bchan(ekmsg) "Excess chans detected. $kckcount(form)"
# Bad/Excess chans check after warning time in seconds.
# Incase you chose to warn the offender (punish method), this is the time in seconds to wait
# before checking again. (keep it 0 if you're not using warn)
# Setting this to 50 or less will be useless, also make sure this is less than pwait.