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.
-
sever
- Voice
- Posts: 9
- Joined: Sat Mar 27, 2004 8:04 pm
Post
by sever »
hi, i have a problem.
that is my script
set msgchans "#sever #sauger"
set msgtext "test"
bind time - "00 * * * *" msgmode
bind time - "05 * * * *" msgmode
bind time - "10 * * * *" msgmode
bind time - "15 * * * *" msgmode
bind time - "20 * * * *" msgmode
bind time - "25 * * * *" msgmode
bind time - "30 * * * *" msgmode
bind time - "35 * * * *" msgmode
bind time - "40 * * * *" msgmode
bind time - "45 * * * *" msgmode
bind time - "50 * * * *" msgmode
bind time - "55 * * * *" msgmode
proc msgmode {min hour day month year} {
global msgtext
putserv "PRIVMSG $msgchans :$::msgtext"
}
i need the script in more than one channels.
-
strikelight
- Owner
- Posts: 708
- Joined: Mon Oct 07, 2002 10:39 am
-
Contact:
Post
by strikelight »
sever wrote:hi, i have a problem.
that is my script
set msgchans "#sever #sauger"
set msgtext "test"
bind time - "00 * * * *" msgmode
bind time - "05 * * * *" msgmode
bind time - "10 * * * *" msgmode
bind time - "15 * * * *" msgmode
bind time - "20 * * * *" msgmode
bind time - "25 * * * *" msgmode
bind time - "30 * * * *" msgmode
bind time - "35 * * * *" msgmode
bind time - "40 * * * *" msgmode
bind time - "45 * * * *" msgmode
bind time - "50 * * * *" msgmode
bind time - "55 * * * *" msgmode
proc msgmode {min hour day month year} {
global msgtext
putserv "PRIVMSG $msgchans :$::msgtext"
}
i need the script in more than one channels.
This is because the IRC protocol does not work how you want it to...
Some IRCD's allow targets seperated by commas....
ie
But to be safer from flood exemptions, and ircd's that don't support targets seperated by commas, you will need to walk through a list (ie.
loop)....
Code: Select all
foreach chan [split $msgchans] {
putserv "PRIVMSG $chan :$::msgtext"
}
-
sever
- Voice
- Posts: 9
- Joined: Sat Mar 27, 2004 8:04 pm
Post
by sever »
putlog "Script loaded: test"
set msgchans "#sever,#sauger"
set msgtext "test"
bind time - "00 * * * *" msgmode
bind time - "05 * * * *" msgmode
bind time - "10 * * * *" msgmode
bind time - "15 * * * *" msgmode
bind time - "20 * * * *" msgmode
bind time - "25 * * * *" msgmode
bind time - "30 * * * *" msgmode
bind time - "35 * * * *" msgmode
bind time - "40 * * * *" msgmode
bind time - "45 * * * *" msgmode
bind time - "50 * * * *" msgmode
bind time - "55 * * * *" msgmode
proc msgmode {min hour day month year} {
global msgtext
foreach chan [split $msgchans] {
putserv "PRIVMSG $chan :$::msgtext"
}
}
doesnt work!
Tcl error [msgmode]: can't read "msgchans": no such variable
-
strikelight
- Owner
- Posts: 708
- Joined: Mon Oct 07, 2002 10:39 am
-
Contact:
Post
by strikelight »
You've global'd the wrong variable... you would have been getting that error in the previous code you posted as well.
Also, I didn't say use both the "comma" method and the "loop" method... I said the "loop" method is better and safer than the "comma" method.
-
sever
- Voice
- Posts: 9
- Joined: Sat Mar 27, 2004 8:04 pm
Post
by sever »
set msgchans "#sever #sauger"
set msgtext "test"
bind time - "00 * * * *" msgmode
bind time - "05 * * * *" msgmode
bind time - "10 * * * *" msgmode
bind time - "15 * * * *" msgmode
bind time - "20 * * * *" msgmode
bind time - "25 * * * *" msgmode
bind time - "30 * * * *" msgmode
bind time - "35 * * * *" msgmode
bind time - "40 * * * *" msgmode
bind time - "45 * * * *" msgmode
bind time - "50 * * * *" msgmode
bind time - "55 * * * *" msgmode
proc msgmode {min hour day month year} {
global msgtext msgchans
foreach chan [split $msgchans] {
putserv "PRIVMSG $chan :$::msgtext"
}
}
work
thx 4 help.
-
caesar
- Mint Rubber
- Posts: 3776
- Joined: Sun Oct 14, 2001 8:00 pm
- Location: Mint Factory
Post
by caesar »
Code: Select all
bind time - "00 * * * *" msgmode
bind time - "?5 * * * *" msgmode
Once the game is over, the king and the pawn go back in the same box.
-
dollar
- Op
- Posts: 178
- Joined: Tue Oct 28, 2003 3:47 pm
- Location: Netherlands
Post
by dollar »
caesar wrote:Code: Select all
bind time - "00 * * * *" msgmode
bind time - "?5 * * * *" msgmode
Code: Select all
bind time - "?0 * * * *" msgmode
bind time - "?5 * * * *" msgmode
![Cool 8)](./images/smilies/icon_cool.gif)
dollar (or something similar) at:
#eggdrop / #tcl - undernet
#egghelp / #tcl / #eggtcl - efnet
#eggdrop.support / #tcl - quakenet
#eggdrop - ircnet
-
caesar
- Mint Rubber
- Posts: 3776
- Joined: Sun Oct 14, 2001 8:00 pm
- Location: Mint Factory
Post
by caesar »
Oups..
![Razz :P](./images/smilies/icon_razz.gif)
forgot to place an "?" there
![Smile :)](./images/smilies/icon_smile.gif)
Once the game is over, the king and the pawn go back in the same box.
-
strikelight
- Owner
- Posts: 708
- Joined: Mon Oct 07, 2002 10:39 am
-
Contact:
Post
by strikelight »
dollar wrote:caesar wrote:Code: Select all
bind time - "00 * * * *" msgmode
bind time - "?5 * * * *" msgmode
Code: Select all
bind time - "?0 * * * *" msgmode
bind time - "?5 * * * *" msgmode
![Cool 8)](./images/smilies/icon_cool.gif)
Code: Select all
bind time - "?0*" msgmode
bind time - "?5*" msgmode