alias atb_set {
%atb_comm = .blacklist
%atb_btype = 2
%atb_chans = all
%atb_notice = yes
%atb_work = yes
%atb_reason = $mircdir $+ atb_blacklistreason.txt
%atb_pathdb = $mircdir $+ atb_identblacklistdatabase.txt
%atb_admins = $read(userbot.txt,nw,$nick)
}
on @*:text:*:#:{
var %atb_banid $+([ID:,$chr(32),$rand(A,Z),$rand(A,Z),$rand(10000,99999),])
var %atb_knick $strip($2)
if ($strip($1) == %atb_comm) {
if (*irccloud* iswm $address) { atb_bankick $chan %atb_knick %atb_banid - (for more information regarding your ban please contact nickname Kendy for removal)
else { .ban -ku600 $chan %atb_knick %atb_btype %atb_banid - (for more information regarding your ban please contact nickname Kendy for removal)
if (!$read(%atb_pathdb, -w, $+(*,$remove($address($2,10),1,64) $+ @*,*))) {
.write $qt(%atb_pathdb) $+(%atb_banid,$chr(44),$remove($address($2,10),1,64) $+ @*)
}
}
if (%atb_notice == yes) { .notice $nick BlackListAkickBan: %atb_knick - $+($chr(40),%atb_time,$chr(41)) %atb_banid }
if ($3 isin $1-) { .ban -ku600 $chan %atb_knick $3- %atb_banid - (for more information regarding your ban please contact nickname Kendy for removal)
}
}
}
}
on *:JOIN:#:{
if ($network == DaVang) {
atb_set | if (%atb_work == yes) {
if (%atb_chans == all) || ($istok(%atb_chans,$chan,44)) {
if ($read(%atb_pathdb, -w, $+($remove(*,$address($2,10),1,64)))) {
var %atb_jbanid $gettok($read(%atb_pathdb,$readn),1,44)
var %atb_reason1 You are no longer welcome here)
if (*irccloud* iswm $address) { .atb_bankick $chan $nick %atb_jbanid $+ ) }
else { .ban -ku600 $chan $nick %atb_reason1 %atb_jbanid $+ ) }
}
}
}
}
}
alias atb_bankick {
.ban $1 $gettok($address($2,10),1,64)
if (%atb_kick == yes) {
if ($exists(%atb_reason) == $true) var %atb_r $read(%atb_reason) | else var %atb_r 4[Banned] (reason: You are no longer welcome here)
.kick $1 $2 %atb_i %atb_r $3-
}
}