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.

Combining 2 scripts

Old posts that have not been replied to for several years.
Locked
Z
ZaKiR
Voice
Posts: 35
Joined: Wed Jun 16, 2004 10:05 pm

Combining 2 scripts

Post by ZaKiR »

How Can i combine these two codes into one code.. so that both will work properly

Code: Select all

bind evnt - init-server oper:connect 

proc oper:connect {type} { 
putserv "oper EGGDROP cafebotrulez" 
} 

Code: Select all

#set the bots nickname here
set nick "\[WaTcH\]-\[DoG\]"

# set channels which it has AOP on you can list as many channels as you want, for example it # will look like so    set channels "#channel1 channel2 channel3" etc leave it empty
# if you dont have any channels the bot is a registered aop or sop on
set chanels "#BanGLaDesH"

#set the ident password here
set pass "cafebotrulez"

#[0/1] set recieve message from bot when it successfully identifies. set to 0 to prevent the # message or 1 to receive message
set succ_id 1

# set your handle here, this is the nickname that the bot knows you buy which is most likely # the same nick as you use on irc there's no need to set it if you haven't enabled recieve  # messages
set own "ZaKiR"

# set the amount of time in minutes of how often you want to check to see when nickserv is  # online. Default is 1 so it will check every 1 minute to see if nickserv is online   
# (minutes)
set tim 3



###############################Main Code#####################################
####### DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU'RE DOING #######




if {(![info exists numversion]) || ($numversion < 1060000) } {
    putlog "Error - Can't load Ident.tcl -- At least Eggdrop v1.6.x required."
    return 0
}

#init-server procedure

proc ident:pr {paras} {
putserv "ISON Nickserv"
}

#raw ison procedure

  proc ison:pr {n h paras} {
  global botnick nick pass tim
    if {[string tolower $paras] == ""} {
     timer $tim ident:pr
   } else {
     if {[isbotnick $nick]} {
     putserv "identify $pass"
       } else {
     putserv "NICKSERV GHOST $nick $pass"
      }
   }
}
#DCC Ident procedure

    proc dc:ident {hand idx para} {
     global nick botnick pass
     putcmdlog "#$hand# ident"
       if {[isbotnick $nick]} {
        putserv "IDENTIFY $pass"
     } else {
      putserv "NICKSERV GHOST $nick $pass"
   }
}
 #Success Ident Procedure  
         
       proc id:suc {n uh h txt paras} {
       global nick own succ_id chanels savechannels botnick
          if {[string match [string tolower $n] [string tolower nickserv]]} {
             set dakill [killignore *!*@dal.net]
             set ch [channels]
             if {$chanels != ""} {
             foreach a $chanels {
                    foreach b $ch {
                if {[string tolower $a] == [string tolower $b]} {
                   channel set $a need-op "putserv \"CHANSERV :OP $a $botnick\""
                   channel set $a need-unban "putserv \"CHANSERV :UNBAN $a $botnick\""
              }
             }
            }
        } else {
          return 0
     }
                 
        if {$succ_id == "1"} {
        set han [hand2nick $own]
        puthelp "NOTICE $han :Successfully Identified to nickserv"
           } else {
       return 0
      }
    }
}
               
#Nick Change Procedure

proc ni:pr {n uh h ch ni} {
global nick botnick own pass
if {[string match [string tolower $ni] [string tolower $nick]]} {
putserv "identify $pass"
     }
  }
     




bind need - unban need:unban
bind evnt - init-server ident:pr
bind notc - "*Password accepted for*" id:suc
bind DCC m ident dc:ident
bind raw - 303 ison:pr
bind nick - * ni:pr
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Try this, it should work.

Code: Select all

#Set the bots nickname here 
set nick "\[WaTcH\]-\[DoG\]" 

#Set the channels which it has AOP on you can list as many channels as you want, for example it # will look like set channels "#channel1 channel2 channel3" etc
set chanels "#BanGLaDesH" 

#Set the ident password here 
set pass "cafebotrulez" 

#Set recieve message from bot when it successfully identifies. Set to 0 to prevent the # message or 1 to receive message 
set succ_id 1 

#Set your handle here, this is the nickname that the bot knows you buy which is most likely # the same nick as you use on irc there's no need to set it if you haven't enabled recieve  # messages 
set own "ZaKiR" 

#Set the amount of time in minutes of how often you want to check to see when nickserv is  # online. Default is 1 so it will check every 1 minute to see if nickserv is online
set tim 3 



###############################Main Code##################################### 
####### DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU'RE DOING ####### 


if {(![info exists numversion]) || ($numversion < 1060000) } { 
    putlog "Error - Can't load Ident.tcl -- At least Eggdrop v1.6.x required." 
    return 0 
} 

