Epic help me editt this code to work exactlyy please.
This code kick, ban IDENT. it work on add command, but on join it kick all of nick join channel.
#####################################################################
# Name: Akick Temp Ban v1.0
# Author: Epic (epicnet@mail.ru,
http://epicnet.ru)
# Description: Sets a temporary ban, which is automatically removed after a while and the intruder is entered into the database for subsequent auto-ban.
#####################################################################
alias atb_set {
%atb_work = yes
%atb_kick = yes
%atb_akick = yes
%atb_notice = yes
%atb_private = no
%atb_comm = .i
%atb_btype = 2
%atb_chans = all
%atb_reason = $mircdir $+ atb_identreason.txt
%atb_pathdb = $mircdir $+ atb_identdatabase.txt
%atb_icons = 4[Banned] (reason:
%atb_time = 10m
%atb_admins = $read(userbot.txt)
%atb_prefix = [!,~,&,@,%,+]
}
=====================================================
on *:TEXT:*:#:{
atb_set | if (%atb_work == yes) {
if (%atb_chans == all) || ($istok(%atb_chans,$chan,44)) {
if ($strip($1) == %atb_comm) {
var %atb_up $remove($nick($chan,$nick).pnick,$nick) | var %atb_knick $strip($2)
if ($nick ison #userbot) && ($nick !isreg #userbot) {
if ($2 == $null) { .notice $nick Correct syntax: %atb_comm <nick> | halt }
if (!$comchan(%atb_knick,0).nick) { .notice $nick I do not see on the channels a nickname: %atb_knick | halt }
var %atb_banid $+([id:,$chr(32),$rand(1000,9999),])
atb_bankick $chan %atb_knick %atb_banid - (for more information regarding your ban please contact nickname Kendy for removal)
if (%atb_akick == yes) {
if (!$read(%atb_pathdb, -w, $+(*,%atb_knick,*)) && !$read(%atb_pathdb, -w, $+(*,$address(%atb_knick,%atb_btype)))) {
.write $qt(%atb_pathdb) $+(%atb_banid,$chr(44),$ial($2).user $+ @*)
}
}
if (%atb_notice == yes) { .notice $nick IdentAkickBan: %atb_knick - $+($chr(40),%atb_time,$chr(41)) %atb_banid }
if (%atb_private == yes) { .msg $nick IdentAkickBan: %atb_knick - $+($chr(40),%atb_time,$chr(41)) %atb_banid }
}
}
}
}
}
on *:JOIN:#:{
atb_set | if (%atb_work == yes) {
if (%atb_chans == all) || ($istok(%atb_chans,$chan,44)) {
if $ial($2).user == $read(%atb_pathdb) {
var %atb_jbanid $gettok($read(%atb_pathdb,$readn),1,44) | atb_bankick $chan $nick %atb_jbanid - (for more information regarding your ban please contact nickname Kendy for removal)
}
}
}
}
-----------------------------------------------------
alias atb_bankick {
.ban $+(-u,$convertsec(%atb_time)) $1 $gettok($address($2,10),1,64) $+ @*
if (%atb_kick == yes) {
if (%atb_icons != $null) var %atb_i $gettok(%atb_icons,$rand(1,$numtok(%atb_icons,44)),44)
if ($exists(%atb_reason) == $true) var %atb_r $read(%atb_reason) | else var %atb_r 4[Banned] (reason: Your IDENT is inappropiate for this channel. Please change it or face a ban)
.kick $1 $2 %atb_i %atb_r $3-
}
}
alias sprefix {
var %sp_sp $remove($2,[,]) | var %sp_sn $numtok(%sp_sp,$3)
var %q 1 | while (%q <= %sp_sn) { if ($gettok(%sp_sp,%q,$3) isin $1) return $true | inc %q } | return $false
}
alias convertsec {
var %cst $right($1,1) | var %csn $remove($1,%cst)
if ($count(%cst,s,m,h,d)) {
if (%cst == s) return %csn
if (%cst == m) return $calc(%csn * 60)
if (%cst == h) return $calc(%csn * 3600)
if (%cst == d) return $calc(%csn * 86400)
}
else { .echo -s Error: Invalid time format - Correct format: 1s,1m,1h,1d | return 300 }
}