egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

script suddenly stopped working

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
ladynikon
Voice


Joined: 08 Sep 2007
Posts: 5

PostPosted: Sat Sep 08, 2007 11:42 pm    Post subject: script suddenly stopped working Reply with quote

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:

#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!
Back to top
View user's profile Send private message AIM Address
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Sat Sep 08, 2007 11:45 pm    Post subject: Reply with quote

http://forum.egghelp.org/viewtopic.php?t=10215
Back to top
View user's profile Send private message
arcanedreams
Voice


Joined: 06 Sep 2007
Posts: 9

PostPosted: Sun Sep 09, 2007 12:23 am    Post subject: Reply with quote

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:
set channelone    "#LB-Support"


To this:
Code:
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:

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


To this:
Code:

if {$c == $c}
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Sep 09, 2007 6:31 am    Post subject: Reply with quote

Could be a problem with different cases. Change
Code:
if {$c == $channelone || $c == $channeltwo || $c == $channelthree} {

to
Code:
if {[string equal -nocase $c $channelone] || [string equal -nocase $c $channeltwo] || [string equal -nocase $c $channelthree]} {

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
ladynikon
Voice


Joined: 08 Sep 2007
Posts: 5

PostPosted: Sun Sep 09, 2007 7:45 am    Post subject: Reply with quote

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:
set channelone    "#LB-Support"


To this:
Code:
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:

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


To this:
Code:

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!
Back to top
View user's profile Send private message AIM Address
ladynikon
Voice


Joined: 08 Sep 2007
Posts: 5

PostPosted: Sun Sep 09, 2007 8:22 am    Post subject: Reply with quote

rosc2112 wrote:
http://forum.egghelp.org/viewtopic.php?t=10215


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!
Back to top
View user's profile Send private message AIM Address
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Sun Sep 09, 2007 11:38 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
YooHoo
Owner


Joined: 13 Feb 2003
Posts: 939
Location: Redwood Coast

PostPosted: Sun Sep 09, 2007 1:08 pm    Post subject: Reply with quote

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.
_________________
Mr. Green
Johoho's TCL for beginners
Mr. Green
Back to top
View user's profile Send private message Send e-mail
ladynikon
Voice


Joined: 08 Sep 2007
Posts: 5

PostPosted: Sun Sep 09, 2007 1:53 pm    Post subject: Reply with quote

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.
_________________
Have fun storming the castle!


Last edited by ladynikon on Sun Sep 09, 2007 3:01 pm; edited 1 time in total
Back to top
View user's profile Send private message AIM Address
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Sun Sep 09, 2007 2:20 pm    Post subject: Reply with quote

ladynikon wrote:
rosc2112 wrote:
http://forum.egghelp.org/viewtopic.php?t=10215

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.
Quote:

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

Not sure I understand your question, what brackets?
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Sun Sep 09, 2007 2:39 pm    Post subject: Reply with quote

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

# 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.."
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber