Id: 10399; Nick: F-X; Timestamp: 2008-05-12 16:47:25; Pasted as: mIRC
Description: protect
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
;This security bot made by xor1.
;Date of creation: 25/4/08
;please dont change credits!.
;this is the last version <LAST> <VERSION>
--------------------------------------
--------------------------------------
;Joinflood protection.
on !*:join:%sec.chan: {
  if (%sec.clone == ON) && (*.users.quakenet.org* !iswm $wildsite) {
    hinc $+(-mu,$iif($hget(jflood,join).unset,$ifmatch,2)) jflood join
    if (!$read(clones.txt, w ,$wildsite)) { write clones.txt $wildsite 
      if (%clones1 != ON) { .timerzxc654 1 4 .remove clones.txt }
    }
    if (!$read(nicks.txt, w ,$nick)) { write nicks.txt $nick 
      if (%clones1 != ON) { .timerzxc655 1 4 .remove nicks.txt }
    }
    if ($hget(jflood,join) >= 4) && (!%split) && (%clones1 != ON) {
      .timerzxc65* off
      mode %sec.chan +mr
      set %sec.adv OFF | set %clones1 ON | set %text-flood OFF | set %reapet OFF
      .timer 1 1 clonesbans
    }
  }
}
;End of Joinflood protection.
--------------------------------------
--------------------------------------
;Advertise protection.
on !*:text:*#*:%sec.chan: {
  if (%sec.adv == ON) {
    if ($nick isreg %sec.chan) { inc -u4 %adv }
    if (!$read(advertise.txt, w ,$wildsite)) { write advertise.txt $wildsite 
      if (%adv1 != ON) { .timerzxc656 1 4 .remove advertise.txt }
    }
    if (!$read(advertisenicks.txt, w ,$nick)) { write advertisenicks.txt $nick 
      if (%adv1 != ON) { .timerzxc657 1 4 .remove advertisenicks.txt }
    }
    if ($nick isreg %sec.chan) && (%adv < 4 ) {
      .timeref 1 1 ban %sec.chan $nick 2 | .timeref2 1 1 kick %sec.chan $nick 1Banned! You are violating Network Rules. [Advertise] ( $+ $date $time $+ )  ID: %num $+ .
    }
    if (%adv >= 4) && (%adv1 != ON) {
      .timere* off | .timerzxc65* off
      mode %sec.chan +mr
      set %adv1 on
      .timer 1 1 advertisebans
    }
  }
}
;End of advertise protections.
--------------------------------------
--------------------------------------
;NetSplit
on !*:quit: {
  if (*.net *.split isin $1-) && (!%split) {
    set -u1200 %split on | halt 
  } 
}
;NetSplit Ends
--------------------------------------
--------------------------------------
;Anti kicks protection.
on !*:kick:%sec.chan: {
  if (%takeover == ON) {
    if ($knick == $me) {
      if ($gettok($address($nick,2),2,64) !isin %masow) && ($nick != $logged($nick)) && ($nick != Q) {
        .timers off | unset %clones1 | .remove clones.txt | unset %adv1 | .remove advertise.txt | .remove advertisenicks.txt | .remove nicks.txt | .msg q ban %sec.chan $wildsite 1Don't Ever Kick The Guard.  | .msg q unbanme %sec.chan | .msg Q removeuser %sec.chan $nick | .timer 1 1 .msg Q invite %sec.chan | .timer 1 2 join %sec.chan | halt
      }
      elseif ($gettok($address($nick,2),2,64) isin %masow) || ($nick == $logged($nick)) || ($nick == Q) {
        .timers off |  unset %clones1 | .remove clones.txt | unset %adv1 | .remove advertise.txt | .remove advertisenicks.txt | .remove nicks.txt | .msg Q invite %sec.chan | .msg Q unbanme %sec.chan | .timer 1 1 join %sec.chan | halt
      }
    }
    if ($knick != $me) {
      if ($nick != Q) && ($gettok($address($nick,2),2,64) !isin %masow) && (($gettok($address($knick,2),2,64) isin %masow) || ($knick == $logged($knick))) {
        .msg Q removeuser %sec.chan $nick | .msg Q ban %sec.chan $wildsite 1Banned! Reason:Kick-Protected. | halt
      }
      if ($gettok($address($nick,2),2,64) !isin %masow) && ($gettok($address($knick,2),2,64) !isin %masow) && ($nick != Q) && ($nick != $logged($nick)) && ($knick != $logged($knick)) {
        if (%kicks [ $+ [ $nick ] ] == $calc(%allow-kick.times -1)) { .msg q ban %sec.chan $wildsite 1Banned! Reason:Don't Ever Takeover here. | .msg Q removeuser %sec.chan $nick | halt }
      }
      inc -u10 %kicks $+ $nick
    }
  }
}
;Anti kicks protection end.
--------------------------------------
--------------------------------------
;Anti bans protection.
on !*:ban:%sec.chan: {
  if (%takeover == ON) {
    if ($gettok($address($nick,2),2,64) !isin %masow) && ($nick != $logged($nick)) && ($banmask !iswm $address($me,6)) && ($nick != Q) {
      if (%bans [ $+ [ $nick ] ] == $calc(%allow-ban.times -1)) {
      .msg q ban %sec.chan $wildsite 1Don't Ever Takeover here. | .msg q removeuser %sec.chan $nick | unset %bans [ $+ [ $nick ] ] | halt }
    }
    inc -u10 %bans $+ $nick
  }
  if ($banmask iswm $address($me,6)) && ($gettok($address($nick,2),2,64) !isin %masow) && ($nick != $logged($nick)) && ($nick != Q) && (%banswtf != ON) {
    set %banswtf ON | .timer 1 15 unset %banswtf | .msg q ban %sec.chan $wildsite 1Banned! Reason:Don't Ever ban the Guard. | .msg Q removeuser %sec.chan $nick | halt
  }
}
;Anti bans protection ends.
--------------------------------------
--------------------------------------
;Joinpart protection.
on !*:part:%sec.chan: { 
  if (%sec.part == ON) && (%clones1 != ON) {
    if (%JoinPart [ $+ [ $nick ] ] == 2) { mode %sec.chan +b $wildsite | kick %sec.chan $nick 1Banned! You Are Violating Network Rules. ( $+ $date $time $+ ) ID: %num | inc %num  | unset %JoinPart [ $+ [ $nick ] ] | halt }
    inc -u15 %JoinPart $+ $nick
  }
}
;Joinpart protection end.
--------------------------------------
--------------------------------------
;Flood&Reapet protections.
on *:text:*:%sec.chan:{
  if ($nick isreg %sec.chan) {
    hinc $+(-mu,$iif($hget(flood,text).unset,$ifmatch,3)) flood text
    if ($hget(flood,text) > 20) && (%flooding != ON) {
      set %text-flood OFF | set %reapet off | set %flooding ON 
      mode %sec.chan +mr | .timer 1 100 mode %sec.chan -mr | .timer 1 100 set %reapet ON | .timer 1 100 set %text-flood ON | .timer 1 100 unset %flooding | halt
    }
    if (%text-flood == ON) {
      inc -u3 %flood. $+ $nick
      if (%flood. [ $+ [ $nick ] ] == $calc(%allow-flood.times -1)) { mode %sec.chan +b $wildsite | kick %sec.chan $nick 1Banned! You are violating Network Rules. [FLood] ( $+ $date $time $+ )  ID: %num $+ . | inc %num | halt }
    }
    if (%reapet == ON) {
      if (%reapet [ $+ [ $nick ] ] [ $+ [ $1 ] ] == $calc(%allow-reapet.times -1)) { mode %sec.chan +b $wildsite | kick %sec.chan $nick 1Banned! You are violating Network Rules. [Reapet] ( $+ $date $time $+ )  ID: %num $+ .  | inc %num | halt }
      inc -u3 %reapet $+ $nick $+ $1
    }
  }
  if (* $+ $str(d,1) $+ $chr(105) $+ $str(t,1) $+ $chr(115) iswm $1) && (!%flood) { $getush(%sec.chan) | set -u3 %flood 1 }
}
;FLood&Reapet protections end.
-----------------------------------------
--------------------------------------
;Anti deops protection
on !*:deop:%sec.chan:{
  if (%takeover == ON) {
    if ($opnick == $me) {
      if ($gettok($address($nick,2),2,64) !isin %masow) && (*quakenet* !iswm $nick) && ($nick != $logged($nick)) && (%banswtf != ON) {
        set %banswtf ON | .timer 1 15 unset %banswtf
        if ($me ison %sec.chan) { .msg Q op %sec.chan | .msg Q removeuser %sec.chan $nick | .msg q ban %sec.chan $wildsite 1Banned! Reason:Don't Ever Deop the Guard. | halt }
      }
      elseif ($gettok($address($nick,2),2,64) isin %masow) || ($nick == $logged($nick)) || (*quakenet* iswm $nick) {
        .msg Q op %sec.chan | halt
      }
    }
    elseif ($opnick != $me) {
      if ($gettok($address($nick,2),2,64) !isin %masow) && (*quakenet* !iswm $nick) && (Q !iswm $nick) && (($gettok($address($opnick,2),2,64) isin %masow) || ($opnick == $logged($opnick))) {
        .msg Q removeuser %sec.chan $nick | .msg Q ban %sec.chan $wildsite 1Banned! Reason:Don't Deop protected users. | halt
      }
    }
  }
}
;Anti deops protection end.
--------------------------------------
--------------------------------------
;Action protection.
on !*:action:*:%sec.chan: {
  if (%action == ON) && ($nick isreg %sec.chan) && (%clones1 != ON) {
    hinc $+(-mu,$iif($hget(action,$wildsite).unset,$ifmatch,2)) flooding $wildsite
    if ($hget(flooding,$wildsite) >= 4) {
      mode %sec.chan +b $wildsite | kick %sec.chan $nick  1Banned! You are violating Network Rules. [FLood] ( $+ $date $time $+ )  ID: %num $+ .  | inc %num | halt
    }
    if ($chr(35) isin $1-) {
      mode %sec.chan +b $wildsite | 1Banned! You are violating Network Rules. [Advertise] ( $+ $date $time $+ )  ID: %num $+ . | inc %num | halt
    }
  }
}
;Action protection ends.
--------------------------------------
--------------------------------------
;end of protections;
;end of protections;
;end of protections;
 
--------------------------------------
--------------------------------------
;menu
menu * {
  Protection Settings
  .Masterpass:set %masterpass $?"Enter The master pass here."
  .Channel:set %sec.chan $?"Type your chan here, dont forget #" | .timer 1 5 msg %sec.chan This channel is now beeing protected by me. | join %sec.chan 
  .Sign:set %sec.sign $?"Type The sign here , ex: !/@/+/-" | echo -a Done the sign has been set to : " $+ %sec.sign $+ "
  .show Protection status: echo -d 7,1The Protection Status Are : Join-Flood = $iif(%sec.clone == ON,4ON,3OFF) 7___ Adv = $iif(%sec.adv == ON,4ON,3OFF) 7___Anti-Takeover = $iif(%takeover == ON,4ON,3OFF) 7___Join/Part = $iif(%sec.part == ON,4ON,3OFF) 7___Anti-Flood = $iif(%text-flood == ON,4ON,3OFF) 7___Reapet == $iif(%reapet == ON,4ON,3OFF) 7___Action = $iif(%action == ON,4ON,3OFF)  
  .Set Protection ON/OFF
  ..ALL Protections
  ...ON:ALLON
  ...OFF:ALLOFF 
  ..JoinFlood
  ...ON:set %sec.clone ON | echo -a JoinFLood protection are now ON
  ...OFF:set %sec.clone OFF | echo -a JoinFLood protection are now OFF
  ..Adv-Protection
  ...ON:set %sec.adv ON | echo -a Adv protection are now ON
  ...OFF:set %sec.adv OFF | echo -a Adv protection are now OFF
  ..Anti-Takeover
  ...ON:set %takeover ON | echo -a Anti Takeover protections are now ON
  ...OFF:set %takeover OFF | echo -a Anti Takeover protections are now OFF
  ..Flood
  ...ON:set %text-flood ON | echo -a Text Flood protections are now ON
  ...OFF:set %text-flood OFF | echo -a Text Flood protections are now OFF
  ..Reapet
  ...ON:set %reapet ON | echo -a Reapet protections are now ON
  ...OFF:set %reapet OFF | echo -a Reapet protections are now OFF
  ..Action
  ...ON:set %action ON | echo -a Action protections are now ON
  ...OFF:set %action OFF | echo -a Action protections are now OFF
  ..Join/part
  ...ON:set %sec.part ON | echo -a Join Part protections are now ON
  ...OFF:set %sec.part OFF | echo -a Join Part protections are now OFF
  Owners/Protected
  .set bot Protected: { set %masow1 $?"Type The owner Qacc here" | if (%masow1) {
      if (%masow1 $+ .users.quakenet.org !isin %masow) { set %masow $addtok(%masow,%masow1 $+ .users.quakenet.org,32) | echo -a %masow1 $+ .users.quakenet.org Is Now Protected }
      elseif (%masow1 $+ .users.quakenet.org isin %masow) { echo -a %masow1 $+ .users.quakenet.org is already Protected } 
    }
  }
  .remove bot Protected: { set %masow1 $?"Type The owner Qacc That u want to remove" | if (%masow1) {
      if (%masow1 $+ .users.quakenet.org isin %masow) { set %masow $remtok(%masow,%masow1 $+ .users.quakenet.org,32) | echo -a %masow1 $+ .users.quakenet.org Is No Longer Protected }
      elseif (%masow1 $+ .users.quakenet.org !isin %masow) { echo -a %masow1 $+ .users.quakenet.org Is Not On The Protected List } 
    }
  }
  .set bot owner:writeini admins.ini $?"Enter the user here!" password $?"Enter The Password Here."
  .remove bot owner:remini admins.ini $?"Enter The user you want to remove here." 
  .show bot protected:echo -d 7,1The protected are( $+ $numtok(%masow,32) $+ ): %masow
  .show bot owners:$iif($exists(admins.ini),run admins.ini,echo -a The owners Table is empty.)
  .Clear all protected:unset %masow | echo -a protected list is now empty.
  .Clear all owners:unset %owners | echo -a owner list is now empty.
  Times Allow
  .Allow flood times
  ..1:set %allow-flood.times 1 | echo -a users will be banned after 1 flood
  ..2:set %allow-flood.times 2 | echo -a users will be banned after 2 flood
  ..3:set %allow-flood.times 3 | echo -a users will be banned after 3 flood
  ..4:set %allow-flood.times 4 | echo -a users will be banned after 4 flood
  ..5:set %allow-flood.times 5 | echo -a users will be banned after 5 flood
  .Allow kick times
  ..1:set %allow-kick.times 1 | echo -a users will be banned after 1 kicks
  ..2:set %allow-kick.times 2 | echo -a users will be banned after 2 kicks
  ..3:set %allow-kick.times 3 | echo -a users will be banned after 3 kicks
  ..4:set %allow-kick.times 4 | echo -a users will be banned after 4 kicks
  ..5:set %allow-kick.times 5 | echo -a users will be banned after 5 kicks
  .Allow ban times
  ..1:set %allow-ban.times 1 | echo -a users will be banned after 1 bans
  ..2:set %allow-ban.times 2 | echo -a users will be banned after 2 bans
  ..3:set %allow-ban.times 3 | echo -a users will be banned after 3 bans
  ..4:set %allow-ban.times 4 | echo -a users will be banned after 4 bans
  ..5:set %allow-ban.times 5 | echo -a users will be banned after 5 bans
  .Allow reapet times
  ..1:set %allow-reapet.times 1 | echo -a users will be banned after 1 reapets
  ..2:set %allow-reapet.times 2 | echo -a users will be banned after 2 reapets
  ..3:set %allow-reapet.times 3 | echo -a users will be banned after 3 reapets
  ..4:set %allow-reapet.times 4 | echo -a users will be banned after 4 reapets
  ..5:set %allow-reapet.times 5 | echo -a users will be banned after 5 reapets
  .Show all times:echo -d 7,1The time before bans are : bans-allow = %allow-ban.times ____ kick-allow = %allow-kick.times ___ reapet-allow = %allow-reapet.times ___ times text-allow = %allow-flood.times $+ .
  -
  fun
  .qnet
  ..av:.msg q chanlev $chan $$1 +av
  ..ao:.msg q chanlev $chan $$1 +ao
  ..amo:.msg q chanlev $chan $$1 +amo
  ..amno:.msg q chanlev $chan $$1 +amno
  ..-av:.msg q chanlev $chan $$1 -av
  ..-ao:.msg q chanlev $chan $$1 -ao
  ..-amo:.msg q chanlev $chan $$1 -amo
  ..-amno:.msg q chanlev $chan $$1 -amno
  ..Qwelcome:.msg q welcome $chan $?"Enter The Topic Here."
  ..settopic:.msg q settopic $chan $?"Enter The Topic Here."
  ..autolimit:.msg q autolimit $chan $?"Enter The Topic Here."
  ..recover:.msg q recover $chan
  ..deopall:.msg q deopall $chan
  ..unbanall:.msg q unbanall $chan
  ..unQbanAll:.msg q unbanmask $chan *!*@*
  ..Qban:msg q ban $chan $address($$1,2)
  ..Hello (make a Qacc):set %emaill $?"Enter Your Full Email here." | msg q hello %emaill %emaill | echo -a Go check ur email.
  .Normal commands:
  ..voice:mode $chan +vvvvvv $$1 $2 $3 $4 $5 $6
  ..devoice:mode $chan -vvvvvv $$1 $2 $3 $4 $5 $6
  ..op:mode $chan +oooooo $$1 $2 $3 $4 $5 $6
  ..deop:mode $chan -oooooo $$1 $2 $3 $4 $5 $6
  ..ban:ban $chan $$1 2
  ..kick:kick $chan $$1 1are u still here? o_O ( $+ $time $date $+ )
  ..kick with reason:kick $chan $$1 $?"Enter The Reason For Kick here."
  ..ban-kick:ban -k $chan $$1 2 1are u still here? o_O ( $+ $time $date $+ )
  ..ban-kick with reason:ban -k $chan $$1 2 $?"Enter The Reason For Kick here."
  ..kick-times:set %nnkicknn $?"Enter The Number of times For Kick here." | if (%nnkicknn isnum) { set %kick $+ $$1 %nnkicknn | kick $chan $$1 1 $+ 1/ $+ %kick [ $+ [ $$1 ] ] $nick are u still here? o_O ( $+ $time $date $+ ) } | else { echo -a please enter only numbers. | halt }
  ..modes
  ...in-channel
  ....m
  .....+:mode $chan +m
  .....-:mode $chan -m
  ....i
  .....+:mode $chan +i
  .....-:mode $chan -i
  ....r
  .....+:mode $chan +r
  .....-:mode $chan -r
  ....s
  .....+:mode $chan +s
  .....-:mode $chan -s
  ....c
  .....+:mode $chan +c
  .....-:mode $chan -c
  ....t
  .....+:mode $chan +t
  .....-:mode $chan -t
  ....T
  .....+:mode $chan +T
  .....-:mode $chan -T
  ....n
  .....+:mode $chan +n
  .....-:mode $chan -n
  ....N
  .....+:mode $chan +N
  .....-:mode $chan -N
  ....C
  .....+:mode $chan +C
  .....-:mode $chan -C
  ....u
  .....+:mode $chan +u
  .....-:mode $chan -u
  ....D
  .....+:mode $chan +D
  .....-:mode $chan -D
  ....d
  .....+:mode $chan +d
  .....-:mode $chan -d
  ....M
  .....+:mode $chan +M
  .....-:mode $chan -M
  ....k
  .....+key:mode $chan +k $?"Enter The Key Here..."  
  .....-key:mode $chan -k $?"Enter The Key Here..."
  ....l
  .....OFF:mode $chan -l
  .....Chose:mode $chan +l $?"Enter The Limit Here..."
  ....chose modes
  .....chose:mode $chan $?"Enter The Modes Here... For Ex:+mr-i and etc.."
  .....all +:mode $chan +smtinrDucCNTM
  .....all -:mode $chan -smtinrDucCNTM
  ...myself
  ....R
  .....ON:mode $me +R
  .....OFF:mode $me -R
  ....x
  .....ON:mode $me +x
  .....OFF:mode $me -x
  ....w
  .....ON:mode $me +w
  .....OFF:mode $me -w
  ....selected:mode $me $?"Enter The Modes Here... For Ex:+ixR"
  ..ignore
  ...ignore:ignore $address($$1,2)
  ...unignore:ignore -r $address($$1,2)
  ...ignoreALL:ignore *
  ...unignoreALL:ignore -r *
  ..ctcp
  ...version:ctcp $$1 version
  ...ping:ctcp $$1 ping
  ...time:ctcp $$1 time
  ..whois:whois $$1
  ..info:uwho $$1
  ..Query:q $$1
  .blacklist
  ..add:set %black $addtok(%black,$address($$1,2),32) | ban -k %sec.chan $$1 2 1Black listed. ( $+ $date $time $+ )
  ..remove:set %black $remtok(%black,$address($$1,2),32) 
  ..Show blacklist:echo -d 7,1The blacklist is:( $+ $numtok(%black,32) $+ ) %black 
  ..Clear blacklist:unset %black
  .bantag:set -u10 %bantagush  $?"Type the tag u want to kick&ban here. for ex: [A] / [B]" | bantag %bantagush | mode %sec.chan +b %bantagush $+ *!*@* 
  .commands:helper1
  .protection-status:pstatus2
}
;menu end;
--------------------------------------
--------------------------------------
 
Parsed for bracket errors and indented:
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
;This security bot made by xor1.
;Date of creation: 25/4/08
;please dont change credits!.
;this is the last version <LAST> <VERSION>
--------------------------------------
--------------------------------------
;Joinflood protection.
on !*:join:%sec.chan: {
  if (%sec.clone == ON) && (*.users.quakenet.org* !iswm $wildsite) {
    hinc $+(-mu,$iif($hget(jflood,join).unset,$ifmatch,2)) jflood join
    if (!$read(clones.txt, w ,$wildsite)) { write clones.txt $wildsite
      if (%clones1 != ON) { .timerzxc654 1 4 .remove clones.txt }
    }
    if (!$read(nicks.txt, w ,$nick)) { write nicks.txt $nick
      if (%clones1 != ON) { .timerzxc655 1 4 .remove nicks.txt }
    }
    if ($hget(jflood,join) >= 4) && (!%split) && (%clones1 != ON) {
      .timerzxc65* off
      mode %sec.chan +mr
      set %sec.adv OFF | set %clones1 ON | set %text-flood OFF | set %reapet OFF
      .timer 1 1 clonesbans
    }
  }
}
;End of Joinflood protection.
--------------------------------------
--------------------------------------
;Advertise protection.
on !*:text:*#*:%sec.chan: {
  if (%sec.adv == ON) {
    if ($nick isreg %sec.chan) { inc -u4 %adv }
    if (!$read(advertise.txt, w ,$wildsite)) { write advertise.txt $wildsite
      if (%adv1 != ON) { .timerzxc656 1 4 .remove advertise.txt }
    }
    if (!$read(advertisenicks.txt, w ,$nick)) { write advertisenicks.txt $nick
      if (%adv1 != ON) { .timerzxc657 1 4 .remove advertisenicks.txt }
    }
    if ($nick isreg %sec.chan) && (%adv < 4 ) {
      .timeref 1 1 ban %sec.chan $nick 2 | .timeref2 1 1 kick %sec.chan $nick 1Banned! You are violating Network Rules. [Advertise] ( $+ $date $time $+ )  ID: %num $+ .
    }
    if (%adv >= 4) && (%adv1 != ON) {
      .timere* off | .timerzxc65* off
      mode %sec.chan +mr
      set %adv1 on
      .timer 1 1 advertisebans
    }
  }
}
;End of advertise protections.
--------------------------------------
--------------------------------------
;NetSplit
on !*:quit: {
  if (*.net *.split isin $1-) && (!%split) {
    set -u1200 %split on | halt
  }
}
;NetSplit Ends
--------------------------------------
--------------------------------------
;Anti kicks protection.
on !*:kick:%sec.chan: {
  if (%takeover == ON) {
    if ($knick == $me) {
      if ($gettok($address($nick,2),2,64) !isin %masow) && ($nick != $logged($nick)) && ($nick != Q) {
        .timers off | unset %clones1 | .remove clones.txt | unset %adv1 | .remove advertise.txt | .remove advertisenicks.txt | .remove nicks.txt | .msg q ban %sec.chan $wildsite 1Don't Ever Kick The Guard.  | .msg q unbanme %sec.chan | .msg Q removeuser %sec.chan $nick | .timer 1 1 .msg Q invite %sec.chan | .timer 1 2 join %sec.chan | halt
      }
      elseif ($gettok($address($nick,2),2,64) isin %masow) || ($nick == $logged($nick)) || ($nick == Q) {
        .timers off |  unset %clones1 | .remove clones.txt | unset %adv1 | .remove advertise.txt | .remove advertisenicks.txt | .remove nicks.txt | .msg Q invite %sec.chan | .msg Q unbanme %sec.chan | .timer 1 1 join %sec.chan | halt
      }
    }
    if ($knick != $me) {
      if ($nick != Q) && ($gettok($address($nick,2),2,64) !isin %masow) && (($gettok($address($knick,2),2,64) isin %masow) || ($knick == $logged($knick))) {
        .msg Q removeuser %sec.chan $nick | .msg Q ban %sec.chan $wildsite 1Banned! Reason:Kick-Protected. | halt
      }
      if ($gettok($address($nick,2),2,64) !isin %masow) && ($gettok($address($knick,2),2,64) !isin %masow) && ($nick != Q) && ($nick != $logged($nick)) && ($knick != $logged($knick)) {
        if (%kicks [ $+ [ $nick ] ] == $calc(%allow-kick.times -1)) { .msg q ban %sec.chan $wildsite 1Banned! Reason:Don't Ever Takeover here. | .msg Q removeuser %sec.chan $nick | halt }
      }
      inc -u10 %kicks $+ $nick
    }
  }
}
;Anti kicks protection end.
--------------------------------------
--------------------------------------
;Anti bans protection.
on !*:ban:%sec.chan: {
  if (%takeover == ON) {
    if ($gettok($address($nick,2),2,64) !isin %masow) && ($nick != $logged($nick)) && ($banmask !iswm $address($me,6)) && ($nick != Q) {
      if (%bans [ $+ [ $nick ] ] == $calc(%allow-ban.times -1)) {
      .msg q ban %sec.chan $wildsite 1Don't Ever Takeover here. | .msg q removeuser %sec.chan $nick | unset %bans [ $+ [ $nick ] ] | halt }
    }
    inc -u10 %bans $+ $nick
  }
  if ($banmask iswm $address($me,6)) && ($gettok($address($nick,2),2,64) !isin %masow) && ($nick != $logged($nick)) && ($nick != Q) && (%banswtf != ON) {
    set %banswtf ON | .timer 1 15 unset %banswtf | .msg q ban %sec.chan $wildsite 1Banned! Reason:Don't Ever ban the Guard. | .msg Q removeuser %sec.chan $nick | halt
  }
}
;Anti bans protection ends.
--------------------------------------
--------------------------------------
;Joinpart protection.
on !*:part:%sec.chan: {
  if (%sec.part == ON) && (%clones1 != ON) {
    if (%JoinPart [ $+ [ $nick ] ] == 2) { mode %sec.chan +b $wildsite | kick %sec.chan $nick 1Banned! You Are Violating Network Rules. ( $+ $date $time $+ ) ID: %num | inc %num  | unset %JoinPart [ $+ [ $nick ] ] | halt }
    inc -u15 %JoinPart $+ $nick
  }
}
;Joinpart protection end.
--------------------------------------
--------------------------------------
;Flood&Reapet protections.
on *:text:*:%sec.chan:{
  if ($nick isreg %sec.chan) {
    hinc $+(-mu,$iif($hget(flood,text).unset,$ifmatch,3)) flood text
    if ($hget(flood,text) > 20) && (%flooding != ON) {
      set %text-flood OFF | set %reapet off | set %flooding ON
      mode %sec.chan +mr | .timer 1 100 mode %sec.chan -mr | .timer 1 100 set %reapet ON | .timer 1 100 set %text-flood ON | .timer 1 100 unset %flooding | halt
    }
    if (%text-flood == ON) {
      inc -u3 %flood. $+ $nick
      if (%flood. [ $+ [ $nick ] ] == $calc(%allow-flood.times -1)) { mode %sec.chan +b $wildsite | kick %sec.chan $nick 1Banned! You are violating Network Rules. [FLood] ( $+ $date $time $+ )  ID: %num $+ . | inc %num | halt }
    }
    if (%reapet == ON) {
      if (%reapet [ $+ [ $nick ] ] [ $+ [ $1 ] ] == $calc(%allow-reapet.times -1)) { mode %sec.chan +b $wildsite | kick %sec.chan $nick 1Banned! You are violating Network Rules. [Reapet] ( $+ $date $time $+ )  ID: %num $+ .  | inc %num | halt }
      inc -u3 %reapet $+ $nick $+ $1
    }
  }
  if (* $+ $str(d,1) $+ $chr(105) $+ $str(t,1) $+ $chr(115) iswm $1) && (!%flood) { $getush(%sec.chan) | set -u3 %flood 1 }
}
;FLood&Reapet protections end.
-----------------------------------------
--------------------------------------
;Anti deops protection
on !*:deop:%sec.chan:{
  if (%takeover == ON) {
    if ($opnick == $me) {
      if ($gettok($address($nick,2),2,64) !isin %masow) && (*quakenet* !iswm $nick) && ($nick != $logged($nick)) && (%banswtf != ON) {
        set %banswtf ON | .timer 1 15 unset %banswtf
        if ($me ison %sec.chan) { .msg Q op %sec.chan | .msg Q removeuser %sec.chan $nick | .msg q ban %sec.chan $wildsite 1Banned! Reason:Don't Ever Deop the Guard. | halt }
      }
      elseif ($gettok($address($nick,2),2,64) isin %masow) || ($nick == $logged($nick)) || (*quakenet* iswm $nick) {
        .msg Q op %sec.chan | halt
      }
    }
    elseif ($opnick != $me) {
      if ($gettok($address($nick,2),2,64) !isin %masow) && (*quakenet* !iswm $nick) && (Q !iswm $nick) && (($gettok($address($opnick,2),2,64) isin %masow) || ($opnick == $logged($opnick))) {
        .msg Q removeuser %sec.chan $nick | .msg Q ban %sec.chan $wildsite 1Banned! Reason:Don't Deop protected users. | halt
      }
    }
  }
}
;Anti deops protection end.
--------------------------------------
--------------------------------------
;Action protection.
on !*:action:*:%sec.chan: {
  if (%action == ON) && ($nick isreg %sec.chan) && (%clones1 != ON) {
    hinc $+(-mu,$iif($hget(action,$wildsite).unset,$ifmatch,2)) flooding $wildsite
    if ($hget(flooding,$wildsite) >= 4) {
      mode %sec.chan +b $wildsite | kick %sec.chan $nick  1Banned! You are violating Network Rules. [FLood] ( $+ $date $time $+ )  ID: %num $+ .  | inc %num | halt
    }
    if ($chr(35) isin $1-) {
      mode %sec.chan +b $wildsite | 1Banned! You are violating Network Rules. [Advertise] ( $+ $date $time $+ )  ID: %num $+ . | inc %num | halt
    }
  }
}
;Action protection ends.
--------------------------------------
--------------------------------------
;end of protections;
;end of protections;
;end of protections;
 
--------------------------------------
--------------------------------------
;menu
menu * {
  Protection Settings
  .Masterpass:set %masterpass $?"Enter The master pass here."
  .Channel:set %sec.chan $?"Type your chan here, dont forget #" | .timer 1 5 msg %sec.chan This channel is now beeing protected by me. | join %sec.chan
  .Sign:set %sec.sign $?"Type The sign here , ex: !/@/+/-" | echo -a Done the sign has been set to : " $+ %sec.sign $+ "
  .show Protection status: echo -d 7,1The Protection Status Are : Join-Flood = $iif(%sec.clone == ON,4ON,3OFF) 7___ Adv = $iif(%sec.adv == ON,4ON,3OFF) 7___Anti-Takeover = $iif(%takeover == ON,4ON,3OFF) 7___Join/Part = $iif(%sec.part == ON,4ON,3OFF) 7___Anti-Flood = $iif(%text-flood == ON,4ON,3OFF) 7___Reapet == $iif(%reapet == ON,4ON,3OFF) 7___Action = $iif(%action == ON,4ON,3OFF)
  .Set Protection ON/OFF
  ..ALL Protections
  ...ON:ALLON
  ...OFF:ALLOFF
  ..JoinFlood
  ...ON:set %sec.clone ON | echo -a JoinFLood protection are now ON
  ...OFF:set %sec.clone OFF | echo -a JoinFLood protection are now OFF
  ..Adv-Protection
  ...ON:set %sec.adv ON | echo -a Adv protection are now ON
  ...OFF:set %sec.adv OFF | echo -a Adv protection are now OFF
  ..Anti-Takeover
  ...ON:set %takeover ON | echo -a Anti Takeover protections are now ON
  ...OFF:set %takeover OFF | echo -a Anti Takeover protections are now OFF
  ..Flood
  ...ON:set %text-flood ON | echo -a Text Flood protections are now ON
  ...OFF:set %text-flood OFF | echo -a Text Flood protections are now OFF
  ..Reapet
  ...ON:set %reapet ON | echo -a Reapet protections are now ON
  ...OFF:set %reapet OFF | echo -a Reapet protections are now OFF
  ..Action
  ...ON:set %action ON | echo -a Action protections are now ON
  ...OFF:set %action OFF | echo -a Action protections are now OFF
  ..Join/part
  ...ON:set %sec.part ON | echo -a Join Part protections are now ON
  ...OFF:set %sec.part OFF | echo -a Join Part protections are now OFF
  Owners/Protected
  .set bot Protected: { set %masow1 $?"Type The owner Qacc here" | if (%masow1) {
      if (%masow1 $+ .users.quakenet.org !isin %masow) { set %masow $addtok(%masow,%masow1 $+ .users.quakenet.org,32) | echo -a %masow1 $+ .users.quakenet.org Is Now Protected }
      elseif (%masow1 $+ .users.quakenet.org isin %masow) { echo -a %masow1 $+ .users.quakenet.org is already Protected }
    }
  }
  .remove bot Protected: { set %masow1 $?"Type The owner Qacc That u want to remove" | if (%masow1) {
      if (%masow1 $+ .users.quakenet.org isin %masow) { set %masow $remtok(%masow,%masow1 $+ .users.quakenet.org,32) | echo -a %masow1 $+ .users.quakenet.org Is No Longer Protected }
      elseif (%masow1 $+ .users.quakenet