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. 
	 
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
			
		
				
			
				
								CoMMy 							 
						Halfop 			
		Posts:  99  		Joined:  Thu Jul 24, 2003 1:03 am 		
		
											Location:  Cyprus 
							
						
		 
		
						
					
													
							
						
									
						Post 
					 
								by CoMMy   »  Sat Sep 02, 2006 9:05 am 
			
			
			
			
			
			Hi guys, 
 
I want to create a script that will save the channel key when its currently in the channel that has it so that it will be able to rejoin the channel incase of a ping timeout or a disconnect of some sort. 
 
Any ideas how to do this or if there is a ready script? 
 
Thanks
			
			
									
						
							(c) CoMMy (c) 
Resistance is Futile!! 
We Are The Borg!!
			
						 
		 
				
		
		 
	 
				
		
				
			
				
								krimson 							 
						Halfop 			
		Posts:  86  		Joined:  Wed Apr 19, 2006 8:12 am 		
		
						
						
		 
		
						
					
						 
		 
													
							
						
									
						Post 
					 
								by krimson   »  Sat Sep 02, 2006 11:24 am 
			
			
			
			
			
			
			
			
									
						
										
						 
		 
				
		
		 
	 
				
		
				
			
				
								nml375 							 
						Revered One 			
		Posts:  2860  		Joined:  Fri Aug 04, 2006 2:09 pm 		
		
						
						
		 
		
						
					
						 
		 
													
							
						
									
						Post 
					 
								by nml375   »  Sat Sep 02, 2006 12:45 pm 
			
			
			
			
			
			Untested code, but should do the trick...
Code: Select all 
bind mode - * update_key
bind raw - 324 get_key
bind need - "% key" use_key
proc update_key {bind nick host hand chan what text} {
 global chankey
 if {$what == "+k"} {
  set chankey([string tolower $chan]) $text
 }
}
proc get_key {from what text} {
 global chankey
 set params [split text]
 if {[string match "+*k*" [lindex $params 2]]} {
  set chankey([string tolower [lindex $params 1]]) [lindex $params end]
 }
 return 0
}
proc use_key {chan type} {
 global chankey
 if {[info exists chankey([string tolower $chan])]} {
  putserv "JOIN $chan $chankey([string tolower $chan])"
 }
} 
			
			
									
						
							NML_375