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.

script suddenly stopped working

Support & discussion of released scripts, and announcements of new releases.
Post Reply
l
ladynikon
Voice
Posts: 5
Joined: Sat Sep 08, 2007 8:48 pm

script suddenly stopped working

Post by ladynikon »

So I am using easyspeak.tcl. Everything was working fine. I changed the channel name and wham not updating or working..
TCL v1.07

here is the script.. it is loaded properly in the config.

Code: Select all

#Edit this to who you want to activate the triggers (The default is set to 
#public, which means everyone can activate them)

set trigbind -|-

#Set the channels to where you want the triggers available
#I've set it up to allow you up to 3 channels, if you want more please
#e-mail me and let me know. :)

set channelone    "#LB-Support"
set channeltwo    ""
set channelthree  ""
#Edit these to what ever you want the trigger names to be (IE !rules or ^Help)

set trigger1 "!seeding"
set trigger2 "!forums"
set trigger3 "!pastebin"
set trigger4 "!invite"
set trigger5 "!az"

#Edit these to what ever you want to be displayed in the channel after the #trigger the has been used, (IE if trigger1 was set to !rules then change #text1 to...These are the rules ect ect).
set text1 "Seeding is a major part of any thriving torrent community.  Please see http://www.bittorrentguide.co.uk/whyseed.html"
set text2 "Please check out the forums! http://www.learnbits.org/forums.php"
set text3 "Please paste your issue here -- > http://pastie.caboo.se Paste the link that is created into our channel :)."
set text4 "text here"
set text5 "Please see http://www.foo.com"
#Just comment out the "die" line with a #
#I put it here as a small reminder to edit this script.
#die "* [file tail [info script]]: Forgot to edit this script didn't you?"


#*******************************************************************************
*********

#DO NOT CHANGE ANYTHING BELOW HERE

#*******************************************************************************
*********

bind pub $trigbind $trigger1 text-1
bind pub $trigbind $trigger2 text-2
bind pub $trigbind $trigger3 text-3
bind pub $trigbind $trigger4 text-4
bind pub $trigbind $trigger5 text-5

proc text-1 {n u h c a }  {
global channelone
global channeltwo
global channelthree
global text1
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text1"
}
return 0
}

proc text-2 {n u h c a}  {
global channelone
global channeltwo
global channelthree
global text2
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text2"
}
return 0
}

proc text-3 {n u h c a}  {
global channelone
global channeltwo
global channelthree
global text3
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text3"
}
return 0
}

proc text-4 {n u h c a}  {
global channelone
global channeltwo
global channelthree
global text4
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text4"
}
return 0
}

proc text-5 {n u h c a}  {
global channelone
global channeltwo
global channelthree
global text5
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
puthelp "PRIVMSG $c :$text5"
}
return 0
}

putlog "* [file tail [info script]] by Dalanx loaded."

Have fun storming the castle!
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

a
arcanedreams
Voice
Posts: 9
Joined: Thu Sep 06, 2007 2:48 am

Post by arcanedreams »

my guess would be because you have the # before the channel name, which would comment out the rest of that line (I think..I'm new)


Just try removing the #

From this:

Code: Select all

set channelone    "#LB-Support" 
To this:

Code: Select all

set channelone    "LB-Support" 
If that doesn't work, go through and change all the if statements.

This second method will make the bot respond to every channel it is in regardless of what channels you set in the beginning of the script!

Change all of these:

Code: Select all

if {$c == $channelone || $c == $channeltwo || $c == $channelthree}
To this:

Code: Select all

if {$c == $c}
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Could be a problem with different cases. Change

Code: Select all

