This is the new home of the egghelp.org community forum. this announcement post . Click the X in the top right-corner of this box to dismiss this message. 
Old posts that have not been replied to for several years.
			
		
				
			
				
								kem 							 
						Voice 			
		Posts:  6 Joined:  Sat May 22, 2004 11:25 am 
		
						
					
													
							
						
									
						Post 
					 
								by kem  Wed May 26, 2004 9:26 am 
			
			
			
			
			
			bind pub n !random testk
			
			
									
						
										
						 
		 
				
		
		 
	 
				
		
				
			
				
								KrzychuG 							 
						Master 			
		Posts:  306 Joined:  Sat Aug 16, 2003 2:51 pmLocation:  Torun, Poland
				Contact: 
				
			 
				
		 
		
						
					
						 
													
							
						
									
						Post 
					 
								by KrzychuG  Wed May 26, 2004 1:02 pm 
			
			
			
			
			
			Code: Select all 
bind pub n !random show:randombots
proc show:randombots { nick uhost handle channel arg } {
  set limit [lindex $arg 0]
  set bots [chanlist $channel b]
  if {$limit > [expr [llength $bots] + 1]} then {
    set limit [expr [llength $bots] + 1]
  }
  set fbots ""
  set tlimit $limit
  while {$tlimit > 0} {
    set bot [lindex $bots [rand [llength $bots]]]
    if {[lsearch $fbots $bot] == -1} then {    
      lappend fbots $bot
      set tlimit [expr $tlimit - 1]
    }
  }
  if {$fbots != ""} then {
    putserv "PRIVMSG $channel :Random bots on $channel: $fbots"
  } else {
    putserv "PRIVMSG $channel :No bots on $channel"
  }
  return 0
} ;# show:randombots  
I hope it works :)