This is the new home of the egghelp.org community forum. 
All data has been migrated (including user logins/passwords) to a new phpBB version.  
 
For more information, see 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.
			
		
				
			
				
								egghead 							 
						Master 			
		Posts:  481  		Joined:  Mon Oct 29, 2001 8:00 pm 		
		
											
							
				Contact: 
				
			 
				
		 
		
						
					
						 
		 
													
							
						
									
						Post 
					 
								by egghead   »  Thu Feb 20, 2003 2:03 pm 
			
			
			
			
			
			caesar wrote: So, finaly it should look like:
Code: Select all 
proc pub:kick {nick host hand chan text} { 
  global botnick
  if {![llength $text] > 0 || ![botisop $chan]} { return }
  set whom [string tolower [lindex $text 0]]
  set chan [string tolower $chan]
  if {$whom == $botnick || [matchattr $whom f|f] || ![onchan $whom $chan]} { return }
  set reason [lrange $text 1 end] 
  putserv "KICK $chan $whom :$reason" 
  putlog "#$hand# has kicked $whom from $chan" 
}
Sorry to say, but it certainly should not look like that.
 
			
			
									
						
										
						 
		 
				
		
		 
	 
				
		
				
			
				
								caesar 							 
						Mint Rubber 			
		Posts:  3778  		Joined:  Sun Oct 14, 2001 8:00 pm 		
		
											Location:  Mint Factory 
							
						
		 
		
						
					
						 
		 
													
							
						
									
						Post 
					 
								by caesar   »  Thu Feb 20, 2003 2:10 pm 
			
			
			
			
			
			What you mean? If you are talking about the fact that I haven't added a bind to it, yah, she haven't added it in the first place.
			
			
									
						
							Once the game is over, the king and the pawn go back in the same box.
			
						 
		 
				
		
		 
	 
				
		
				
			
				
								Papillon 							 
						Owner 			
		Posts:  724  		Joined:  Fri Feb 15, 2002 8:00 pm 		
		
											Location:  *.no 
							
						
		 
		
						
					
						 
		 
													
							
						
									
						Post 
					 
								by Papillon   »  Thu Feb 20, 2003 2:20 pm 
			
			
			
			
			
			1. you should split the $text before using list-commands on it 
2. you are making $whom to lowercase ...but you forgot to make $botnick lowercase.... 
3. [matchattr $whom f|f]  should be [matchattr $whom f|f $chan] 
			
			
									
						
							Elen sila lúmenn' omentielvo
			
						 
		 
				
		
		 
	 
				
		
				
			
				
								De Kus 							 
						Revered One 			
		Posts:  1361  		Joined:  Sun Dec 15, 2002 11:41 am 		
		
											Location:  Germany 
							
						
		 
		
						
					
						 
		 
													
							
						
									
						Post 
					 
								by De Kus   »  Thu Feb 20, 2003 2:20 pm 
			
			
			
			
			
			cut set chan [string tolower $chan] out, i say it can cause more problems, then it should solve. and [matchattr $whom f|f] is meant to be [matchattr [nick2hand $whom] f|f $chan] 
.
PS: Papillon you were a few seconds faster, but your 3rd is still wrong 
.
 
			
			
									
						
										
						 
		 
				
		
		 
	 
				
		
				
			
				
								egghead 							 
						Master 			
		Posts:  481  		Joined:  Mon Oct 29, 2001 8:00 pm 		
		
											
							
				Contact: 
				
			 
				
		 
		
						
					
						 
		 
													
							
						
									
						Post 
					 
								by egghead   »  Thu Feb 20, 2003 2:25 pm 
			
			
			
			
			
			Hurray!!! 
(posting nr. 200 
 )
 
			
			
									
						
										
						 
		 
				
		
		 
	 
				
		
				
			
				
								caesar 							 
						Mint Rubber 			
		Posts:  3778  		Joined:  Sun Oct 14, 2001 8:00 pm 		
		
											Location:  Mint Factory 
							
						
		 
		
						
					
						 
		 
													
							
						
									
						Post 
					 
								by caesar   »  Thu Feb 20, 2003 2:41 pm 
			
			
			
			
			
			Guess I have rushed a bit..
			
			
									
						
							Once the game is over, the king and the pawn go back in the same box.
			
						 
		 
				
		
		 
	 
				
		
				
			
				
								caesar 							 
						Mint Rubber 			
		Posts:  3778  		Joined:  Sun Oct 14, 2001 8:00 pm 		
		
											Location:  Mint Factory 
							
						
		 
		
						
					
						 
		 
													
							
						
									
						Post 
					 
								by caesar   »  Thu Feb 20, 2003 2:47 pm 
			
			
			
			
			
			Code: Select all 
proc pub:kick {nick host hand chan text} { 
  global botnick 
  set text [split $text] 
  if {![llength $text] > 0 || ![botisop $chan]} { return } 
  set whom [string tolower [lindex $text 0]] 
  if {$whom == [string tolower $botnick] || [matchattr [nick2hand $whom $chan] f|f $chan] || ![onchan $whom $chan]} { return } 
  set reason [lrange $text 1 end] 
  putserv "KICK $chan $whom :$reason" 
  putlog "#$hand# has kicked $whom from $chan" 
}
Also, a quote from tcl-commands.doc: 
matchattr <handle> <flags> [channel] ..
There.. happy now? Btw, congrats egghead for the 2oo'st post :]
 
			
			
													
					Last edited by 
caesar  on Thu Feb 20, 2003 3:20 pm, edited 1 time in total.
									
 
			
						
							Once the game is over, the king and the pawn go back in the same box.
			
						 
		 
				
		
		 
	 
				
		
				
			
				
								De Kus 							 
						Revered One 			
		Posts:  1361  		Joined:  Sun Dec 15, 2002 11:41 am 		
		
											Location:  Germany 
							
						
		 
		
						
					
													
							
						
									
						Post 
					 
								by De Kus   »  Thu Feb 20, 2003 3:17 pm 
			
			
			
			
			
			still not perfect, a typo in line 6 by tlower which should be tolower 
.
and just edit your post 
.
Edit: now i dont see any errors any more 
.
 
			
			
									
						
										
						 
		 
				
		
		 
	 
				
		
				
			
				
								Insectora 							 
						Voice 			
		Posts:  16  		Joined:  Thu Feb 20, 2003 2:51 am 		
		
											Location:  Germany 
							
						
		 
		
						
					
													
							
						
									
						Post 
					 
								by Insectora   »  Fri Feb 21, 2003 4:50 am 
			
			
			
			
			
			One big Thank you from me 
)!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
			
			
									
						
							Stealth
			
						 
		 
				
		
		 
	 
				
		
				
			
				
								caesar 							 
						Mint Rubber 			
		Posts:  3778  		Joined:  Sun Oct 14, 2001 8:00 pm 		
		
											Location:  Mint Factory 
							
						
		 
		
						
					
						 
		 
													
							
						
									
						Post 
					 
								by caesar   »  Fri Feb 21, 2003 5:37 am 
			
			
			
			
			
			Your welcome.
Also, I've noticed that you haven't said nothing about the 
matchattr  after my last post. Cat eat your tangue? 
 
			
			
									
						
							Once the game is over, the king and the pawn go back in the same box.