
if anyone can help would be really nice thanks
Code: Select all
######################################################################
# Nickserv identification Script #
######################################################################
# ident.v1.2.tcl
#
# Script will check to see if NICKSERV is online and identify.
#
# - Commands -
# DCC - .ident (start ident procedure) .getops (get OPs)
# MSG - .ident (start ident procedure) .getops (get OPs)
# It is good to add NickServ as a user to stop ignores.
# In DCC, TYPE:
# .+user NickServ *!service@dal.net
# .chattr NickServ +of-p
# .chpass NickServ VOID12345
# load this script in the scripts directory (eggdrop/scripts)
# Then go into the eggdrop directory and edit your .conf (at the bottom)
# by adding this line:
# source scripts/ident.v1.2.tcl
# Then in dcc type: .rehash and .ident
# This is NOT case sensitive
set NickServ "NickServ"
# Set the bots nickname here.
set i_nick "put bots nick here"
# Set channels the bot has OPs on. (use "" for all channels)
# Multiple channels seperated by spaces.
set i_chans ""
# Set the bots ident password here.
set i_pass "put botnicks ident password here"
# Set the amount of time in minutes to check if nickserv is online.
set i_timer 5
# Set the amount of time in seconds before bot changes
# to primary nick "after" the ghost command was used.
set i_gost_timer 60
######################################################################
# Main Script #
######################################################################
# init-server
bind evnt -|- init-server find:Nserv
proc find:Nserv {type} {
putserv "ISON Nickserv"
}
# raw Nickserv is on-line
bind raw -|- 303 Nserv:isonline
proc Nserv:isonline {from keyword text} {
global botnick NickServ i_nick i_pass i_gost_timer i_timer
if {[string match -nocase "*$NickServ*" "$text"]} {
if {[isbotnick $i_nick]} {
putserv "PRIVMSG NickServ@services.dal.net :IDENTIFY $i_pass"
# putserv "NICKSERV IDENTIFY $i_pass"
return 0
} else {
putserv "PRIVMSG NickServ@services.dal.net :GHOST $i_nick $i_pass"
# putserv "NICKSERV GHOST $i_nick $i_pass"
utimer $i_gost_timer {putserv "NICK $i_nick"}
return 0
}
} else {
timer $i_timer find:Nserv
}
}
bind notc -|- "*owned by someone else*" identify:rbot
proc identify:rbot {nick uhost handle text dest} {
global botnick NickServ i_nick i_pass
if {[string match -nocase "*$NickServ*" "$nick"]} {
if {[isbotnick $i_nick]} {
putserv "PRIVMSG NickServ@services.dal.net :IDENTIFY $i_pass"
# putserv "NICKSERV IDENTIFY $i_pass"
}
}
}
# Successful Ident
bind notc -|- "*Password accepted*" ident:success
proc ident:success {nick uhost handle text dest} {
global botnick NickServ i_chans
if {[string match -nocase "*$NickServ*" "$nick"]} {
if {$i_chans == ""} {
set chans [channels]
} else {
set chans $i_chans
}
foreach chan $chans {
if {[botonchan $chan]} {
if {![botisop $chan]} {
putserv "PRIVMSG CHANSERV@services.dal.net :OP $chan $botnick"
# putserv "CHANSERV OP $chan $botnick"
}
}
}
}
}
# DCC Commands Ident & getops
bind dcc o ident dcc:ident
proc dcc:ident {handle idx text} {
global botnick i_nick i_pass i_gost_timer
putlog "Started Ident Procedure at the request of $handle"
if {[isbotnick $i_nick]} {
putserv "PRIVMSG NickServ@services.dal.net :IDENTIFY $i_pass"
# putserv "NICKSERV IDENTIFY $i_pass"
return 0
} else {
putserv "PRIVMSG NickServ@services.dal.net :GHOST $i_nick $i_pass"
# putserv "NICKSERV GHOST $i_nick $i_pass"
utimer $i_gost_timer {putserv "NICK $i_nick"}
return 0
}
}
bind dcc o getops dcc:getops
proc dcc:getops {handle idx text} {
global botnick i_chans
putlog "Started getOPs Procedure at the request of $handle"
if {$i_chans == ""} {
set chans [channels]
} else {
set chans $i_chans
}
foreach chan $chans {
if {[botonchan $chan]} {
if {![botisop $chan]} {
putserv "PRIVMSG CHANSERV@services.dal.net :OP $chan $botnick"
# putserv "CHANSERV OP $chan $botnick"
}
}
}
}
# MSG Commands Ident & getops
bind msg o ".ident" msg:ident
proc msg:ident {nick uhost handle text} {
global botnick i_nick i_pass i_gost_timer
puthelp "PRIVMSG $nick :Starting Ident Procedure."
putlog "Started Ident Procedure at the request of $handle"
if {[isbotnick $i_nick]} {
putserv "PRIVMSG NickServ@services.dal.net :IDENTIFY $i_pass"
# putserv "NICKSERV IDENTIFY $i_pass"
return 0
} else {
putserv "PRIVMSG NickServ@services.dal.net :GHOST $i_nick $i_pass"
# putserv "NICKSERV GHOST $i_nick $i_pass"
utimer $i_gost_timer {putserv "NICK $i_nick"}
return 0
}
}
bind msg o ".getops" msg:getops
proc msg:getops {nick uhost handle text} {
global botnick i_chans
puthelp "PRIVMSG $nick :Starting getOPs Procedure."
putlog "Started getOPs Procedure at the request of $handle"
if {$i_chans == ""} {
set chans [channels]
} else {
set chans $i_chans
}
foreach chan $chans {
if {[botonchan $chan]} {
if {![botisop $chan]} {
putserv "PRIVMSG CHANSERV@services.dal.net :OP $chan $botnick"
# putserv "CHANSERV OP $chan $botnick"
}
}
}
}
putlog "Loaded NickServ Identification Script v1.2 by Dedan :^)"
######################################################################
############################### EOF ##################################