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.
			
		
				
			
				
																j 														
								joshprice  
									
						
		
						
						
		 
		
						
					
						 
													
							
						
									
						Post 
					 
								by joshprice  Tue Nov 27, 2001 4:32 pm 
			
			
			
			
			
			Can someone edit this script so that I can have just one password for everyone. Like say I want the password to be 123456 for someone to enter the channel.  So when the user joins the bot will msg the person "Please enter your password (you have 3 minutes)" Type  /msg $botnick pass <your password>" Can someone please do this for me.
Here is the script:
Code: Select all 
bind join p * check_fake
proc check_fake {nick uhost hand channel} {
  global botnick
  if {[botisop $channel] == 0} {return 1}
  putserv "privmsg $nick :razz:lease enter your password (you have 3 minutes)"
  putserv "privmsg $nick :Type  /msg $botnick voice <your password> $channel"
  set timer_id [utimer 180 "chk_tpass $nick $uhost $hand $channel"]
}
proc chk_tpass {nick uhost hand channel} {
  global banmask botnick
    if {[onchan [hand2nick $hand $channel] $channel] == 0} {return 1}
    if {[isop [hand2nick $hand $channel] $channel] == 0} {
    set lhost "*!*[string range $uhost [string first "@" $uhost] end]"
    set ftolhost "[string range $lhost 3 end]"
      if {([string match "*ppp*" $ftolhost] || [string match "*dial*" $ftolhost] || [string match "*slip*" $ftolhost])} {
        set banmask "*!*[string range $uhost [string first "@" $uhost] end]"
      } else {
          set banmask "*!*[string trimleft [maskhost $uhost] *!]"
        }
      putserv "mode $channel -o+b $nick $banmask"
      putserv "kick $channel [hand2nick $hand $channel] :^BFake OP^B !"
      newchanban $channel $banmask $botnick "^BFake OP^B !" 10
      putserv "privmsg $nick :Wrong password !"
      return 1
    }
    putserv "privmsg [hand2nick $hand $channel] :Thank you, $hand !"
    return 1
}
putlog "^BCheckFake.TCL^B v1.2 by ^BTeraByte^B loaded !"
 
		 
				
		
		 
	 
				
		
				
			
				
								ppslim 							 
						Revered One 			
		Posts:  3914 Joined:  Sun Sep 23, 2001 8:00 pmLocation:  Liverpool, England 
		
						
					
						 
													
							
						
									
						Post 
					 
								by ppslim  Tue Nov 27, 2001 11:07 pm 
			
			
			
			
			
			try the following
Code: Select all 
#set the password needed to join the channel
set joinpass "ABC123"
#How many mins till they are kicked
set joinmins 3
#channel to do this on
set joinchan "#channel"
### DOWN LOOK DOWN, IT'S BUMPY HERE
set joinhash {}
bind join - "${joinchan} %" myjoin:protect
proc myjoin:protect {nick uh hand chan} {
  global joinhash joinmins botnick
  lappend joinhash [list $nick $joinmins]
  puthelp "NOTICE $nick :You need a supply a password to stay in channel - type "/msg $botnick joinpass <password>""
}
bind sign - "${joinchan}" myjoin:remove
proc myjoin:remove {nick uh hand chan} {
  global joinhash
  if {[set idx [lsearch -glob $joinhash "$nick *"]] >= 0} {
    set joinhash [lreplace $joinhash $idx $idx]
  }
}
bind nick - "${joinchan} %" myjoin:change
proc myjoin:change {nick uh hand chan nn} {
  global joinhash
  if {[set idx [lsearch -glob $joinhash "$nick *"]] >= 0} {
    set joinhash [lreplace $joinhash $idx $idx [list $nn [lindex [lindex $joinhash $idx] 1]]]
  }
}
bind time - "*" myjoin:timer
proc myjoin:timer {min hour day month year} {
  global joinhash joinchan
  set temp {}
  foreach _A $joinhash {
    set nick [lindex $_A 0]
    set m [expr [lindex $_A 1] - 1]
    if {$m == 0} {
      puthelp "NOTICE $nick :You did not supply the password on time"
      putserv "MODE $joinchan -o+b $nick [maskhost [getchanhost $nick $joinchan]]"
    } else {
      lappend temp [list $nick $m]
    }
  }
  set joinhash $temp
}
bind msg - "joinpass" myjoin:password
proc myjoin:password {nick uh hand chan arg} {
  global joinhash joinpass
  if {[string match [lindex [split $arg] 0] $joinpass]} {
    if {[set idx [lsearch -glob $joinhash "$nick *"]] >= 0} {
      puthelp "NOTICE $nick :Correct password entered"
      set joinhash [lreplace $joinhash $idx $idx]
    }
  }
}
 
		 
				
		
		 
	 
				
		
				
			
				
																j 														
								joshprice  
									
						
		
						
						
		 
		
						
					
						 
													
							
						
									
						Post 
					 
								by joshprice  Wed Nov 28, 2001 6:49 pm 
			
			
			
			
			
			Well that works just fine except if you enter the right pass it does this in the bot:
			
			
									
						
										
						 
		 
				
		
		 
	 
				
		
				
			
				
								Wcc 							 
						Master 			
		Posts:  278 Joined:  Sun Oct 28, 2001 8:00 pmLocation:  USA
				Contact: 
				
			 
				
		 
		
						
					
						 
													
							
						
									
						Post 
					 
								by Wcc  Wed Nov 28, 2001 7:42 pm 
			
			
			
			
			
			Find this line:
Code: Select all 
proc myjoin:password {nick uh hand chan arg} {
and make it
Code: Select all 
proc myjoin:password {nick uh hand arg} {