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.

Dalnet Bot Service 2.0

Support & discussion of released scripts, and announcements of new releases.
User avatar
m4s
Halfop
Posts: 97
Joined: Mon Jan 30, 2017 3:24 pm

Dalnet Bot Service 2.0

Post by m4s »

Hi all! :)

I am using this script. It is able to identify my bot to nickserv but when I do rehash in DCC the bot stops an I get this error message:

Tcl error in file 'configfilel':
[18:27] invalid timerID
while executing
"killtimer $optimer "
(file "scripts/nickserv.tcl" line 145)
invoked from within
* CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)

Here is the script:
https://paste.ubuntu.com/24716793/
Can anyone have a look? :)

Thanks!

IMPORTANT!
!!! I don't use this script on DALNET! I am using it on another network so the script is modified! !!!

Update: You can use this script on those networks where the identification to nickserv look like this:
/msg nickserv IDENTIFY password.
Last edited by m4s on Mon Sep 25, 2017 3:59 pm, edited 4 times in total.
s
simo
Revered One
Posts: 1108
Joined: Sun Mar 22, 2015 2:41 pm

Post by simo »

you could give this a try:

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"}
 } 
}

 
C
CP1832
Halfop
Posts: 68
Joined: Thu Oct 09, 2014 4:03 pm

Post by CP1832 »

Hi m4s:

I've been using for a while now on dalnet and it's been flawlessly:

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."
User avatar
Arnold_X-P
Master
Posts: 226
Joined: Mon Oct 30, 2006 12:19 am
Location: DALnet - Trinidad - Beni - Bolivia
Contact:

Re: Dalnet Bot Service 2.0

Post by 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:

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"
.:an ideal world:. www.geocities.ws/chateo/yo.htm
my programming place /server ix.scay.net:7005
User avatar
m4s
Halfop
Posts: 97
Joined: Mon Jan 30, 2017 3:24 pm

Re: Dalnet Bot Service 2.0

Post by m4s »

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:
Hi Arnold_X-P!

Thanks for your script it works! Great! :)
User avatar
Get_A_Fix
Master
Posts: 206
Joined: Sat May 07, 2005 6:11 pm
Location: New Zealand

Post by Get_A_Fix »

WOW, that script is so old, I haven't used that Hotmail email since the 90's
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.
User avatar
Arnold_X-P
Master
Posts: 226
Joined: Mon Oct 30, 2006 12:19 am
Location: DALnet - Trinidad - Beni - Bolivia
Contact:

Post by Arnold_X-P »

Thank the creator Get_A_Fix he is the real genius
I just corrected a small sector
.:an ideal world:. www.geocities.ws/chateo/yo.htm
my programming place /server ix.scay.net:7005
User avatar
m4s
Halfop
Posts: 97
Joined: Mon Jan 30, 2017 3:24 pm

Post by m4s »

Hi,

Guys, I have just found another thing.
I deoped my bot to see the how the oping procedure works.
I got the following error:

[19:55] <Mybot> [19:55] Requesting @ from ChanServ on #mychan ...
[19:55] <Mybot> [19:55] Tcl error in script for 'timer386455':
[19:55] <Mybot> [19:55] can't read "chanserv": no such variable

First I changed this line (115):
global botnick chancheck nickopauth opcheck optimer
to this:
global botnick chancheck nickopauth opcheck optimer chanserv

but the error still have.
Any Idea?

In the config section I use this: set chanserv "ChanServ".

Thanks! :)
User avatar
Arnold_X-P
Master
Posts: 226
Joined: Mon Oct 30, 2006 12:19 am
Location: DALnet - Trinidad - Beni - Bolivia
Contact:

Post by Arnold_X-P »

What version of eggdrop does
.:an ideal world:. www.geocities.ws/chateo/yo.htm
my programming place /server ix.scay.net:7005
User avatar
m4s
Halfop
Posts: 97
Joined: Mon Jan 30, 2017 3:24 pm

Post by m4s »

Arnold_X-P wrote:What version of eggdrop does
1.8.1
User avatar
Arnold_X-P
Master
Posts: 226
Joined: Mon Oct 30, 2006 12:19 am
Location: DALnet - Trinidad - Beni - Bolivia
Contact:

Post by Arnold_X-P »

Version 1.8.1 is full of errors
Use eggdrop version 1.6.20 (download eggdrop 1.6.20)

And change #mychan There place the name of your channel edit that
.:an ideal world:. www.geocities.ws/chateo/yo.htm
my programming place /server ix.scay.net:7005
t
thommey
Halfop
Posts: 76
Joined: Tue Apr 01, 2008 2:59 pm

Post by thommey »

Arnold_X-P wrote:Version 1.8.1 is full of errors
Oh? Do you have any concrete errors you are experiencing in 1.8.1 that you haven't in 1.6.21?
I would be very interested to hear about them and fix them.
Eggdrop1.8.x is actively developed and we appreciate any input to find and fix bugs on https://github.com/eggheads/eggdrop.
User avatar
Arnold_X-P
Master
Posts: 226
Joined: Mon Oct 30, 2006 12:19 am
Location: DALnet - Trinidad - Beni - Bolivia
Contact:

Post by Arnold_X-P »

If I have one in specific
Give me a few minutes
.:an ideal world:. www.geocities.ws/chateo/yo.htm
my programming place /server ix.scay.net:7005
User avatar
Arnold_X-P
Master
Posts: 226
Joined: Mon Oct 30, 2006 12:19 am
Location: DALnet - Trinidad - Beni - Bolivia
Contact:

Post by Arnold_X-P »

my bot is Deborilla
[14:45] * Deborilla (~Cutty@server01.shell-hosting.com) has joined #lapaz
[14:45] * ChanServ sets mode: +o Deborilla

In that bot I use the SpiKe^^ trivia and always worked fine on my eggdrop 1.6.20
When I add it in eggdrop 1.8.1 it only works for a few moments and then it drops

[14:45] <@Deborilla> 15,05 .0000. Idiomas©-«(Jejeje) ¿Cómo se dice "otorrinolaringólogo" en japonés ?
[14:45] <@Deborilla> 15,05 1er Pista: **** ****** ****** 05 Valor de la Pregunta :14 8000 puntos.
[14:45] * @Deborilla (~Cutty@server01.shell-hosting.com) Quit (Quit: triv: fatal error)

I can not enter the party line because its fall is very fast and I can not see the error
The same happens with the tcl of fb.lagcheck.tcl I get time errors
[14:46] Tcl error in script for 'timer576475':
And the error is the same in both tcl in trivia and fb.lagcheck.tcl

Apparently has the same error as eggdrop 1.6.21 in reading the time to run some tcl
.:an ideal world:. www.geocities.ws/chateo/yo.htm
my programming place /server ix.scay.net:7005
User avatar
Arnold_X-P
Master
Posts: 226
Joined: Mon Oct 30, 2006 12:19 am
Location: DALnet - Trinidad - Beni - Bolivia
Contact:

Post by Arnold_X-P »

Both mentioned tcl work well in eggdrop 1.6.20
.:an ideal world:. www.geocities.ws/chateo/yo.htm
my programming place /server ix.scay.net:7005
Post Reply