bind need - unban need:unban 
bind evnt - init-server ident:pr 
bind notc - "*Password accepted for*" id:suc 
bind DCC m ident dc:ident 
bind raw - 303 ison:pr 
bind nick - * ni:pr  

proc ident:pr {paras} { 
 global botnick pass
  putquick "oper EGGDROP $pass" -next
  putserv "ISON Nickserv" 
} 

proc ison:pr {n h paras} { 
  global botnick nick pass tim 
    if {[string tolower $paras] == ""} { 
     timer $tim ident:pr 
   } else { 
     if {[isbotnick $nick]} { 
     putserv "identify $pass" 
       } else { 
     putserv "NICKSERV GHOST $nick $pass" 
      } 
   } 
} 
 
proc dc:ident {hand idx para} { 
   global nick botnick pass 
     putcmdlog "#$hand# ident" 
       if {[isbotnick $nick]} { 
        putserv "IDENTIFY $pass" 
     } else { 
      putserv "NICKSERV GHOST $nick $pass" 
   } 
} 
   
proc id:suc {n uh h txt paras} { 
    global nick own succ_id chanels savechannels botnick 
          if {[string match [string tolower $n] [string tolower nickserv]]} { 
             set dakill [killignore *!*@dal.net] 
             set ch [channels] 
             if {$chanels != ""} { 
             foreach a $chanels { 
                    foreach b $ch { 
                if {[string tolower $a] == [string tolower $b]} { 
                   channel set $a need-op "putserv \"CHANSERV :OP $a $botnick\"" 
                   channel set $a need-unban "putserv \"CHANSERV :UNBAN $a $botnick\"" 
              } 
             } 
            } 
        } else { 
          return 0 
     }                  
        if {$succ_id == "1"} { 
        set han [hand2nick $own] 
        puthelp "NOTICE $han :Successfully Identified to nickserv" 
           } else { 
       return 0 
      } 
   } 
} 
                
proc ni:pr {n uh h ch ni} { 
 global nick botnick own pass 
  if {[string match [string tolower $ni] [string tolower $nick]]} { 
    putserv "identify $pass" 
     } 
}
Last edited by awyeah on Wed Jun 23, 2004 2:44 am, edited 4 times in total.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

*Edited* :P
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Z
ZaKiR
Voice
Posts: 35
Joined: Wed Jun 16, 2004 10:05 pm

Post by ZaKiR »

Code: Select all

#Set the bots oper login here 
set onick "EGGDROP"

#Set the bots oper password here  
set opass "cafebotrulez"

#Set the bots nickname here 
set nick "\[WaTcH\]-\[DoG\]" 

#Set the channels which it has AOP on you can list as many channels as you want, for example it # will look like set channels "#channel1 channel2 channel3" etc 
set chanels "#BanGLaDesH" 

#Set the nickserv identify password here 
set pass "cafebotrulez" 

#Set recieve message from bot when it successfully identifies. Set to 0 to prevent the # message or 1 to receive message 
set succ_id 1 

#Set your handle here, this is the nickname that the bot knows you buy which is most likely # the same nick as you use on irc there's no need to set it if you haven't enabled recieve # messages 
set own "ZaKiR" 

#Set the amount of time in minutes of how often you want to check to see when nickserv is # online. Default is 1 so it will check every 1 minute to see if nickserv is online 
set tim 3 



###############################Main Code##################################### 
####### DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU'RE DOING ####### 


if {(![info exists numversion]) || ($numversion < 1060000) } { 
putlog "Error - Can't load Ident.tcl -- At least Eggdrop v1.6.x required." 
return 0 
} 

bind need - unban need:unban 
bind evnt - init-server ident:pr 
bind notc - "*Password accepted for*" id:suc 
bind DCC m ident dc:ident 
bind raw - 303 ison:pr 
bind nick - * ni:pr 

proc ident:pr {paras} { 
global botnick pass 
putquick "oper $onick $opass" -next 
putserv "ISON Nickserv" 
} 

proc ison:pr {n h paras} { 
global botnick nick pass tim 
if {[string tolower $paras] == ""} { 
timer $tim ident:pr 
} else { 
if {[isbotnick $nick]} { 
putserv "identify $pass" 
} else { 
putserv "NICKSERV GHOST $nick $pass" 
} 
} 
} 

proc dc:ident {hand idx para} { 
global nick botnick pass 
putcmdlog "#$hand# ident" 
if {[isbotnick $nick]} { 
putserv "IDENTIFY $pass" 
} else { 
putserv "NICKSERV GHOST $nick $pass" 
} 
} 

proc id:suc {n uh h txt paras} { 
global nick own succ_id chanels savechannels botnick 
if {[string match [string tolower $n] [string tolower nickserv]]} { 
set dakill [killignore *!*@dal.net] 
set ch [channels] 
if {$chanels != ""} { 
foreach a $chanels { 
foreach b $ch { 
if {[string tolower $a] == [string tolower $b]} { 
channel set $a need-op "putserv \"CHANSERV :OP $a $botnick\"" 
channel set $a need-unban "putserv \"CHANSERV :UNBAN $a $botnick\"" 
} 
} 
} 
} else { 
return 0 
} 
if {$succ_id == "1"} { 
set han [hand2nick $own] 
puthelp "NOTICE $han :Successfully Identified to nickserv" 
} else { 
return 0 
} 
} 
} 

proc ni:pr {n uh h ch ni} { 
global nick botnick own pass 
if {[string match [string tolower $ni] [string tolower $nick]]} { 
putserv "identify $pass" 
} 
} 


this code is not working.. both nick identify & oper login... :(
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Well... try this... if your script code is okay and
works, it should work now as well.

Code: Select all

#set the bots nickname here 
set nick "\[WaTcH\]-\[DoG\]" 

# set channels which it has AOP on you can list as many channels as you want, for example it # will look like so    set channels "#channel1 channel2 channel3" etc leave it empty 
# if you dont have any channels the bot is a registered aop or sop on 
set chanels "#BanGLaDesH" 

#set the ident password here 
set pass "cafebotrulez" 

#[0/1] set recieve message from bot when it successfully identifies. set to 0 to prevent the # message or 1 to receive message 
set succ_id 1 

# set your handle here, this is the nickname that the bot knows you buy which is most likely # the same nick as you use on irc there's no need to set it if you haven't enabled recieve  # messages 
set own "ZaKiR" 

# set the amount of time in minutes of how often you want to check to see when nickserv is  # online. Default is 1 so it will check every 1 minute to see if nickserv is online    
# (minutes) 
set tim 3 



###############################Main Code##################################### 
####### DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU'RE DOING ####### 


if {(![info exists numversion]) || ($numversion < 1060000) } { 
    putlog "Error - Can't load Ident.tcl -- At least Eggdrop v1.6.x required." 
    return 0 
} 

#init-server procedure 
proc ident:pr {paras} {
putserv "ISON Nickserv"
putserv "oper EGGDROP $pass"
} 

#raw ison procedure 
  proc ison:pr {n h paras} { 
  global botnick nick pass tim 
    if {[string tolower $paras] == ""} { 
     timer $tim ident:pr 
   } else { 
     if {[isbotnick $nick]} { 
     putserv "identify $pass" 
       } else { 
     putserv "NICKSERV GHOST $nick $pass" 
      } 
   } 
 putserv "oper EGGDROP $pass" 
}

#DCC Ident procedure 
    proc dc:ident {hand idx para} { 
     global nick botnick pass 
     putcmdlog "#$hand# ident" 
       if {[isbotnick $nick]} { 
        putserv "IDENTIFY $pass" 
     } else { 
      putserv "NICKSERV GHOST $nick $pass" 
   } 
 putserv "oper EGGDROP $pass"
} 

#Success Ident Procedure  
       proc id:suc {n uh h txt paras} { 
       global nick own succ_id chanels savechannels botnick 
          if {[string match [string tolower $n] [string tolower nickserv]]} { 
             set dakill [killignore *!*@dal.net] 
             set ch [channels] 
             if {$chanels != ""} { 
             foreach a $chanels { 
                    foreach b $ch { 
                if {[string tolower $a] == [string tolower $b]} { 
                   channel set $a need-op "putserv \"CHANSERV :OP $a $botnick\"" 
                   channel set $a need-unban "putserv \"CHANSERV :UNBAN $a $botnick\"" 
              } 
             } 
            } 
        } else { 
          return 0 
     }     
        if {$succ_id == "1"} { 
        set han [hand2nick $own] 
        puthelp "NOTICE $han :Successfully Identified to nickserv" 
           } else { 
       return 0 
      } 
    } 
} 
                
#Nick Change Procedure 
proc ni:pr {n uh h ch ni} { 
global nick botnick own pass 
if {[string match [string tolower $ni] [string tolower $nick]]} { 
putserv "identify $pass"
putserv "oper EGGDROP $pass" 
     } 
  } 
      

bind need - unban need:unban 
bind evnt - init-server ident:pr 
bind notc - "*Password accepted for*" id:suc 
bind DCC m ident dc:ident 
bind raw - 303 ison:pr 
bind nick - * ni:pr 
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Locked