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.

.help message error and multi-chan join message problem.

Old posts that have not been replied to for several years.
Locked
User avatar
mcdarby
Halfop
Posts: 69
Joined: Tue Jul 16, 2002 7:46 pm
Location: Bangor, Pennsylvania
Contact:

.help message error and multi-chan join message problem.

Post by mcdarby »

Hi, I recently installed a tcl script to my eggdrop bot that was supposed to help me set different join notice messages for each channel the bot is on. What happened is that the tcl didn't give me a new command to look for, instead it screwed up the .help command and each time I use .help with anything or by itself, I get the message "No help available on that."

Right now, I am not sure what happened and I need to find out what went wrong. Any assistance is appeciated.

--
Erik McDarby
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

It would help a lot, if you pasted what Tcl it was, and where you obtained it.

It may also help if you un-install the script, and issue a .restart.
User avatar
mcdarby
Halfop
Posts: 69
Joined: Tue Jul 16, 2002 7:46 pm
Location: Bangor, Pennsylvania
Contact:

Post by mcdarby »

ppslim wrote:It would help a lot, if you pasted what Tcl it was, and where you obtained it.

It may also help if you un-install the script, and issue a .restart.
Hi, the Tcl it was was the Multi-channel onjoin messages listed here.

http://www.egghelp.org/tclhtml/1256-0-1 ... essage.htm

And, I have also removed the script from the bots config file and .restarted it. But that didn't do anything to fix the problem. Anyone know what to do to fix this problem?

--
Erik McDarby
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Seeing as I wrote the script, I can say that the script isn't at fault here.

Check your config file, and make sure that the path to the help directory is set correctly.

You may again, need to .restart your bot, and possibly a .die and start from the shell.
User avatar
mcdarby
Halfop
Posts: 69
Joined: Tue Jul 16, 2002 7:46 pm
Location: Bangor, Pennsylvania
Contact:

Post by mcdarby »

ppslim wrote:Seeing as I wrote the script, I can say that the script isn't at fault here.

Check your config file, and make sure that the path to the help directory is set correctly.

You may again, need to .restart your bot, and possibly a .die and start from the shell.
Hi, I have doubled checked my config file and found that the path for the help directory was pointing to an invalid location and fixed it. This brought back my .help responses, but the script to make the bot post welcome notices to anyone joining certain channels that it is in isn't working. I even have the path of the script listed correctly in the "Personal Scripts" section and need to figure out what is wrong with it.

--
Erik McDarby
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

If there is no error, when loading the script or the bot, the script is loaded.

This sound slike a configuration error in the script itself.

The script is rather basic in design, which doesn't mean that I can rule it out, it does mean, there is so little that can go wrong, ti is usualy dowen to a configuration issue.

If you could upload your copy of the script to somwhere, I can look at it and see what the problem is.
User avatar
mcdarby
Halfop
Posts: 69
Joined: Tue Jul 16, 2002 7:46 pm
Location: Bangor, Pennsylvania
Contact:

Post by mcdarby »

ppslim wrote:If there is no error, when loading the script or the bot, the script is loaded.

This sound slike a configuration error in the script itself.

The script is rather basic in design, which doesn't mean that I can rule it out, it does mean, there is so little that can go wrong, ti is usualy dowen to a configuration issue.

If you could upload your copy of the script to somwhere, I can look at it and see what the problem is.
Sorry, I have been busy for a bit and apologize for taking a while to respond. This is what I have in the bot's config for the path to the script under the "Scripts" section

# Personnal scripts
#source scripts/Dalnet-1.1.tcl
#source scripts/multi-onjoin.tcl

Apparently, both these scripts don't seem to work on restarting the bot. This is the script that is currently in the multi-onjoin one and maybe you or someone here can figure out what is wrong.

###
# SETTINGS

