When I do .tempban <nick> it works and will not ban ops/op'd bots.
When I do .tempban <ident@host> or any part, it bans Ops which I don't want it to do.
I can see it needs to check the victim mask against flags but I don't know how to do it.
I have read almost every related post on this site. I've also looked at some 10-20 other scripts for clues, tried this and that and every time I change something, I get that there is no value for a variable, or no variable, no command or whatever. Seached most if not all of the other eggdrop/tcl sites and I am just plain stuck. I don't know enough.
The other thing is that I would prefer it bans *!*ident@*.host something like that.
The bot is 1.6.4 on Dalnet. Any and all help would be appreciated so much, I couldn' tell you in words. I am exhausted after 4 days of trying to make this work.set tempbantime 10
bind dcc V|V tempban temp_ban
### .TEMPBAN <nick|mask> [reason]
proc temp_ban { handle idx victim } {
global tempbantime
set channel [lindex [console $idx] 0]
set victim "$victim "
if {[matchattr [strlwr $victim] o|o $channel]} {
putdcc $idx "\002You cannot ban Ops or Bots!\002"
return 0
}
set mask "[string range $victim 0 [expr [string first " " $victim] -1]]"
set reason "[string trimleft $victim $mask]"
if { $mask == "" } {
putdcc $idx ".tempban - bans a users <nick|mask> for $tempbantime minutes"
putdcc $idx "How to use it: .tempban <nick|mask> <reason> <time>"
return 0
}
newban $mask "$reason" $tempbantime
}