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 desc script problems again

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 desc script problems again

Post by mcdarby »

Right now, I have it working with the following script.

Code: Select all

bind pubm -|- "% !desc Name" pubm:desc 

set inuse 0 

proc pubm: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} 
}
But then when I make changes to the message and .rehash the eggdrop, somehow the utimer messes up and it causes both msgs to show when I try it. Also, I was trying it with multiple .tcl files so that it would respond differently to whatever is typed after !desc "!desc Name, !desc somethingelse, etc." and this problem came up with .TCL error about wrong # of args.
User avatar
YooHoo
Owner
Posts: 939
Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast

Post by YooHoo »

change your 'putquick' to puthelp. should slow it down enough :mrgreen:
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

That's not what he asked for yoohoo..

And i recommend you use the utimer like this:

Code: Select all

utimer 30 [list set inuse "0"]
User avatar
YooHoo
Owner
Posts: 939
Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast

Post by YooHoo »

:lol: how is it i read a thread 2,3, somethimes 4 times before i post....ffs, got a beer, MeTroiD? :lol:
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Something like this is also correct:

Code: Select all

utimer 30 "set inuse \"0\""
Though if you're calling procs you should use the 'list' command, yeah. In this case it can be done without it, also putserv, putquick, pushmode etc.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Locked