Code: Select all
set plist {}
set blist {bot b0t serv sevr}
set reason "bot/serv imposter"
bind pub m !protect foo
proc foo {n u h c t} {lappend ::plist [string tolower $t]}
bind join - * bar
proc bar {n u h c} {
set n [string tolower $n]
foreach b $::blist {
if {[string match *${b}* $n] && ([lsearch -exact $::plist $n] == -1)} {
newchanban $c [maskhost $n!$u] $::botnet-nick $::reason
putkick $c $n $::reason
}
}
}
Code: Select all
tag) I can't understand what your problem is
Code: Select all
if {[string match *${b}* $n] && ([lsearch -exact $::plist $n] == -1)} {
Code: Select all
if {[string match -nocase *${b}* $n] && ([lsearch -exact $::plist $n] == -1)} {
how do you lsearch through patterns, matching not a pattern against list elements but an element against patterns?awyeah wrote:And also for using lsearch matching, put both of the variables to match in similar strings before using -exact; either both in lower strings or upper strings. (generally a good idea)
Code: Select all
tag) I can't understand what your problem is[/quote] want to make a tcl that would give access to channel list (/cs access #channel list) and ban (reason: Is Not Protected. False Bot) those nicks that include the word the words bot/b0t/serv/serv {(bot|b0t|serv|sevr)} $nick]} and are not include in the list of the channelthe tcl might be made in a way that I would add them with publi command! ( !protect EggBot !ptrotect SpEEd|SEVR !protect dArkB0t ................)
Code: Select all
tag) I can't understand what your problem is[/quote] want to make a tcl that would give access to channel list (/cs access #channel list) and ban (reason: Is Not Protected. False Bot) those nicks that include the word the words bot/b0t/serv/serv {(bot|b0t|serv|sevr)} $nick]} and are not include in the list of the channelthe tcl might be made in a way that I would add them with publi command! ( !protect EggBot !ptrotect SpEEd|SEVR !protect dArkB0t ................)[/quote]
access to channel list? access that grants the right of use of /cs access #channel list? this has nothing to do with your initial request, or you are simply unable to explain what you need (assuming that you know it yourself, which I very much doubt, I think you are totally confused)
what I wrote for you (with Papillon's fix) bans anyone with bot/serv in their nick, if they aren't on the protected list - and you can add nicks to that list with !protect public command - if this doesn't suit you, feel free to help yourself as you wish
instead of whining "it doesn't work it doesn't work" you could have said that it complains with a Tcl error on $::botnet-nick; change it to ${::botnet-nick} and it's gonna be okays0ulw4r wrote:this tcl that you gave to me doesn't work,I need a list where I can put the nicks that have the words <<bot, b0t,serv and sevr>> no flags only nicks.Any nick that has the words <<bot, b0t,serv and sevr>> will try to come into the channel and it is not in the protect list will automatically be banned.The one way is to put in the tcl the nicks,the other way is the bot by itself automatically when it comes in the channel to seek the access list of the channel <<greek network:/msg chanserv access list>> and at dalnet is <<:/msg chanserv sop list>>.and the third way is to make it by a command public or /msg.
Thank you for your patience