Code: Select all
bind evnt - init-server evnt:init_server
proc evnt:init_server {type} {
global botnick
putquick "MODE $botnick +RSi"
putquick "PRIVMSG NickServ@services.dal.net :identify password"
}
bind notc - "*This nick is owned by someone else*" autoident
bind notc - "*Password accepted for*" compautoident
proc autoident {nick uhost hand text dest} {
putserv "PRIVMSG NickServ@services.dal.net :identify password"
}
proc compautoident {nick uhost hand text dest} {
putserv "PRIVMSG #yourchannel :\002Identification\002 has been successful.."
}
bind join - * mejoin
proc mejoin {nick uhost hand chan} {
if {$chan == "#yourchannel"} {
if [isbotnick $nick] {putserv "PRIVMSG ChanServ@services.dal.net op $chan"}
}
}
Code: Select all
# Keep nick v2.0 by Mezen <mezen0@msn.com>
# This script allows to solve connection issue after receiving
# Invalid Nick notice from the network. It will make the bot release
# its nickname and identify to it.
# This script is made for Dalnet but can be adapted to any other
# network with small modifications
# to install it, just copy it to the folder /path/to/eggdrop/scripts
# then add this line at the end of the eggdrop.conf
# source scripts/keepnick.tcl
#######################################
# Config #
#######################################
# set here bot's password
set KP(botpass) "yourpass"
# set here nickserv's hostname
set KP(nickserv) "nickserv@services.dal.net"
#######################################
# Do not edit below this line #
#######################################
# removing old binds
unbind evnt - init-server evnt:init_server
# creating new binds
foreach bind [binds kp_invalid_server_proc] {lassign $bind type flags mask num proc; unbind $type $flags $mask $proc}
bind evnt - init-server kp_init_server_proc
foreach bind [binds kp_invalid_nick_proc] {lassign $bind type flags mask num proc; unbind $type $flags $mask $proc}
bind raw - 432 kp_invalid_nick_proc
bind raw - 433 kp_invalid_nick_proc
# saving bot's nick in a variable
set KP(botnick) $nick
proc kp_invalid_nick_proc { from keyword text } {
global nick altnick botnet-nick
set newnick $nick
set chars "abcdefghijkmnopqrstuvwxyz023456789";
set anick $altnick
while {[regexp -all {\?} $anick]>0} {
set char [string index $chars [expr int(rand()*[string length $chars])]]
if {[expr rand()]>0.5} {set char [string toupper $char]}
regsub {\?} $anick $char anick
}
putlog "Alternating Nick: $nick -> $anick"
set nick $anick
if {[string match -nocase ${botnet-nick} $newnick]} {
putlog "Jumping to next server..."
jump
}
}
proc kp_init_server_proc {type} {
global nick KP
putquick "MODE $nick +ir-ws"
putquick "PRIVMSG $KP(nickserv) :identify $KP(botnick) $KP(botpass)" -next
putquick "PRIVMSG $KP(nickserv) :release $KP(botnick) $KP(botpass)" -next
putquick "PRIVMSG $KP(nickserv) :ghost $KP(botnick) $KP(botpass)" -next
set nick $KP(botnick)
}
set KP(version) " 2.0"
set KP(script) "KP -- Keep Nick -- "
putlog "\002Loading\002: $KP(script)$KP(version) by Mezen."
Code: Select all
###################################################################
# DALnet Bot Services v2.0
# By Get_A_Fix - getafix007@hotmail.com
# update for Arnold_X-P network: DALnet irc.dal.net channel #tcls
# Features:
# * Auto-Identify when the bot detects that NickServ
# wants a password.
# * Manual commands to get the bot to identify and to op #channel
# * Auto checks to see if the bot has ops. If the bot doesn't
# the bot will request ops from ChanServ.
#
# Manual usage:
# * Type ".nickserv" in DCC Chat [without inverted commas]
# * Type "!identify" in channel [without inverted commas]
# * Type "!opup" in channel [without inverted commas]
#
###################################################################
# Channels to check weather or not the bot has ops
# ie: set chancheck "#channel1 #channel2 #channel3"
set chancheck "#mychan"
# Command used to identify with nick services
set identcmd "identify"
# Set channel you want msg's from the bot to go to
set homechan "#mychan"
# Password for nick services
set identpass "mypass"
# Nickname for nick services bot
set nickserv "NickServ"
# Set this to what message Nickserv issues when it detects a registered nick
bind notc - "This nick**" identify_notc
# Nickname for channel services bot
set chanserv "ChanServ"
# How often do you want to check ops status (minutes)
# Default of 1hr checks
set opcheck 60
####################################
#### DO NOT EDIT ANYTHING BELOW ####
####################################
set nickver 2.0
proc say_succ { nick uh hand text dest } {
global homechan nickserv
putserv "PRIVMSG $homechan :\002Identified to NickServ successfully\002"
putlog "Identified to $nickserv successfully"
unbind notc - "*Password accepted*" say_succ
}
proc identify_notc { nick uh hand text dest } {
global botnick nickserv identcmd identpass
putlog "$nickserv requested identification..."
if {[string match [string tolower $nick] [string tolower $nickserv]]} {
putserv "PRIVMSG $nickserv $identcmd $identpass"
putlog "Identifying $nickserv as $botnick..."
}
}
bind dcc - nickserv identify_dcc
proc identify_dcc { hand idx args } {
global botnick nickserv identcmd identpass
putlog "Identifying to $nickserv as $botnick..."
putserv "PRIVMSG $nickserv $identcmd $identpass"
bind notc - "*Password accepted*" say_succ
}
bind pub o|o !identify identify_pub
proc identify_pub { nick uhost hand chan arg } {
global botnick nickserv identcmd identpass
putlog "$nick requested in $chan to identify to $nickserv..."
putserv "PRIVMSG $chan :\002Identifying to $nickserv (Requested by $nick)\002"
putlog "Identifying to $nickserv as $botnick..."
putserv "PRIVMSG $nickserv $identcmd $identpass"
bind notc - "*Password accepted*" say_succ
}
bind pub o|o !opup opup_pub
proc opup_pub { nick uhost hand chan arg } {
global botnick nickserv chanserv identcmd identpass
putlog "$nick requested in $chan to op up..."
putserv "PRIVMSG $chan :\002OP-Up for $chan (Requested by $nick)\002"
putlog "Requesting ops for $chan..."
putserv "PRIVMSG $nickserv $identcmd $identpass"
putserv "PRIVMSG $chanserv OP $chan $botnick"
}
bind notc - "*Jelszavad elfogadva*" identify_succ
proc identify_succ { nick uh hand text dest } {
global botnick nickserv
putlog "Identified to $nickserv as $botnick successfully!"
}
proc nickID {} {
global botnick opcheck identcmd identpass nickopauth optimer nickserv
if {$identpass == ""} {
putlog "Services Error: No password defined."
unset -nocomplain -- optimer
return 0
} else {
putlog "Authorizing with Nickserv ..."
putserv "PRIVMSG $nickserv $identcmd $identpass"
set nickopauth true
utimer 5 checkops
}
}
proc checkops {} {
global botnick chancheck nickopauth opcheck optimer
if {$nickopauth == ""} {
putlog "Services Error: Did NOT auth with NickServ."
nickID
return 0
} else {
if {$chancheck == ""} {
putlog "Services Error: No channels defined!"
return 0
} else {
set channels [llength $chancheck]
putlog "Checking @ status on: $chancheck ..."
for {set loop 0} {$loop < $channels} {incr loop} {
if {[validchan [lindex $chancheck $loop]]} {
if {![botisop [lindex $chancheck $loop]]} {
utimer 5 "Op_Req [lindex $chancheck $loop]"
putlog "Requesting @ from ChanServ on [lindex $chancheck $loop] ..."
}
} else {putlog "Services Error: No channel record for [lindex $chancheck $loop]"}
}
unset -nocomplain -- nickopauth
timer $opcheck [list nickID]
}
}
}
proc Op_Req {channel} {
global botnick chanserv
if {![botisop $channel]} {puthelp "PRIVMSG $chanserv OP $channel $botnick"}
}
if {[info exists optimer]} {killtimer $optimer}
timer $opcheck [list nickID]
putlog "DALnet Bot Services v$nickver By Get_A_Fix - Loaded and Running"
putlog "Command will be: /NickServ $identcmd HIDDENPASS"
Hi Arnold_X-P!hi m4s
your code error is set optimer [timer $opcheck nickID]
The error was in the reading of time and to which I solve.
Try to try:
Oh? Do you have any concrete errors you are experiencing in 1.8.1 that you haven't in 1.6.21?Arnold_X-P wrote:Version 1.8.1 is full of errors