Hello, Here I am again.
The recent changes to the script you created in my previous topic, "auto reply query", made me think of two previous scripts you created (that of "allowed characters" and that of "bad words", I don't know if you remember them but I'll post them here now anyway then) and a possible addition of code for both.
The scripts are perfect and finished, it's just a matter of adding a timer that activates them to the connection after 10 seconds (this was the last change to the "auto query reply" script that I thought might be needed to add on these two scripts).
Here is the bad words script:
menu channel { Bad Words (Script) $chr(58) %bw_work .On/Off $chr(58) %bw_works $+ :{ if (%bw_work == OFF) { %bw_work = ON | %bw_works = Active | .echo -a "Bad Words" - Active:03 ON } else { %bw_work = OFF | %bw_works = Deactivated | .echo -a "Bad Words" - Deactivated:04 OFF } } .Exception $chr(58) $numtok(%bw_exceptnick,44) ..List: .echo -a "Bad Words" - Exception nicks:03 %bw_exceptnick ..- ..Add:{ var %addn $$?="Enter all nicknames to be excluded separated by a comma:" if ($len(%addn) > 0) { $bwextlist(%addn,add) | .echo -a "Bad Words" - Add except nicks:03 %addn } } ..Del:{ var %deln $$?="Enter all comma-separated nicknames you want to remove from the exception list:" if ($len(%deln) > 0) { $bwextlist(%deln,del) | .echo -a "Bad Words" - Del except nicks:04 %deln } } } alias bwextlist { var %i 1 | while (%i <= $numtok($1,44)) { var %w $gettok($1,%i,44) if ($2 == add && !$istok(%bw_exceptnick,%w,44)) { %bw_exceptnick = $+(%bw_exceptnick,$chr(44),%w) } if ($2 == del && $istok(%bw_exceptnick,%w,44)) { %bw_exceptnick = $remove(%bw_exceptnick,%w) } %bw_exceptnick = $replace(%bw_exceptnick,$+($chr(44),$chr(44)),$chr(44),$chr(32),$chr(44)) if ($mid(%bw_exceptnick,1,1) == $chr(44)) %bw_exceptnick = $mid(%bw_exceptnick,2,10000) inc %i } | return } alias bwextcheck { if ($istok(%bw_exceptnick,$1,44)) return $true } ------------------------ on @*:TEXT:*try1*:#try1: if (%bw_work == ON && !$bwextcheck($nick)) { .ban $chan $nick 2 | .ban $chan $nick 3 | echo -st 04 Line $scriptline Nick: $nick was banned in the channel $chan for saying: " $1- " } ON *:EXIT: { %bw_work = OFF | %bw_works = Deactivated }
Mentre questo è lo script "Allow Chars":
alias -l allowchars_set { if (!%ach_work) %ach_work = yes if (!%ach_kick) %ach_kick = no if (!%ach_ban) %ach_ban = yes if (!%ach_reason) %ach_reason = if (!%ach_btype) %ach_btype = 2,3 if (!%ach_btime) %ach_btime = 0 if (!%ach_exceptpref) %ach_exceptpref = [+%@&~!] if (!%ach_exceptnick) %ach_exceptnick = MyNick if (!%ach_charfile) %ach_charfile = path\allowchars.txt } menu channel { 1,1Separator:/ Allow Chars .On/Off ..$iif(%ach_work == yes,$style(1)) Active: %ach_work = yes | .echo -a Script allow chars:03 active. ..$iif(%ach_work == no,$style(1)) Deactivated: %ach_work = no | .echo -a Script allow chars:04 deactivated. .Characters ..File $+([,$nopath(%ach_charfile),]): allowchars_set | if ($exists(%ach_charfile)) .run %ach_charfile ..Path $+([..\,$nopath(%ach_charfile),]): var %p $$?="Enter the full path to the files with allowed characters:" | if ($len(%p) > 0) { %ach_charfile = %p | .echo -a Path file:03 %ach_charfile } .Kick ..$iif(%ach_kick == yes,$style(1)) Active: %ach_kick = yes | .echo -a Kick:03 active. ..$iif(%ach_kick == no,$style(1)) Deactivated: %ach_kick = no | .echo -a Kick:04 deactivated. ..- ..Kick reason: var %r $$?="Insert kick reason:" | if ($len(%r) > 0) { %ach_reason = %r | .echo -a Kick reason:03 %ach_reason } .Ban ..$iif(%ach_ban == yes,$style(1)) Active: %ach_ban = yes | .echo -a Ban:03 active. ..$iif(%ach_ban == no,$style(1)) Deactivated: %ach_ban = no | .echo -a Ban:04 deactivated. ..- ..Ban types $+([,%ach_btype,]): var %t $$?="Enter one or more comma separated types of bans:" | if ($len(%t) > 0) { %ach_btype = %t | .echo -a Ban types:03 %ach_btype } ..Duration Ban $+([,%ach_btime,]) sec: var %t $$?="Enter the number in seconds of the ban duration:" | if ($len(%t) > 0) { %ach_btime = %t | .echo -a Duration Ban:03 %ach_btime } .Exceptions ..Grade prefixes %ach_exceptpref: var %p $$?="Enter the prefix of the degrees to exclude:" | if ($len(%p) > 0) { %ach_exceptpref = $+([,$remove(%p,]),]) | .echo -a Prefix exceptions:03 %ach_exceptpref } ..Nick to be excluded $+([,$numtok(%ach_exceptnick,44),]): var %n $$?="Enter the nicknames to be excluded separated by a comma:" | if ($len(%n) > 0) { %ach_exceptnick = %n | .echo -a Nick exceptions:03 %ach_exceptnick } } on @*:TEXT:*:#hot: allowchars $nick $chan $1- on @*:ACTION:*:#hot: allowchars $nick $chan $1- alias -l allowchars { allowchars_set | if (%ach_work == yes) { var %ach_pnick $remove($nick($2,$1).pnick,$1) if (%ach_pnick isin %ach_exceptpref) || ($istok(%ach_exceptnick,$1,44)) { halt } if ($exists(%ach_charfile)) { var %text $remove($3-,$chr(32),$chr(160),$chr(8194),$chr(8195),$chr(8196),$chr(8197),$chr(8198),$chr(8199),$chr(8201),$chr(8202),$chr(8203),$chr(8239),$chr(8287),$chr(12288),$chr(65279)) var %c 1 | while (%c <= $lines(%ach_charfile)) { %chars = $+(%chars,$read(%ach_charfile,n,%c)) | inc %c } var %pattern $+(/[^,$replacecs(%chars,\,\\,[,\[,],\],-,\-,^,\^),]/iuS) | unset %chars if ($regex(%text,%pattern) > 0) { allowchars_ban $1 $2 | .echo -st 07 Characters Not Allowed Nick $1 was banned in the channel $2 for saying: $+(",$3-,") } } } } alias -l allowchars_ban { if (%ach_ban == yes) { if (!%ach_btype) %ach_btype = 2,3 | if (%ach_btime > 0) var %ach_key $+(-u,%ach_btime) var %i 1 | while (%i <= $numtok(%ach_btype,44)) { .ban %ach_key $2 $1 $gettok(%ach_btype,%i,44) | inc %i } } if (%ach_kick == yes) { if ($len(%ach_reason) > 1) var %ach_kr %ach_reason | else var %ach_kr - | .kick $2 $1 %ach_kr } } ON *:EXIT: { %ach_work = no }
As I said, you worked a lot on it and they were both finished and tested, so you really don't need to add anything other than this piece of code to activate the connection with the timer after 10 seconds (I tried to create it but it didn't go well... ), if possible, thank you very much