bind pub o|o .n pub:kicker31
proc pub:kicker31 {nick host hand chan text} {
if {![botisop $chan]} {
puthelp "NOTICE $nick :I'm not oped on $chan."
return
}
set users [list]
set umasks [list]
set reason [join [lrange [split $text "."] 1 end] "."]
set text [lindex [split $text "."] 0]
if {$reason eq ""} { set reason "This nick is not allowed please choose a more proper one thank you" }
foreach user $text {
lappend umasks *$user*!*@*
if {![onchan $user $chan]} {
putserv "NOTICE $nick $user is not on channel $chan"
} else {
lappend users $user
}
}
set count [llength $umasks]
putquick "MODE $chan +[string repeat "b" $count] [join $umasks]"
putquick "KICK $chan [join $users ","] :$reason"
}
for example:
15:26:16 (simo) : .n doz edw aldr
15:26:16 -TCL-Tester- : doz is not on channel #testing
15:26:16 -TCL-Tester- : edw is not on channel #testing
15:26:16 -TCL-Tester- : aldr is not on channel #testing
15:26:16 ~TCL-Tester Sets Mode on #testing to: +bbb *doz*!*@* *edw*!*@* *aldr*!*@*
15:26:16 (3 Users) Are Banned Dozier Edward Aldrich
to kick all matching nicks but not using bind mode tho but rather searching thro nicklist for matching nicks but to make sure matching nicks arent in any access list of eggdrop and arent current opped halfopped and such in channel to protect those that need protection
Last edited by simo on Sun May 19, 2019 12:21 pm, edited 2 times in total.
so far this is what i got it loops thro channel list to see if any nick matches the wildcard but i cant seem to stop kick if no one matches the wildcard and if user is protected