# Set this to the channels and messges, follow the format of the examples
set ojcham {
{#Palace} {welcome to test channel 1}
{#test2} {I see your in test channel 2}
}

# Do you want to use notices, or private messages - 0=notice - anything else=pr$
# Notices goto the user, while private messages goto the channel
set ojtom 0

###
# THIS IS THE SCRIPT, SURE YA WANNA TOUCH

bind join - "*" oj:chan:message
proc oj:chan:message {nick uh hand chan} {
global ojcham ojtom

bind join - "*" oj:chan:message
proc oj:chan:message {nick uh hand chan} {
global ojcham ojtom
if {[set id [lsearch -exact [string tolower $ojcham] [string tolower $chan]]]$
if {$ojtom == "0"} {
putserv "NOTICE $nick :[lindex $ojcham [expr $id + 1]]"
} {
putserv "PRIVMSG $chan :[lindex $ojcham [expr $id + 1]]"
}
}
}
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

The problem is self explanitory.

You have commented out the line, that loads the script.

Code: Select all

# Personnal scripts 
#source scripts/Dalnet-1.1.tcl 
#source scripts/multi-onjoin.tcl 
A # at the begining of the line, mean this line is a comment. THis allow programmers to leave notes, documentation and any other informational message.

Comments are discarded/ignored by Tcl. As such,t he syntax of the line itself is correct, but is being discarded because of the comment marker.

Delete the # symbol, and all shall load.
User avatar
mcdarby
Halfop
Posts: 69
Joined: Tue Jul 16, 2002 7:46 pm
Location: Bangor, Pennsylvania
Contact:

Post by mcdarby »

ppslim wrote:The problem is self explanitory.

You have commented out the line, that loads the script.

Code: Select all

# Personnal scripts 
#source scripts/Dalnet-1.1.tcl 
#source scripts/multi-onjoin.tcl 
A # at the begining of the line, mean this line is a comment. THis allow programmers to leave notes, documentation and any other informational message.

Comments are discarded/ignored by Tcl. As such,t he syntax of the line itself is correct, but is being discarded because of the comment marker.

Delete the # symbol, and all shall load.
Okay, I have removed the # symbol and multi-onjoin.tcl loaded properly. But there seems to be a problem with the Dalnet-1.1.tcl because it says something like "Dalnet-1.1.tcl has sucessfully loaded", but it doesn't seem to be sending any message to identify itself with NickServ. I have temporary changed the line to where my nick is replacing NickServ to see what it is trying to send to NickServ and it isn't sending anything to identify itself with NickServ. Could you or someone here tell me what might be wrong here with this script. It may say "BotNick" and "BotPass" for the bot's nick and ChanServ password, but I do have the correct information in there and I felt that information shouldn't be declosed here because of security reasons.

Code: Select all

# The bot's registered nick to NickServ also the bot's nick.
set eggnick "BotNick"

# The bot's nick password to NickServ
set nickpass "botpass"

# [0/1] To let us know if ChanServ is responding or not, to wait for the
# action before sending another request.
set chanserv_success 0

# Duration in minutes before turning chanserv_success to 1 thus enabling us
# to send another request.
set chanserv_time 10

############################################################################
# PLEASE DO NOT EDIT ANYTHING BELOW UNLESS YOU KNOW WHAT YOU ARE DOING !!! #
############################## Script Begin ################################

# Now, we recieved the notice. We will turn off the is_identified to
# wait the "Password accepted" reply before sending a service requests
# to ChanServ.
proc nickserv { nick uhost hand chan text } {
global nickpass botnick eggnick is_identified identifying chanserv_success nick$
   if { $identifying == 0 } {
     set is_identified 0
     set chanserv_success 0
     if { $botnick == $eggnick } {
        set identifying 1
        timer $nickserv_time nickserv_reset
        putserv "PRIVMSG NickServ :identify $nickpass"
        }
   }
}

# Now the bot received the notice that password is accepted.
# Right here, we will turn off identifying variable as a preparation for
# the next ident request and since we are now identified we will turn the
# memory variable is_identified and chanserv_success to on.
proc pass_accepted { nick uhost hand chan text } {
global is_identified identifying chanserv_success
    set nickservTimerID [timerexists nickserv_reset]
    set identifying 0
    set is_identified 1
    set chanserv_success 1
    if { $nickservTimerID != "" } {
       killtimer $nickservTimerID
    }
}

# Reset the variables to an initial value after timer expires.
proc nickserv_reset {} {
global is_identified identifying chanserv_success
    set identifying 0
    set is_identified 0
    set chanserv_success 0
    nickserv "" "" "" "" ""
}

# Send op, unban & invite request to ChanServ.
proc chanserv {where what} {
global botnick is_identified chanserv_success chanserv_time
    if { ($is_identified == 1) && ($chanserv_success == 1) } {
       set chanserv_success 0
       timer $chanserv_time chanserv_reset
       putserv "PRIVMSG ChanServ :$what $where $botnick"
    }
}

# This procedure will verify if ChanServ is responding to the service requests.
# It will help if ChanServ is lagged, thus preventing multiple requests.
proc mode_proc {nick uhost hand chan mc {victim ""}} {
global botnick chanserv_success
   if {(($nick == "ChanServ") && ($victim == $botnick) && (($mc == "+o") || ($m$
        set chanservTimerID [timerexists chanserv_reset]
        set chanserv_success 1
        if { $chanservTimerID != "" } {
           killtimer $chanservTimerID
        }
   }
}

# This procedure will call after the chanserv_timer expires
proc chanserv_reset {} {
   global chanserv_success
   set chanserv_success 1
}

# The following are those tcl binds for this script.
bind notc - "This nick is registered and protected*" nickserv
bind notc - "Password accepted*" pass_accepted
bind mode - * mode_proc

putlog " * Loaded [file tail [info script]] successfully."
The "This nick is registered and protected*" and the "Password accepted*" is the first part of the lines that NickServ normally notices on the IRC Server I have the bot on.

--
Erik McDarby
Locked