if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {
to

Code: Select all

if {[string equal -nocase $c $channelone] || [string equal -nocase $c $channeltwo] || [string equal -nocase $c $channelthree]} {
l
ladynikon
Voice
Posts: 5
Joined: Sat Sep 08, 2007 8:48 pm

Post by ladynikon »

arcanedreams wrote:my guess would be because you have the # before the channel name, which would comment out the rest of that line (I think..I'm new)


Just try removing the #

From this:

Code: Select all

set channelone    "#LB-Support" 
To this:

Code: Select all

set channelone    "LB-Support" 
If that doesn't work, go through and change all the if statements.

This second method will make the bot respond to every channel it is in regardless of what channels you set in the beginning of the script!

Change all of these:

Code: Select all

if {$c == $channelone || $c == $channeltwo || $c == $channelthree}
To this:

Code: Select all

if {$c == $c}
Well in vi the line didn't change color to specify a commented out line. AND it worked fine with that naming scheme. I entire script worked fine then boom nothing.
Have fun storming the castle!
l
ladynikon
Voice
Posts: 5
Joined: Sat Sep 08, 2007 8:48 pm

Post by ladynikon »

So.. I looked at the forum you suggested. I have a few questions...
.set errorInfo
What? You need '.help'
.set errorinfo
What? You need '.help'

According to that forum. Those should work because .set is uncommented.

What is the purpose of the moving the brackets around when posting?

Thanks,
LN
Have fun storming the castle!
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

ladynikon wrote: .set errorInfo
What? You need '.help'
.set errorinfo
What? You need '.help'

According to that forum. Those should work because .set is uncommented.
if you uncommented "#unbind dcc n set *dcc:set" in the conf, then the .set command will NOT work (that is why it is called with UNBIND)
it must be commented out to work
User avatar
YooHoo
Owner
Posts: 939
Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast

Post by YooHoo »

arcanedreams wrote:my guess would be because you have the # before the channel name, which would comment out the rest of that line (I think..I'm new)
good guess, unfortunately a wrong one. Tcl will interpret anything enclosed within "quotation marks" as pure text, even a hash symbol.
l
ladynikon
Voice
Posts: 5
Joined: Sat Sep 08, 2007 8:48 pm

Post by ladynikon »

DragnLord wrote:
ladynikon wrote: .set errorInfo
What? You need '.help'
.set errorinfo
What? You need '.help'

According to that forum. Those should work because .set is uncommented.
if you uncommented "#unbind dcc n set *dcc:set" in the conf, then the .set command will NOT work (that is why it is called with UNBIND)
it must be commented out to work
Sorry my dislexia kicked in. I thought it said it has to be uncommented.

So I decided to give up on what was wrong. I just redownloaded the script and overwrote the fubared one. meh.
Last edited by ladynikon on Sun Sep 09, 2007 3:01 pm, edited 1 time in total.
Have fun storming the castle!
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

ladynikon wrote:
According to that forum. Those should work because .set is uncommented.
Change the unbind to bind, to enable the .set command. Or comment it out and do a restart to enable it.
What is the purpose of the moving the brackets around when posting?
Not sure I understand your question, what brackets?
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Cleaned up that mess a little, could do other things but, this should be good enough:

Code: Select all

# trigger permissions  
set trigbind -|-

# Set the channels to where you want the triggers available
# It's now case-insensitive.
set pubchanlist "#LB-Support #channel2 #etc"        

# Edit these to what ever you want the trigger names to be (IE !rules or ^Help)
set trigger1 "!seeding"
set trigger2 "!forums"
set trigger3 "!pastebin"
set trigger4 "!invite"
set trigger5 "!az"
 
#Edit these to what ever you want to be displayed in the channel.
set text(1) "blah blah blah"
set text(2) "Please check out the forums!"
set text(3) "Deleted for brevity"
set text(4) "text here"
set text(5) "Please see http://www.foo.com"
 
# code below

bind pub $trigbind $trigger1 text-1
bind pub $trigbind $trigger2 text-2
bind pub $trigbind $trigger3 text-3
bind pub $trigbind $trigger4 text-4
bind pub $trigbind $trigger5 text-5

set pubchanlist [string tolower $pubchanlist]

proc text-1 {n u h c a }  {
        global pubchanlist text
        set c [string tolower $c]
        if {[lsearch -exact $pubchanlist $c] == -1} {return}
        puthelp "PRIVMSG $c :$text(1)"
}
        
proc text-2 {n u h c a}  {
        global pubchanlist text
        set c [string tolower $c]
        if {[lsearch -exact $pubchanlist $c] == -1} {return}
        puthelp "PRIVMSG $c :$text(2)"
}

proc text-3 {n u h c a}  {
        global pubchanlist text
        set c [string tolower $c]  
        if {[lsearch -exact $pubchanlist $c] == -1} {return}
        puthelp "PRIVMSG $c :$text(3)"
}
        
proc text-4 {n u h c a}  {
        global pubchanlist text
        set c [string tolower $c]
        if {[lsearch -exact $pubchanlist $c] == -1} {return}
        puthelp "PRIVMSG $c :$text(4)"
}
        
proc text-5 {n u h c a}  {
        global pubchanlist text
        set c [string tolower $c]
        if {[lsearch -exact $pubchanlist $c] == -1} {return}
        puthelp "PRIVMSG $c :$text(5)"
}
        
putlog "* blah blah script loaded.."
Post Reply