Code: Select all
bind mode - * modedeop
proc modedeop {nick host hand chan mode who} {
global botnick botname
if { $mode == "-o" && $who == $botnick && [strlwr $botnick] != [strlwr $nick] } {
putbot "Precieuse" "msgbot $nick ($host) m'a déopé sur $chan"
} elseif { $mode == "+b" && [string match [string tolower "$botnick![getchanhost $botnick]"] [string tolower $who]] } {
putbot "Precieuse" "msgbot $nick ($host) m'a banni sur $chan"
}
}
bind kick - "* $botnick" kickmsg
proc kickmsg {nick host hand chan knick reason } {
putbot "Precieuse" "msgbot $nick ($host) m'a kické sur $chan (raison invoquée : $reason)"
}
Code: Select all
} elseif { $mode == "+b" && [string match "$botnick![getchanhost $botnick]" $who] } {
Code: Select all
} elseif { $mode == "+b" && [string match "$who" "$botname"]} {
Code: Select all
[string match [string tolower "$botnick![getchanhost $botnick]"] [string tolower $who]]
if i want to make a equal check i would simply use $who == "$botnick![getchanhost $botnick]" .ppslim wrote:Why use a matching function, when theres no wildcards. "string equal" is more suited gfor this.