|
Joined: Jan 2012
Posts: 329
Pan-dimensional mouse
|
Pan-dimensional mouse
Joined: Jan 2012
Posts: 329 |
I have completely recreated your conditions – using the same Сommands, Nicknames, Channels and even IP/Hosts. But I was unable to reproduce your problem (error). Demo screenshot of the script's operability and in what format the string is saved in the database ( Test 1): Demo screenshot of the script's operability and in what format the string is saved in the database ( Test 2): As you can see, everything works fine, as it should work. Probably you have changed something or poorly read the instructions, where the details of the transition to the new version of the script were explained. Try reinstalling the script as described in the instructions. To do this, you will probably have to completely delete all old files and variables associated with this script. Then try testing the script again.
|
|
|
|
Joined: Mar 2021
Posts: 48
Ameglian cow
|
OP
Ameglian cow
Joined: Mar 2021
Posts: 48 |
It work now perfect. I use the same 2 codes,so it fails.
Can you change [id:LLNNNNN] to [id:spacebar NNNN] for me please, i don't need Letter on the firs Number., number rand 1000,9999 only, no need 5 digiters
Thank you Epic so much. You are number 1 of coder i think
|
|
|
|
Joined: Mar 2021
Posts: 48
Ameglian cow
|
OP
Ameglian cow
Joined: Mar 2021
Posts: 48 |
I tweaked your code a bit better like this:
COMMAND: !bhelp [11:00:40] <@ChanGuard> !bhelp [11:00:42] -Kendy- AkickTempBan - Help for commands: [11:00:42] -Kendy- Set a temporary ban on the channel: !b <nick> <reason> (Example: !b NickChat Test for you) [11:00:43] -Kendy- Add user to database: !badd <nick> <host> [id] [reason] (Example: !badd NickChat *!*@10.11.12.13 9999 Test for you) [11:00:43] -Kendy- Delete user from database: !bdel <nick|host|id> (Example: !bdel NickChat OR !bdel *!*@10.11.12.13 OR !bdel 9999) [11:00:43] -Kendy- Find a user in the database: !bfind <nick|mask|id> (Example: !bdel NickChat OR !bdel *!*@irc.domain.com OR !bdel 9999) [11:00:43] -Kendy- List of users in the database: !blist [Number[-Number]] (Example: !blist 3 OR !blist 1-10) [11:00:43] -Kendy- AkickTempBan - End of help.
NOTICE COMMAND: !bhelp (/notice MyBot !bhelp) [11:00:54] -> -Kendy- !bhelp [11:00:55] -Kendy- AkickTempBan - Help for commands: [11:00:56] -Kendy- Set a temporary ban on the channel: !b <nick> [reason] (Example: !b NickChat Test for you) [11:00:56] -Kendy- Add user to database: !badd <nick> <host> [id] [reason] (Example: !badd NickChat *!*@10.11.12.13 9999 Test for you) [11:00:56] -Kendy- Delete user from database: !bdel <nick|host|id> (Example: !bdel NickChat OR !bdel *!*@10.11.12.13 OR !bdel 9999) [11:00:56] -Kendy- Find a user in the database: !bfind <nick|mask|id> (Example: !bdel NickChat OR !bdel *!*@irc.domain.com OR !bdel 9999) [11:00:56] -Kendy- List of users in the database: !blist [Number[-Number]] (Example: !blist 3 OR !blist 1-10) [11:00:56] -Kendy- AkickTempBan - End of help.
Last edited by Robert; 09/05/21 04:04 AM.
|
|
|
|
Joined: Mar 2021
Posts: 48
Ameglian cow
|
OP
Ameglian cow
Joined: Mar 2021
Posts: 48 |
Epic: Can you change [id:LLNNNNN] to [id:spacebar LLNNNNN] please!
i means: [id: LetterRandomNumber] ===> NOT [id:LetterRandomNumber] (No blank, space after id:)
Example: + TRUE: [id: AC86757] <=== with blank (space) after id + FALSE: [id:AC86757]
Thank you Epic so much. You are number 1 of coder i think
Last edited by Robert; 09/05/21 03:48 AM.
|
|
|
|
Joined: Jan 2012
Posts: 329
Pan-dimensional mouse
|
Pan-dimensional mouse
Joined: Jan 2012
Posts: 329 |
I tweaked your code a bit better ... It was intended that way so that you can edit and modify these lines as you see fit. For example: " %atb_msg_syntax_comm = %atb_comm <nick> [reason] (Example: !b NickChat Test for you)" Can you change [id:LLNNNNN] to [id: LLNNNNN] please! Ok, I will try to make some changes to the code to achieve what you want (so that you can add something like a space). Although in my opinion this is looks better, without the separating space and this does not split the ID value into 2 tokens, which can lead to a number of new problems.
|
|
|
|
Joined: Mar 2021
Posts: 48
Ameglian cow
|
OP
Ameglian cow
Joined: Mar 2021
Posts: 48 |
Ok, thanks Epic and i'm waiting for your new code soon!
Can you edited a bit like this for me please?
[22:21:27] <@Kendy> ~b blank [22:21:27] * ChanGuard sets mode: +b *!*@216.244.985E.38V9 [22:21:27] * blank was kicked from #lobby by ChanGuard ([Banned] (reason: You are no longer welcome here due to continual behavior problems) [id:UN15303]) [22:21:35] * ChatServ sets mode: +l 9 [22:21:37] * Kendy sets mode: -b *!*@216.244.985E.38V9 [22:21:43] * blank (DVQ@216.244.985E.38V9) joins #lobby [22:21:44] * ChanGuard sets mode: +b *!*@216.244.985E.38V9 [22:21:44] * blank was kicked from #lobby by ChanGuard ([Banned] (reason: You are no longer welcome here due to continual behavior problems) [id:UN15303]) <== Have ")" after word problems
I want the result exactly like this: [22:21:27] <@Kendy> ~b blank [22:21:27] * ChanGuard sets mode: +b *!*@216.244.985E.38V9 [22:21:27] * blank was kicked from #lobby by ChanGuard ([Banned] (reason: You are no longer welcome here due to continual behavior problems [id:UN15303] - (for more information regarding your ban please contact nickname Kendy for removal)) <=== Don't have ")" after word problems [22:21:35] * ChatServ sets mode: +l 9 [22:21:37] * Kendy sets mode: -b *!*@216.244.985E.38V9 [22:21:43] * blank (DVQ@216.244.985E.38V9) joins #lobby [22:21:44] * ChanGuard sets mode: +b *!*@216.244.985E.38V9 [22:21:44] * blank was kicked from #lobby by ChanGuard ([Banned] (reason: You are no longer welcome here due to continual behavior problems [id:UN15303] - (for more information regarding your ban please contact nickname Kendy for removal))
NOTE: In file atb_reason.txt the reason don't have - (for more information regarding your ban please contact nickname Kendy for removal), only this: You are no longer welcome here due to continual behavior problems You are not welcome here The Operator is always right .....
Last edited by Robert; 10/05/21 03:40 PM.
|
|
|
|
Joined: Jan 2012
Posts: 329
Pan-dimensional mouse
|
Pan-dimensional mouse
Joined: Jan 2012
Posts: 329 |
Done! Akick Temp Ban v2.1 – updates: 1.Made minor additions and corrections to the code. 2.Added new variables and parameters in alias " atb_set". You can edit the values of these variables at your discretion, observing the correct format in the examples given: %atb_icons – contains additional comma-separated icons (emoji) for add to the kick reason. If you don't want to use this, then set a value like this: " %atb_icons = $null". %atb_idformat – contains a value from characters to generate an identification number in random order: <S> = one invisible character (space), <L> = one letter, <N> = one numeral. Correct default format: <SLLNNNNN>. %atb_bprefix – contains an additional prefix to the message the kick. If you don't want to use this, then set a value like this: " %atb_bprefix = $null". (You can change this to any other text/prefix you like). %atb_bsuffix – contains an additional ending of the message the kick. If you don't want to use this, then set a value like this: " %atb_bsuffix = $null". (You can change this to any other text/suffix you like). Demo screenshot of the script's operability: This code must be inserted into the scripts editor. To do this, press the key combination " ALT+R", find the old code via " View" and replace his to the new code, further save script called " AkickTempBan.mrc":
#####################################################################
# Name: Akick Temp Ban v2.1
# 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.
# Commands: !bhelp
#####################################################################
alias atb_set {
%atb_work = yes
%atb_kick = yes
%atb_akick = yes
%atb_notice = yes
%atb_private = no
%atb_chans = all
%atb_comm = !b
%atb_commhelp = !bhelp
%atb_commadd = !badd
%atb_commdel = !bdel
%atb_commfind = !bfind
%atb_commlist = !blist
%atb_pathreason = $scriptdir $+ atb_reason.txt
%atb_pathdb = $scriptdir $+ atb_database.txt
%atb_icons = 🔨,✞,☠,🔥,⚡,🌠,🏁,🚩,😈
%atb_idprefix = id:
%atb_idformat = SLLNNNNN
%atb_btype = 2
%atb_btime = 10m
%atb_stopcomm = 3s
%atb_admins = Epic,Robert
%atb_prefix = [!,~,&,@,%]
;-------------------------
%atb_logo = AkickTempBan
%atb_bprefix = [Banned] (reason:
%atb_bsuffix = 12- (for more information regarding your ban please contact nickname "Admin-Nick" for removal))
%atb_msg_rd = Bye! You are banned
%atb_msg_cs = Correct syntax:
%atb_msg_stopcomm = %atb_logo - Stop! Don't write commands so fast. It remains to wait:
;-------------------------
%atb_msg_syntax_comm = %atb_comm <nick> [reason]
%atb_msg_syntax_commadd = %atb_commadd <nick> <host> [id] [reason]
%atb_msg_syntax_commdel = %atb_commdel <nick|host|id>
%atb_msg_syntax_commfind = %atb_commfind <nick|mask|id>
%atb_msg_syntax_commlist = %atb_commlist [N[-N]]
;-------------------------
%atb_head_help = %atb_logo - Help for commands:
%atb_msg_help1 = Set a temporary ban on the channel: %atb_msg_syntax_comm
%atb_msg_help2 = Add user to database: %atb_msg_syntax_commadd
%atb_msg_help3 = Delete user from database: %atb_msg_syntax_commdel
%atb_msg_help4 = Find a user in the database: %atb_msg_syntax_commfind
%atb_msg_help5 = List of users in the database: %atb_msg_syntax_commlist
;-------------------------
%atb_head_add = %atb_logo - Adding a write to the database:
%atb_false_add = %atb_logo - Such an entry already exists in the database:
%atb_head_del1 = %atb_logo - Deleting channel from a line:
%atb_head_del2 = %atb_logo - Line deleted from database:
%atb_msg_del = Your channel has been removed from the list:
%atb_false_del1 = %atb_logo - For this user there is no longer a ban for your channel:
%atb_false_del2 = %atb_logo - Nothing found... Try changing search data.
%atb_head_find = %atb_logo - According to your request, the database found:
%atb_false_find = %atb_logo - Nothing found... Try changing search data.
%atb_head_list = %atb_logo - List of users in the database - Total:
%atb_msg_check1 = %atb_logo - You don't have enough rights. Mandatory status prefix on the channel:
%atb_msg_check2 = %atb_logo - I have no rights on this channel. I need a status prefix: ~,&,@,%
%atb_msg_check3 = %atb_logo - I do not see on the channels a nickname:
}
=====================================================
on *:TEXT:*:#:{
atb_set | if (%atb_work == yes) {
if (%atb_chans == all) || ($istok(%atb_chans,$chan,44)) {
var %atb_tokens $strip($1) $chan $nick $strip($2-) | tokenize 32 %atb_tokens
if ($1 == %atb_comm) { if (!$stopcomm($2,$3)) { atb_check $1- | atb_bankick_comm $2- | stopcomm $2-3 } | else .notice $3 $stopcomm($2,$3) }
if ($1 == %atb_commhelp) { if (!$stopcomm($2,$3)) { atb_check $1- | atb_help $2- | stopcomm $2-3 } | else .notice $3 $stopcomm($2,$3) }
if ($1 == %atb_commadd) { if (!$stopcomm($2,$3)) { atb_check $1- | atb_add $2- | stopcomm $2-3 } | else .notice $3 $stopcomm($2,$3) }
if ($1 == %atb_commdel) { if (!$stopcomm($2,$3)) { atb_check $1- | atb_del $2- | stopcomm $2-3 } | else .notice $3 $stopcomm($2,$3) }
if ($1 == %atb_commfind) { if (!$stopcomm($2,$3)) { atb_check $1- | atb_find $2- | stopcomm $2-3 } | else .notice $3 $stopcomm($2,$3) }
if ($1 == %atb_commlist) { if (!$stopcomm($2,$3)) { atb_check $1- | atb_list $2- | stopcomm $2-3 } | else .notice $3 $stopcomm($2,$3) }
}
}
}
on *:JOIN:#:{ atb_set | if (%atb_work == yes) { if (%atb_chans == all) || ($istok(%atb_chans,$chan,44)) { var %atb_jnick $nick | var %atb_jhost $address($nick,%atb_btype) | if ($istok($findb(%atb_jnick).chan,$chan,44)) { atb_bankick_jn $chan !nomsg! %atb_jnick $findb(%atb_jnick).id $findb(%atb_jnick).reason | halt } | if ($istok($findb(%atb_jhost).chan,$chan,44)) { atb_bankick_jn $chan !nomsg! %atb_jnick $findb(%atb_jhost).id $findb(%atb_jhost).reason } } } }
on *:NICK:{ atb_set | if (%atb_work == yes) { var %atb_nn $newnick | if ($findc(%atb_nn)) { var %atb_fcs $v1 | var %y 1 | while (%y <= $numtok(%atb_fcs,44)) { var %atb_fc $gettok(%atb_fcs,%y,44) | var %atb_nnick %atb_nn | var %atb_nhost $address(%atb_nn,%atb_btype) | if ($istok($findb(%atb_nnick).chan,%atb_fc,44)) { atb_bankick_jn %atb_fc !nomsg! %atb_nnick $findb(%atb_nnick).id $findb(%atb_nnick).reason | goto next1 } | if ($istok($findb(%atb_nhost).chan,%atb_fc,44)) { atb_bankick_jn %atb_fc !nomsg! %atb_nnick $findb(%atb_nhost).id $findb(%atb_nhost).reason } | :next1 | inc %y } } } }
-----------------------------------------------------
alias -l atb_check {
var %atb_up $remove($nick($2,$3).pnick,$3)
if (!$istok(%atb_admins,$3,44) && $sprefix(%atb_up,%atb_prefix,44) == $false) { .notice $3 %atb_msg_check1 $remove(%atb_prefix,[,]) | halt }
if ($1 == %atb_comm) { if (!$count($nick($2,$me).pnick,~,&,@,%)) { .notice $3 %atb_msg_check2 | halt } | if (!$4) { .notice $3 %atb_msg_cs %atb_msg_syntax_comm | halt } | if (!$comchan($4,0)) { .notice $3 %atb_msg_check3 $4 | halt } }
if ($1 == %atb_commadd) { if (!$4) || (!$5) { .notice $3 %atb_msg_cs %atb_msg_syntax_commadd | halt } }
if ($1 == %atb_commdel) { if (!$4) { .notice $3 %atb_msg_cs %atb_msg_syntax_commdel | halt } }
if ($1 == %atb_commfind) { if (!$4) { .notice $3 %atb_msg_cs %atb_msg_syntax_commfind | halt } }
if ($1 == %atb_commlist) { if ($4 && $4 !isnum && - !isin $4) || ($4 && - isin $4 && !$count($gettok($4,1,45),0,1,2,3,4,5,6,7,8,9)) || ($4 && - isin $4 && !$count($gettok($4,2,45),0,1,2,3,4,5,6,7,8,9)) { .notice $3 %atb_msg_cs %atb_msg_syntax_commlist | halt } }
}
-----------------------------------------------------
alias -l atb_bankick_comm { if ($findb($3)) { var %atb_banid $findb($3).id | var %atb_reason $findb($3).reason } | else { var %atb_banid $+([,%atb_idprefix,$idform(%atb_idformat),]) | if (%atb_icons != $null) var %atb_icon $gettok(%atb_icons,$rand(1,$numtok(%atb_icons,44)),44) | if ($4) var %atb_reason %atb_icon $4- | else { if ($exists(%atb_pathreason) == $true) var %atb_reason %atb_icon $read(%atb_pathreason) | else var %atb_reason %atb_icon %atb_msg_rd } } | atb_bankick_act $1 $2 $3 %atb_banid %atb_reason }
alias -l atb_bankick_jn { if ($findb($3)) { var %atb_banid $findb($3).id | var %atb_reason $findb($3).reason } | else { if (%atb_icons != $null) var %atb_icon $gettok(%atb_icons,$rand(1,$numtok(%atb_icons,44)),44) | if (!$4) { var %atb_banid $+([,%atb_idprefix,$idform(%atb_idformat),]) } | else { var %atb_banid $4 } | if (!$5) { if ($exists(%atb_pathreason) == $true) var %atb_reason %atb_icon $read(%atb_pathreason) | else var %atb_reason %atb_icon %atb_msg_rd } | else { var %atb_reason $5- } } | atb_bankick_act $1 $2 $3 %atb_banid %atb_reason }
alias -l atb_bankick_act {
if (%atb_akick == yes) { var %atb_aknick $3 | var %atb_akhost $address($3,%atb_btype) | if ($findb(%atb_aknick) && $2 != !nomsg!) { if (!$istok($findb(%atb_aknick).chan,$1,44)) { var %atb_l $findb(%atb_aknick).line | var %atb_s $findb(%atb_aknick).string | var %atb_t $+($gettok(%atb_s,4,59),$chr(44),$1) | var %atb_ns $puttok(%atb_s,%atb_t,4,59) | .write -l $+ %atb_l $qt(%atb_pathdb) %atb_ns } } | if ($findb(%atb_akhost) && $2 != !nomsg!) { if (!$istok($findb(%atb_akhost).chan,$1,44)) { var %atb_l $findb(%atb_akhost).line | var %atb_s $findb(%atb_akhost).string | var %atb_t $+($gettok(%atb_s,4,59),$chr(44),$1) | var %atb_ns $puttok(%atb_s,%atb_t,4,59) | .write -l $+ %atb_l $qt(%atb_pathdb) %atb_ns } } | if (!$findb(%atb_aknick) && !$findb(%atb_akhost)) { .write -il1 $qt(%atb_pathdb) $+($4,$chr(59),$3,$chr(59),$address($3,%atb_btype),$chr(59),$1,$chr(59),$5-) } }
.ban $+(-u,$convertsec(%atb_btime)) $1 $3 %atb_btype | if (%atb_kick == yes && $3 ison $1) { .kick $1 $3 %atb_bprefix $5- $4 %atb_bsuffix } | if (%atb_notice == yes && $2 != !nomsg!) { .notice $2 %atb_logo - $3 $+($chr(40),%atb_btime,$chr(41)) $4 $findb($3).chan - $5- } | if (%atb_private == yes && $2 != !nomsg!) { .msg $2 %atb_logo - $3 $+($chr(40),%atb_btime,$chr(41)) $4 $findb($3).chan - $5- }
}
-----------------------------------------------------
alias -l atb_help { .notice $2 %atb_head_help | .notice $2 %atb_msg_help1 | .notice $2 %atb_msg_help2 | .notice $2 %atb_msg_help3 | .notice $2 %atb_msg_help4 | .notice $2 %atb_msg_help5 }
alias -l atb_add {
if (!$findb($3)) { var %atb_ah $+(*!*@,$remove($4,*,!,@)) | if (%atb_icons != $null) var %atb_icon $gettok(%atb_icons,$rand(1,$numtok(%atb_icons,44)),44) | var %atb_banchans $1 | if ($5) { var %atb_space $idforms($count(%atb_idformat,S)) | var %atb_banid $+([,%atb_idprefix,%atb_space,$remove($5,id,:,[,]),]) } | else { var %atb_banid $+([,%atb_idprefix,$idform(%atb_idformat),]) } | if ($6) { var %atb_reason %atb_icon $6- } | else { if ($exists(%atb_pathreason) == $true) var %atb_reason %atb_icon $read(%atb_pathreason) | else var %atb_reason %atb_icon %atb_msg_rd } | .write -il1 $qt(%atb_pathdb) $+(%atb_banid,$chr(59),$3,$chr(59),%atb_ah,$chr(59),%atb_banchans,$chr(59),%atb_reason) | .notice $2 %atb_head_add | .notice $2 $+(+,$chr(32),,1,.,) %atb_banid $3 %atb_ah %atb_banchans - %atb_reason | return }
else { if (!$istok($findb($3).chan,$1,44)) { var %atb_l $findb($3).line | var %atb_s $findb($3).string | var %atb_t $+($gettok(%atb_s,4,59),$chr(44),$1) | var %atb_ns $puttok(%atb_s,%atb_t,4,59) | .write -l $+ %atb_l $qt(%atb_pathdb) %atb_ns | var %atb_an $2 | tokenize 59 $findb($3).string | .notice %atb_an %atb_head_add | .notice %atb_an $+(,%atb_l,.,) $1-4 - $5- | return } } | var %atb_an $2 | tokenize 59 $findb($3).string | .notice %atb_an %atb_false_add $2 = line $+($chr(40),,$findb($3).line,,$chr(41)) | .notice %atb_an $+(,$findb($3).line,.,) $1-4 - $5-
}
alias -l atb_del { if ($3 && $findb($3)) { var %atb_dcc $1 | var %atb_dn $2 | var %atb_dl $findb($3).line | var %atb_ds $findb($3).string | var %atb_dc $findb($3).chan | if ($istok(%atb_dc,$1,44)) { var %atb_dc $remextcom($remove(%atb_dc,%atb_dcc)) | if (%atb_dc != $null) { var %atb_dst $puttok(%atb_ds,%atb_dc,4,59) | .write -l $+ %atb_dl $qt(%atb_pathdb) %atb_dst | tokenize 59 $findb($3).string | .notice %atb_dn %atb_head_del1 | .notice %atb_dn $+(,%atb_dl,.,) $1-4 - $5- | .notice %atb_dn %atb_msg_del %atb_dcc } | else { tokenize 59 %atb_ds | .write -dl $+ %atb_dl $qt(%atb_pathdb) | .notice %atb_dn %atb_head_del2 | .notice %atb_dn $+(-,$chr(32),,%atb_dl,.,) $1-4 - $5- } } | else { tokenize 59 %atb_ds | .notice %atb_dn %atb_false_del1 %atb_dcc | .notice %atb_dn $+(,%atb_dl,.,) $1-4 - $5- } } | else { .notice $2 %atb_false_del2 } }
alias -l atb_find { if ($3 && $findb($3)) { .notice $2 %atb_head_find | var %atb_fn $2 | var %atb_fl $findb($3).line | var %atb_fs $findb($3).string | tokenize 59 %atb_fs | .notice %atb_fn $+(,%atb_fl,.,) $1-4 - $5- } | else { .notice $2 %atb_false_find } }
alias -l atb_list { var %atb_ln $2 | var %atb_lnum $3 | var %atb_ll $lines(%atb_pathdb) | .notice %atb_ln %atb_head_list $+($chr(40),,%atb_ll,,$chr(41)) | var %w 1 | while (%w <= %atb_ll) { tokenize 59 $read(%atb_pathdb,%w) | if (!%atb_lnum) .notice %atb_ln $+(,%w,.,) $1-4 - $5- | if (%atb_lnum && - !isin %atb_lnum) { if (%w <= %atb_lnum) { .notice %atb_ln $+(,%w,.,) $1-4 - $5- } | else { .break } } | if (%atb_lnum && - isin %atb_lnum) { if (%w >= $gettok(%atb_lnum,1,45)) { .notice %atb_ln $+(,%w,.,) $1-4 - $5- } | if (%w >= $gettok(%atb_lnum,2,45)) { .break } } | inc %w } }
alias atb_remove_vars { unset %atb_* | .echo -st All script variables "AkickTempBan" have been deleted successfully. }
-----------------------------------------------------
alias -l findb { :next3 | if (!%sbd_line) var %sbd_line 1 | if ($read(%atb_pathdb, -w, $+(*,$1,*), %sbd_line)) { var %sdb_r $readn | var %sdb_s $read(%atb_pathdb,%sdb_r) | var %sbf_s1 $remove($1,%atb_idprefix,$chr(160),$chr(32),[,],:) | var %sbd_s1 $remove($gettok(%sdb_s,1,59),%atb_idprefix,$chr(160),$chr(32),[,],:) | var %sbd_s2 $gettok(%sdb_s,2,59) | var %sbd_s3 $gettok(%sdb_s,3,59) | if (%sbf_s1 == %sbd_s1) || ($1 == %sbd_s2) || ($+(*,$1,*) iswm %sbd_s3) { if (line == $prop) return %sdb_r | if (string == $prop) return %sdb_s | if (id == $prop) return $replace($gettok(%sdb_s,1,59),$chr(32),$chr(160)) | if (nick == $prop) return $gettok(%sdb_s,2,59) | if (host == $prop) return $gettok(%sdb_s,3,59) | if (chan == $prop) return $gettok(%sdb_s,4,59) | if (reason == $prop) return $gettok(%sdb_s,5-,59) | return $true } | else { inc %sbd_line | if (%sbd_line <= $lines(%atb_pathdb)) goto next3 } } }
alias -l findc { var %n 1 | while (%n <= $comchan($1,0)) { var %coc $comchan($1,%n) | if (%atb_chans == all) || ($istok(%atb_chans,%coc,44)) { if (!%clc) var %clc %coc | else var %clc $+(%clc,$chr(44),%coc) } | inc %n } | return %clc }
alias -l 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 -l stopcomm { if ($hget($+(stopcomm,$2),$1)) return %atb_msg_stopcomm $+($chr(40),,$v1,,$chr(41),$chr(32),sec.) | if (!$hget($+(stopcomm,$2),$1)) .hadd -mz $+(stopcomm,$2) $1 $convertsec(%atb_stopcomm) }
alias -l 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 -st %atb_logo - Error: Invalid time format - Correct format: 1s,1m,1h,1d | return 60 } }
alias -l idform { if ($countcs($1,S,L,N)) { unset %atb_cif | var %i 1 | while (%i <= $len($1)) { if ($mid($1,%i,1) == S) var %atb_cif $+(%atb_cif,$chr(160)) | if ($mid($1,%i,1) == L) var %atb_cif $+(%atb_cif,$rand(A,Z)) | if ($mid($1,%i,1) == N) var %atb_cif $+(%atb_cif,$rand(0,9)) | inc %i } | return %atb_cif } | else { .echo -st %atb_logo - Error: Invalid ID format - Correct format: SLLNNNNN - S = invisible character (space), L = random letter, N = random number. | return $+($rand(A,Z),$rand(A,Z),$rand(10000,99999)) } }
alias -l idforms { var %i 1 | while (%i <= $1) { var %atb_cis $+(%atb_cis,$chr(160)) | inc %i } | return %atb_cis }
alias -l remextcom { var %rc_s $1 | :next4 | var %rc_s $replace(%rc_s,$+($chr(44),$chr(44)),$chr(44)) | if ($left(%rc_s,1) == $chr(44)) var %rc_s $mid(%rc_s,2) | if ($right(%rc_s,1) == $chr(44)) { var %rc_s $mid(%rc_s,1,$calc($len(%rc_s) -1)) | goto next4 } | return %rc_s }
=====================================================
Remember that if something went wrong, or you accidentally erased something, then you can always reinstall this script again. If you find any errors in the code or in its work, then be sure to write to me here about it, and we are together think about what we can do.
|
|
|
|
Joined: Mar 2021
Posts: 48
Ameglian cow
|
OP
Ameglian cow
Joined: Mar 2021
Posts: 48 |
WOW...BRAVO....IT WORK PERFECT AND VERY NICE, EXACTLY I WANT.
THANK YOU EPIC - THE RUSSIA IS THE BEST FRIEND OF VIETNAM !!!
I'M FROM VIETNAM, NICE TO MEET YOU EPIC AND THANKS SO MUCH FOR YOUR HELP!
|
|
|
|
Joined: Mar 2021
Posts: 48
Ameglian cow
|
OP
Ameglian cow
Joined: Mar 2021
Posts: 48 |
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 } }
|
|
|
|
Joined: Mar 2021
Posts: 48
Ameglian cow
|
OP
Ameglian cow
Joined: Mar 2021
Posts: 48 |
Epic, where are you now?
|
|
|
|
Joined: Mar 2021
Posts: 48
Ameglian cow
|
OP
Ameglian cow
Joined: Mar 2021
Posts: 48 |
I'm still waiting for you
|
|
|
|
Joined: Jan 2012
Posts: 329
Pan-dimensional mouse
|
Pan-dimensional mouse
Joined: Jan 2012
Posts: 329 |
I'm in a safe place ‒ I'm have not forgotten about your question and go back to updating the script a little later (in the coming days), in accordance with the way we agreed in personal (private) correspondence.
|
|
|
|
Joined: Mar 2021
Posts: 48
Ameglian cow
|
OP
Ameglian cow
Joined: Mar 2021
Posts: 48 |
|
|
|
|
|