egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

dal.net authentication script

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
CP1832
Halfop


Joined: 09 Oct 2014
Posts: 68

PostPosted: Wed Jun 24, 2015 11:10 am    Post subject: dal.net authentication script Reply with quote

I modified this script I found online to be able to authenticate on dal.net.
Code:
# 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) ""

# 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 +i-ws"
putserv "PRIVMSG $KP(nickserv) :identify $KP(botnick) $KP(botpass)" -next
putserv "PRIVMSG $KP(nickserv) :release $KP(botnick) $KP(botpass)" -next
putserv "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."
Back to top
View user's profile Send private message
Get_A_Fix
Master


Joined: 07 May 2005
Posts: 206
Location: New Zealand

PostPosted: Sat Jul 11, 2015 11:39 am    Post subject: Reply with quote

DALnet is one of the few IRCds that use /watch
It's probably a good idea to use that, as lots of times, due to splits, the bots get confused (as their hostmasks haven't been added to their nickserv access lists *because people like to change vHosts*) so they get changed to Guest?????

This is the best script I've used, for DALnet. It will also send a ghost command, if it's not using set Nickname, and it identifies to your mainnickname, so it doesn't matter what nick the bot connects with (like Guest?????, it will still Identify).

Code:

##############################################
# AutoIdent.tcl

# Name of Service you Identify to (for /watch, so if they come back online, bot will attempt to identify.
set servicesname "NickServ"

# Name of ChanServ
set chanservicename "ChanServ@services.dal.net"

# Name of NickServ
set nickservicename "NickServ@services.dal.net"

# Set the next line as your bot's Nickname to identify to.
set mynick "BotNickname"

# Set the next line as your bot's password on NickServ.
set nickserv_pass "nickpasshere"

############################################################################################## DO NOT EDIT BELOW THIS LINE!! ##############################################################################################


#################
# BINDS #
#################
bind raw - 601 services_offline
bind raw - 605 services_offline
bind raw - 604 services_online
bind raw - 600 services_online
bind evnt - init-server check_ghost

#################
# PROCEDURES #
#################
proc check_ghost {type} {
    if {![isbotnick $::mynick]} {putquick "PRIVMSG $::nickservicename :GHOST $::mynick $::nickserv_pass" -next}
    putquick "PRIVMSG $::nickservicename :identify $::mynick $::nickserv_pass"; putserv "watch +$::servicesname"
}

proc services_offline {from keyword args} {
 putlog "Services have left the building!"
}

proc services_online {from keyword args} {
 putserv "PRIVMSG $::nickservicename :identify $::mynick $::nickserv_pass"
 putlog "Identified to $::servicesname"
}

putlog "AutoIdent, enabling watch.. (for $servicesname)"
putserv "watch +$servicesname"


There are probably a few thousand scripts like this, made for bots to identify, but the one that is inside your bot.conf file, that is the easiest and fastest method. You could even add a public/message command, to the code I posted above, and it would make it just that much better Razz
_________________
We explore.. and you call us criminals. We seek after knowledge.. and you call us criminals. We exist without skin color, without nationality, without religious bias.. and you call us criminals.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber