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 }
 Might not seem like a prob at the moment.. but if u should happen to add a user before he/she part/quit the channel, they would never be deleted from the list.... without restarting the bot
 Might not seem like a prob at the moment.. but if u should happen to add a user before he/she part/quit the channel, they would never be deleted from the list.... without restarting the botCode: 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 }  I was joking with that question. In the tcl that I'm tryng to "make" is an real problem with the nick. I think the problem is: 1. The nick isn't being removed on part/kick/nick change/quit. For this I was asking sugestions. My boss found the mirc and the eggdrop on my pc at work and deleted the files and the tcl and other stuff I was having there. Now I got to get again the mirc and the windrop to test at work, or I will go to a friend and thest at him. Onest, I'm not after the 5oo, well I will not mind If I will have that much, but not doiung what you think I do. Onest now. I want to make that tcl, cos is for a friend, a she.. and I don't want to let her down. Capisci? I will do an other test ASP.. with some putlog's on the join, part, nick, kick, sign and report any errors that I may find. Thanks for your time and cooperation.
 I was joking with that question. In the tcl that I'm tryng to "make" is an real problem with the nick. I think the problem is: 1. The nick isn't being removed on part/kick/nick change/quit. For this I was asking sugestions. My boss found the mirc and the eggdrop on my pc at work and deleted the files and the tcl and other stuff I was having there. Now I got to get again the mirc and the windrop to test at work, or I will go to a friend and thest at him. Onest, I'm not after the 5oo, well I will not mind If I will have that much, but not doiung what you think I do. Onest now. I want to make that tcl, cos is for a friend, a she.. and I don't want to let her down. Capisci? I will do an other test ASP.. with some putlog's on the join, part, nick, kick, sign and report any errors that I may find. Thanks for your time and cooperation.

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 ""}} {