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
|
; ------------- Anti-ClonesX --------------
; Coded by EvilKing, Zyberdog and [Sn4k3]
; -----------------------------------------
;
; Public release
;
; Version: 1.91
; Released on: Monday, 15. March 2004
;
; Url: http://www.djcommander.de/download/anticlonesx.mrc
;
;
; WARNING: Be sure your internal flood protection
; is turned on!
; command: /flood on
;
;Sets a global variable to detect netsplits/netmerges (%netsplit.usernick)
on *:quit: { if (($1 == *.net) && ($2 == *.split)) { set -u900 %nsplit. [ $+ [ $nick ] ] $true } }
;Triggers when a user joins a chan
on !*:join:*: {
;Checks for NetMerge
if (%nsplit. [ $+ [ $nick ] ] == $true) {
;Sets the timer down to 10 seconds which unsets the variable for the splitted usernick
set -u10 %nsplit. [ $+ [ $nick ] ] $true
;Gives out an information that the user returned from a netsplit
echo -t $chan $chr(3) $+ $color(action) $+ * $nick ( $+ $address $+ ) returned from a netsplit
;If the user didn't return from a netsplit: start clone checking
} | else {
;Sets a var to check for general massjoin
set -u2 %jcount. [ $+ [ $chan ] ] $calc(%jcount. [ $+ [ $chan ] ] + 1)
;Checks for massjoin
if (%jcount. [ $+ [ $chan ] ] => 5) {
;Notifies you that a massjoin was detected
if (%jcount. [ $+ [ $chan ] ] = 5) { echo -t $chan $chr(3) $+ $color(action) $+ * Mass-Join detected }
;Checks if you are opped in that channel where the massjoin was detected
if ($me isop $chan) {
;The following block sets the channel to "moderated" and/or "registered users only" for 25 seconds if it isn't already set
if ((m !isin $gettok($chan($chan).mode,1,32)) && (r !isin $gettok($chan($chan).mode,1,32))) { mode $chan +mr | .timerModReg 1 25 mode $chan -mr }
elseif (m !isin $gettok($chan($chan).mode,1,32)) { mode $chan +m | .timerMod 1 25 mode $chan -m }
elseif (r !isin $gettok($chan($chan).mode,1,32)) { mode $chan +r | .timerReg 1 25 mode $chan -r }
;Closing bracket for "if" which checks if youre opped
}
;Closing bracket for "if" which checks for massjoin
}
;If a clone was detected this checks for massjoin of clones
if ((%acxmassjoin) && ($left($nick,3) == %acxmassjoin)) {
;Gives out a warning message on the screen
echo -t $chan $chr(3) $+ $color(action) $+ * $nick ( $+ $address $+ ) is a flood-clone
;Massjoin check
set -u5 %acxmassjoin $left($nick,3)
;Checks if you are opped in that channel after a clone was detected
if ($me isop $chan) {
;Sends a ban-request to CloneBan queue
addtoclonebanqueue $chan $nick *!*@ $+ $gettok($address($nick,0),2,64) $nick
;Closing bracket for "if" which checks if youre opped
}
;Closing bracket for "if" which checks for floodclone massjoin
}
;Checks the IDENTD (the stuff between ! and @ in a user-address) if it is something looking like ~y6423
elseif (($regex($address($nick,0),^.*!~[a-z]{1}[0-9]{3}\@.*$)) || ($regex($address($nick,0),^.*!~[a-z]{1}[0-9]{4}\@.*$))) {
;Gives out a warning message on the screen
echo -t $chan $chr(3) $+ $color(action) $+ * $nick ( $+ $address $+ ) is a flood-clone
;Additional massjoin check
set -u5 %acxmassjoin $left($nick,3)
;Checks if you are opped in that channel after a clone was detected
if ($me isop $chan) {
;Sends a ban-request to CloneBan queue
addtoclonebanqueue $chan $nick *!*@ $+ $gettok($address($nick,0),2,64) $nick
;Closing bracket for "if" which checks if youre opped
}
;Closing bracket for "if" which checks the IDENTD
}
;Closing bracket for "if" which checks for NetMerge
}
;Closing bracket for the trigger (on join)
}
;CloneBan
alias addtoclonebanqueue {
if ($numtok(%clonebanqueue. [ $+ [ $1 ] ],32) == 6) { mode $1 +bbbbbb %clonebanqueue. [ $+ [ $1 ] ] | unset %clonebanqueue. [ $+ [ $1 ] ] }
if ($3 !isin %clonebanqueue. [ $+ [ $1 ] ]) { set %clonebanqueue. [ $+ [ $1 ] ] %clonebanqueue. [ $+ [ $1 ] ] $3 }
.timerClearBanQueue 1 2 docloneban $1
}
alias docloneban { mode $1 +bbbbbb %clonebanqueue. [ $+ [ $1 ] ] | unset %clonebanqueue. [ $+ [ $1 ] ] }
;End of script
|