caesar wrote:Well.. nick joins #channel. he recives the welcome notice, like I've posted up. Then if he parts, gets kicked, changes nick (i think this 2) or quits the channel his nick remains in the next(list) and this should not happen. When an other nick joins the channel is on the second position and should be on the first one. If we help him, using the .next I think he is removed from the list. Yes.. is removed. What can I say more? Now I got to go home, I'll read tomorow what you will say. Sorry for any incovenience this may cause. Thanks for your time and support.
Code: Select all
# Channel for that this will be used?
set next(chan) "#egghead"
bind join - * next:add
bind part - * next:part
# next list
set next(list) {}
# Custromize the messages and/or notices.
set next(welcome) "Hi! Welcome to \002!chan!\002 channel. Please\
wait for your turn as we are busy right now. You will be voiced\
automaticly when we finish with the current guests."
# join & rejn
proc next:add {nick uhost handle chan} {
global botnick next
putlog "$nick has joined $chan!"
if {$nick == $botnick || $chan != $next(chan)} { return }
if {[botisop $chan] && [validuser [nick2hand $nick $chan]]} {
putserv "MODE $chan +v $nick"
return
}
lappend next(list) $nick
set num [lsearch -exact $next(list) $nick]
incr num
regsub -all {!chan!} $next(welcome) "$chan" next(welcome)
putserv "NOTICE $nick :$next(welcome) You are number \002$num\002 in line. Thank you!"
putlog "Plain list of nicks: [join $next(list)]."
}
# part
proc next:part {nick uhost hand chan {msg ""}} {
global botnick next
putlog "$nick has parted $chan!"
if {$nick == $botnick || $chan != $next(chan) || [validuser [nick2hand $nick $chan]]} { return }
set index [lsearch -exact $next(list) $nick]
set next(list) [lreplace $next(list) $index $index]
putlog "Plain list of nicks: [join $next(list)]."
}
putlog "\002.next\002.. loaded again :)"
Step 6: On the partyline the following message is visible:-Eggheadsbot- Hi! Welcome to #egghead channel. Please wait for your turn as we are busy right now. You will be voiced automaticly when we finish with the current guests. You are number 1 in line. Thank you!
Step 7: The IRC client then parted the channel #egghead.[13:34] e{g{g[h[e{a^d^ has joined #egghead!
[13:34] Plain list of nicks: e{g{g[h[e{a^d^.
Basically, what you have stated can not be reproduced so far. Again, can you state step by step what you do and what you observe (add putlog statements to observe) and what you consider an error.[13:36] e{g{g[h[e{a^d^ has parted #egghead!
[13:36] Plain list of nicks: .
Code: Select all
if {$nick == $botnick || $chan != $next(chan) || [validuser [nick2hand $nick $chan]]} { return }
Code: Select all
if {$nick == $botnick || $chan != $next(chan) || [lsearch -exact $next(list) "$nick"] == "-1"} { return }
Code: Select all
foreach voice $next(list) {
if {[validuser [nick2hand $voice $chan]] || [isop $voice $chan] || [isvoice $voice $chan] || ![onchan $voice $chan]} {
set index [lsearch -exact $next(list) $voice]
set next(list) [lreplace $next(list) $index $index]
continue }
regsub -all {!nick!} $next(next) "$nick" next(next)
regsub -all {!chan!} $next(next) "$chan" next(next)
putserv "MODE $chan +v $voice"
set index [lsearch -exact $next(list) $voice]
set next(list) [lreplace $next(list) $index $index]
putserv "NOTICE $voice :$next(next)"
break }
return }
putserv "NOTICE $nick :I ain't oped on $chan."
return }
Code: Select all
bind part - * next:del
bind sign - * next:del
# part & sign
proc next:del {nick uhost handle chan text} {
global botnick next
if {$nick == $botnick || $chan != $next(chan) || [validuser $handle]} { return }
set index [lsearch -exact $next(list) $nick]
set next(list) [lreplace $next(list) $index $index]
putlog "remove $nick"
}
Code: Select all
proc next:del {nick uhost handle chan {text ""}} {