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.

Having difficulty with this desc script

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:

Having difficulty with this desc script

Post by mcdarby »

Hi, I am having some difficulty with this !desc script that I have because the problem is that the eggdrop isn't responding when the command "!desc Name" is issued in any of the channels it is in. This is the script that I have.

Code: Select all

bind pub -|- "!desc Name" pub:desc

set inuse 0

proc pub:desc {nick host hand chan arg} {
    global inuse

    if { $inuse == 1 } {
    putquick "PRIVMSG $chan :Sorry, !desc is currently in use, please wait 30 seconds and try again"
    return
    }
    set inuse 1
    putquick "PRIVMSG $chan :Desc of Name"
    utimer 30 {set inuse 0}
}
I hoping that you can tell me what the problem might be.

McDarby[/code]
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

bind pub only work with a single word, use pubm if you want more than one trigger word.
User avatar
mcdarby
Halfop
Posts: 69
Joined: Tue Jul 16, 2002 7:46 pm
Location: Bangor, Pennsylvania
Contact:

Post by mcdarby »

gb wrote:bind pub only work with a single word, use pubm if you want more than one trigger word.
I just tried changing all the "pub"s to "pubm"s and that still didn't work.
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

There's only one bind pub, which should have been changed to bind pubm. All the others? If you've changed the proc name, from pub:desc to pubm:desc that won't eventually effect the working of the script.

If the script does not work, what error do you get? Check in DCC:
.tcl set errorInfo
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

probably didnt change the mask according to what the pubm bind expects ("% !desc name")

edit: yep
photon?
User avatar
mcdarby
Halfop
Posts: 69
Joined: Tue Jul 16, 2002 7:46 pm
Location: Bangor, Pennsylvania
Contact:

Post by mcdarby »

awyeah wrote:There's only one bind pub, which should have been changed to bind pubm. All the others? If you've changed the proc name, from pub:desc to pubm:desc that won't eventually effect the working of the script.

If the script does not work, what error do you get? Check in DCC:
.tcl set errorInfo
Well, the eggdrop still isn't responding to it and there is no error messages at all. And .tcl doesn't work in DCC of the eggdrop as it goes "What?, you need help?" in response to .tcl in DCC.
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

I believe spock gave you the answer.
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Just try using the bind:

Code: Select all

bind pub - "!desc" pub:desc
And check next:
if {[string equal "Name" [lindex $arg 0]]}

Something like this:

Code: Select all

bind pub - "!desc" pub:desc

set inuse 0 

proc pub:desc {nick host hand chan arg} {
    global inuse
 if {[string equal "Name" [lindex $arg 0]]} {
    if { $inuse == 1 } {
    putquick "PRIVMSG $chan :Sorry, !desc is currently in use, please wait 30 seconds and try again"
    return
    }
    set inuse 1
    putquick "PRIVMSG $chan :Desc of Name"
    utimer 30 {set inuse 0}
    }
}
As for the .tcl command to work in DCC you have to comment the unbind directive for dcc:tcl in the bot's .conf file and then restart the bot.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
mcdarby
Halfop
Posts: 69
Joined: Tue Jul 16, 2002 7:46 pm
Location: Bangor, Pennsylvania
Contact:

Post by mcdarby »

spock wrote:probably didnt change the mask according to what the pubm bind expects ("% !desc name")

edit: yep
Yep, that was the problem, didn't realize the % needed to be in there.
Locked