global alpha caps
set caps abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
set alpha ABCDEFGHIJKLMNOPQRSTUVWXYZ
bind nick - * nick_voice
bind mode - "#channel -o" mode_voice
bind rejn - * rejn_voice
proc nick_voice {nick hand host chan new} {
global alpha caps
set nfirst [string index $new 0]
set nsecond [string index $new 1]
if { [string first $nfirst $alpha] == -1 } {
set nfirst $nsecond
}
if { [string first $nfirst $caps] >= 0 } {
pushmode $chan +v $new
}
}
proc mode_voice {nick hand host chan mode victim} {
global alpha caps
set nfirst [string index $victim 0]
set nsecond [string index $victim 1]
if { [string first $nfirst $alpha] == -1 } {
set nfirst $nsecond
}
if { [string first $nfirst $caps] >= 0 } {
pushmode $chan +v $victim
}
}
proc rejn_voice {nick hand host chan} {
global alpha caps
set nfirst [string index $nick 0]
set nsecond [string index $nick 1]
if { [string first $nfirst $alpha] == -1 } {
set nfirst $nsecond
}
if { [string first $nfirst $caps] >= 0 } {
pushmode $chan +v $nick
}
}
I want the bot to voice lowercased nicks when they enter channel, whether they get opped or not, and whether it's their first time in channel or they've rejoined from a split.
Shouldn't 'return' be 'continue' by any chance? And the 'pushmode $c +v $n' shouldn't be placed in the foreach loop after 'if [string is upper $ch] return' (wich should be 'continue' not 'return')?
Once the game is over, the king and the pawn go back in the same box.