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 

Creating a Script for moving networks and informing users

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
Weirdo
Master


Joined: 27 Apr 2002
Posts: 265
Location: Manchester, England

PostPosted: Wed Jan 01, 2003 9:33 pm    Post subject: Creating a Script for moving networks and informing users Reply with quote

hello Smile

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:

#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)"
}


The For loop is quite confusing to me. Have never got the hang of loops before, and this:

Quote:

*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.


... 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?

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]
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive 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