-
Notifications
You must be signed in to change notification settings - Fork 0
/
bot kicker
117 lines (114 loc) · 5.24 KB
/
bot kicker
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
:::::::::::::::::::::::::::::::::::::::::
:: Bot Kick Script ::
:: Original Script by Bima ramadhan.S ::
:: Modifications by SIDbim69 ::
:: Kicks unauthorized bots from ::
:: an SIDbim channel. ::
:: All Rights Reserved ::
:::::::::::::::::::::::::::::::::::::::::
;Instructions for Use:
;1. To turn on/off/view status of the script: !botkicker switch [on|off|status]
;2. To set a custom kick message: !botkicker set kickmsg kickmsghere, replacing "kickmsghere" with your kick message.
;3. To set a custom ban message: !botkicker set banmsg banmsghere, replacing "banmsghere" with your ban message.
;4. To set ban notification to channel/nick of a ban: !botkicker set nickchan nickorchan, replacing nickorchan with a desired nick or channel.
;5. To set exceptions: !botkicker set exception nick, replacing "nick" with the desired nick.
on *:TEXT:!botkicker *:#:{
if (!$2) { msg $chan Error: !botkicker [switch|set] }
if ($2 == switch) {
if (!$3) { msg $chan Error: !botkicker switch [on|off|status] }
if ($3 == on ) {
set % [ $+ [ $chan ] $+ ] .botkicker.switch on
msg $chan Bot Kicker is now ON.
HALT
}
if ($3 == off) {
set % [ $+ [ $chan ] $+ ] .botkicker.switch on
msg $chan Bot Kicker is now OFF.
HALT
}
if ($3 == status) {
msg $chan Bot Kicker is currently % [ $+ [ $chan ] $+ ] .botkicker.switch $+ .
HALT
}
}
if ($2 == set) {
if (!$2) { msg $chan Error: !botkicker set [kickmsg|banmsg|parameters|exceptions|nickchan] [text] }
if ($3 == kickmsg) {
set % [ $+ [ $chan ] $+ ] .botkicker.kickmsg $4-
msg $chan Bot Kicker kickmsg set to " $+ % [ $+ [ $chan ] $+ ] .botkicker.kickmsg $+ ".
HALT
}
if ($3 == banmsg) {
set % [ $+ [ $chan ] $+ ] .botkicker.banmsg $4-
msg $chan Bot Kicker banmsg set to " $+ % [ $+ [ $chan ] $+ ] .botkicker.kickmsg $+ ".
HALT
}
if ($3 == parameters) {
if ($4 == b) {
set % [ $+ [ $chan ] $+ ] .botkicker.parameters b
msg $chan Bot Kicker set to ban all unauthorized bots entering the channel.
HALT
}
if ($4 == kb) {
set % [ $+ [ $chan ] $+ ] .botkicker.parameters kb
msg $chan Bot Kicker set to kick on the first entry into the channel and ban on the second entry.
HALT
}
if ($4 == kkb) {
set % [ $+ [ $chan ] $+ ] .botkicker.parameters kkb
msg $chan Bot Kicker set to kick on the first two entries and ban on the third entry.
HALT
}
}
if ($3 == exceptions) {
if ($istok(% [ $+ [ $chan ] $+ ] .botkicker.exceptions,$4,124)) {
msg $chan $4 is already within the exception's for $+($chan,.)
}
else {
set % [ $+ [ $chan ] $+ ] .botkicker.exceptions $addtok(% [ $+ [ $chan ] $+ ] .botkicker.exceptions,$4,124)
msg $chan $4 has been added to the exception's list for $+($chan,.)
}
}
if ($3 == nickchan) {
set % [ $+ [ $chan ] $+ ] .botkicker.nickchan $4
msg $chan Bot Kicker set to notify % [ $+ [ $chan ] $+ ] .botkicker.nickchan of all bot bans.
HALT
}
}
}
On *:JOIN:#: {
if (% [ $+ [ $chan ] $+ ] .botkicker.switch == off) { HALT }
if (% [ $+ [ $chan ] $+ ] .botkicker.switch == on) {
if (*bot* iswm $nick) || (*bot* iswm $address($nick,2)) && ($nick != $me) {
if ($istok(% [ $+ [ $chan ] $+ ] .botkicker.exceptions,$nick,124)) { HALT }
else {
inc %counter. [ $+ [ $nick ] $+ ] . [ $+ [ $chan ] ]
inc %counter. [ $+ [ $address($nick,2) ] $+ ] . [ $+ [ $chan ] ]
if (% [ $+ [ $chan ] $+ ] .botkicker.parameters == b) {
mode $chan +b $address($nick,2)
msg $chan % [ $+ [ $chan ] $+ ] .botkicker.banmsg
kick $chan $nick % [ $+ [ $chan ] $+ ] .botkicker.kickmsg
msg % [ $+ [ $chan ] $+ ] .botkicker.nickchan $nick has been banned in $+($chan,.)
}
elseif (% [ $+ [ $chan ] $+ ] .botkicker.parameters == kb) {
if (%counter. [ $+ [ $nick ] $+ ] . [ $+ [ $chan ] ] == 1) { kick $chan $nick % [ $+ [ $chan ] $+ ] .botkicker.kickmsg }
elseif (%counter. [ $+ [ $nick ] $+ ] . [ $+ [ $chan ] ] == 2) {
mode $chan +b $address($nick,2)
msg $chan % [ $+ [ $chan ] $+ ] .botkicker.banmsg
kick $chan $nick % [ $+ [ $chan ] $+ ] .botkicker.kickmsg
msg % [ $+ [ $chan ] $+ ] .botkicker.nickchan $nick has been kick/banned in $+($chan,.)
}
elseif (% [ $+ [ $chan ] $+ ] .botkicker.parameters == kkb) {
if (%counter. [ $+ [ $nick ] $+ ] . [ $+ [ $chan ] ] == 1) || (%counter. [ $+ [ $nick ] $+ ] . [ $+ [ $chan ] ] == 2) { kick $chan $nick % [ $+ [ $chan ] $+ ] .botkicker.kickmsg }
elseif (%counter. [ $+ [ $nick ] $+ ] . [ $+ [ $chan ] ] == 3) {
mode $chan +b $address($nick,2)
msg $chan % [ $+ [ $chan ] $+ ] .botkicker.banmsg
kick $chan $nick % [ $+ [ $chan ] $+ ] .botkicker.kickmsg
msg % [ $+ [ $chan ] $+ ] .botkicker.nickchan $nick has been kicked twice and banned in $+($chan,.)
}
}
}
}
}
}
}