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.
Old posts that have not been replied to for several years.
-
t
tedbundy
Post
by tedbundy »
I'm making a little script, that makes my bot rejoin a channel, when it's status is trying (.status)
But there is one channel, I not want it to rejoin...
Code: Select all
proc chan_checkon { min hour day month year } {
foreach chan [channels] {
if {[botonchan $chan] == 0} {
if{[string tolower $chan] == "#mytestchan"} {
puthelp "PRIVMSG #mytestchan :Not listening on $chan - but not rejoining"
} else {
puthelp "PRIVMSG #mytestchan :Not listening on $chan"
}
}
}
}
I keep getting this error - think it's at the == "#mytestchan"
What should I do?
-
Xpert
- Halfop
- Posts: 88
- Joined: Mon Mar 08, 2004 7:03 am
Post
by Xpert »
Try this code:
Code: Select all
proc chan_checkon {min hour day month year} {
foreach chan [channels] {
if {[botonchan $chan] == 0} {
if{[string match -nocase "#mytestchan" "$chan"]} {
puthelp "PRIVMSG #mytestchan :Not listening on $chan - but not rejoining"
} else {
puthelp "PRIVMSG #mytestchan :Not listening on $chan"
}
}
}
}
Should worked, not tested
Xpert.
-
t
tedbundy
Post
by tedbundy »
Thanks for the quick reply - but now I recieve this error message:
Tcl error [chan_checkon]: invalid command name "if{0}"
I'm quite new at TCL so don't know what I'm doing wrong!
-
Xpert
- Halfop
- Posts: 88
- Joined: Mon Mar 08, 2004 7:03 am
Post
by Xpert »
Code: Select all
proc chan_checkon {min hour day month year} {
foreach chan [channels] {
if {![botonchan $chan]} {
if{[string match -nocase "#mytestchan" "$chan"]} {
puthelp "PRIVMSG #mytestchan :Not listening on $chan - but not rejoining"
} else {
puthelp "PRIVMSG #mytestchan :Not listening on $chan"
}
}
}
}
Xpert.
-
strikelight
- Owner
- Posts: 708
- Joined: Mon Oct 07, 2002 10:39 am
-
Contact:
Post
by strikelight »
Xpert wrote:Code: Select all
proc chan_checkon {min hour day month year} {
foreach chan [channels] {
if {![botonchan $chan]} {
if{[string match -nocase "#mytestchan" "$chan"]} {
puthelp "PRIVMSG #mytestchan :Not listening on $chan - but not rejoining"
} else {
puthelp "PRIVMSG #mytestchan :Not listening on $chan"
}
}
}
}
The error wasn't generated from
it was generated from
Code: Select all
if{[string match -nocase "#mytestchan" "$chan"]} {
There is a
space missing between the "if" and the { ...
change it to:
Code: Select all
if {[string match -nocase "#mytestchan" "$chan"]} {
-
t
tedbundy
Post
by tedbundy »
Thank you strikelight - it worked!
-
Xpert
- Halfop
- Posts: 88
- Joined: Mon Mar 08, 2004 7:03 am
Post
by Xpert »
Woops.... sorry, my computer
Xpert.
-
caesar
- Mint Rubber
- Posts: 3778
- Joined: Sun Oct 14, 2001 8:00 pm
- Location: Mint Factory
Post
by caesar »
computer?
you meant "mistake" don't you?
Once the game is over, the king and the pawn go back in the same box.
-
Xpert
- Halfop
- Posts: 88
- Joined: Mon Mar 08, 2004 7:03 am
Post
by Xpert »
Yes and no....
Xpert.
-
user
-
- Posts: 1452
- Joined: Tue Mar 18, 2003 9:58 pm
- Location: Norway
Post
by user »
Xpert wrote:Oh ****!
Please delete this flood, i didn't mean to
Blame the computer!
Have you ever read "The Manual"?
-
Xpert
- Halfop
- Posts: 88
- Joined: Mon Mar 08, 2004 7:03 am
Post
by Xpert »
lol, when i blame the computer, it returns to me (the flood above....)
Xpert.