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.
			
		
				
			
				
								CoMMy 							 
						Halfop 			
		Posts:  99  		Joined:  Thu Jul 24, 2003 1:03 am 		
		
											Location:  Cyprus 
							
						
		 
		
						
					
													
							
						
									
						Post 
					 
								by CoMMy   »  Thu Aug 26, 2004 12:32 pm 
			
			
			
			
			
			Hi,
I am making an auto-response tcl and i need your help as i am at a loss.
This is what i have so far.
#Bind The Procedure.
bind pubm - "*" check_word
Code: Select all 
set respond_words {
"lol:laughs out loud"
"brb:Be Right Back"
}
proc check_word {nick host handle chan text } {
global respond_words
foreach word $respond_words {
if {[string match -nocase "$text" "$word"]} {
set words_response [lrange [split $word :] 1 end]
send_response $nick $chan $words_response }}
return 0 }
#Send Response Proc
proc send_response {nick chan response} {
putquick "PRIVMSG $chan :$response" -next
return 0 }
I cant seem to make it respond to the words lol and brb only.
I need to make it respond to (for ex.) lol and say laughs out loud.
Can you help me do this.
Thanks
 
			
			
									
						
							(c) CoMMy (c) 
Resistance is Futile!! 
We Are The Borg!!
			
						 
		 
				
		
		 
	 
				
		
				
			
				
								YooHoo 							 
						Owner 			
		Posts:  939  		Joined:  Thu Feb 13, 2003 10:07 pm 		
		
											Location:  Redwood Coast 
							
						
		 
		
						
					
													
							
						
									
						Post 
					 
								by YooHoo   »  Thu Aug 26, 2004 2:15 pm 
			
			
			
			
			
			seems like that's doin things the complicated way...why not just make two sets of variables, and do away with spliting $respond_words on the colon?  There is a pretty good "auto responder" tcl available on 
Nerfbendr's  website that might help  
 
			
			
									
						
										
						 
		 
				
		
		 
	 
				
				
		
				
			
				
								awyeah 							 
						Revered One 			
		Posts:  1580  		Joined:  Mon Apr 26, 2004 2:37 am 		
		
											Location:  Switzerland 
												
							
				Contact: 
				
			 
				
		 
		
						
					
						 
		 
													
							
						
									
						Post 
					 
								by awyeah   »  Thu Aug 26, 2004 9:10 pm 
			
			
			
			
			
			Judging by which, if I think I am correct in what you are trying todo. Here this should do your job no doubt:
Code: Select all 
set respond_words { 
"lol:Laughs Out Loud" 
"brb:Be Right Back" 
} 
proc check_word {nick uhost hand chan text} { 
 global respond_words
  foreach respond_word $respond_words {
   set acronym [lrange [split $respond_word ":"] 0 end]
   set acronym_definition [lrange [split $respond_word ":"] 1 end]
    if {([string match -nocase *$acronym* $text])} { 
     set response $acronym_definition
     send_response $nick $chan $response 
     }
   } 
 return 0
} 
proc send_response {nick chan response} { 
 putquick "PRIVMSG $chan :$response" -next 
 return 0
}
 
			
			
									
						
							·awyeah·  
 
================================== 
Facebook: jawad@idsia.ch   (Jay Dee) 
PS: Guys, I don't accept script helps or requests personally anymore.  
==================================