
Well, my irc channel is moving networks on friday, so i need to quickly code a script to announce this to people. I made the script below, but since this is using two bits of code i never used before, i am not sure if they will work. Since i cant test on my bot, without proving to be a pain in the ass to channel users, i would ask if any of you can check this for me?
Code: Select all
#Cometanime Network move script
set chanl(main) "#weirdo"
set network "irc.faereal.net"
set notice(onjoin) "Welcome to the Old Cometanime IRC Channel. The channel is in a process of moving to $network . All channel services being moved to there. Do !info in channel and I will send you information on how to set your client up, and how to connect to the new network"
set notice(public) "The #cometanime Membership have moved to the new #cometanime channel on $network .Hope to see you there. For help on accessing the new channel, do !info in the public channel."
bind join - "$chanl(main) *" join:onchanjoin
proc join:onchanjoin {nick uhost hand chan} {
global chanl network notice
putserv "Notice $nick :$notice(onjoin)"
putlog "$nick just joined $chanl(main)"
}
proc pubnotice {} {
global chanl network notice
for {set number 1} {} {} {
timer 15 [putserv "Notice $chanl(main) :$notice(public)
}
putlog "Notice Applied to $chanl(main)"
}
... just confused me more. As i not sure if this is the right one i need. Want it to keep running, but wait for 15 mins between displaying the messages. Would a while loop work better?*The syntax of a [for] command is [for { <start> } { <check> } { <loop> } { <body> }].*
The <start> is the command you want to be executed before the loop starts.
This can be setting a string to 0 for instance.
The <check> is the check that is made while the loop is running and works in the same way as the
check in the [while] loop.
The <loop> is the command you want to be executed every time a loop has ended.
This can be increasing a string with 1 for instance.
I have chanserv doing the on join msg, but since that is why we moving, chanserv is buggy, well i making an onjoin thing anyway.
Thank you in advance
Seb [/code]