Re: Ircle Script
Re: Ircle Script
- Subject: Re: Ircle Script
- From: "Stephen Swift (aka Burnum)" <email@hidden>
- Date: Thu, 22 Feb 2001 22:17:09 -0500
My Script Goals:
#1 Specify a nick to use
#2 Specify A Server to connect to
#3 Connect
#4 If connection fails switch server and repeat #3
#5 Join a channel
>
Did you know there is a list dedicated to ircle scripting? The ircle web
>
site (http://ircle.com/related.shtml) has instructions on how to subscribe.
CCing this reply to them as well
>
I'm sure I can help. What have you tried so far? What isn't working? Give
>
specifics.
Lots. Read on for the specifics.
>
You should have received a script called "events" with your ircle package.
>
To start, take a look at connectionevent().
I found the events script but couldn't find the connectionevent() handler
but took a look at the one in your e-mail.
>
>
on connectionevent(con, conevent)
>
-- con : connection number (1..10) NUMBER
>
-- con: 11 and up for dcc connections (NEW)
>
-- coneevent: one of namesearchfailed,
>
ipsearchfailed,namefound,ipfound,openfailed,established,closing,pleaseclose,
>
closed
>
tell application "ircle"
>
display ("connection " & (con as string) & " event")
>
end tell
>
end connectionevent
*NOVICE APPLESCRIPT ALERT* Handlers and I don't work together. I could
never figure them out. How do I get this handler in action?
connectionevent(5,established) ?? --> IRC doesn't do anything.
>
on numeric(con, command, thestring)
>
if (command = 376) then -- end of MOTD (server should be ready now)
>
-- send server commands
>
end if
>
return false
>
end numeric
Again I'm trying to figure out how to work it.
numeric(5,type,"server should be ready now") ??
-- send server commands - this is where I tell IRC to do stuff right?
What does return false do?
What about something like this:
Connect connection 5 -- seems to work if the server I want to use is setup
for connection 5
But if I want to specify servers it looks like I have to use:
Type "/server irc.theserver.com"
I'm trying to create a script for Ircle to do the following:
Connect to a server
And to check if the server connected could I use:
Repeat until status of connection 5 = connected
Connect connection 5
End repeat
>
If server is full connect to another server
I think I found the right component with the status
offline/namelookup/opening/connected/userclose/serverclose command but I'm
not sure how I would make AS to keep checking. A repeat loop perhaps?
Repeat until status of connection 5 = connected
Connect connection 5
End repeat
But how would I change servers if status = offline or serverclose?
Something like this perhaps?
Repeat until status of connection 5 = connected
If status of connection 5 = offline then
Type "/server dal.net"
Else
If status of connection 5 = serverclose then
Type "/server dal.net"
Else
If status of connect 5 = connected then
Type "/join #channel"
End repeat
I'm really not sure. Any ideas?
Stephen Swift ?' (The Burnum Man)
email@hidden
It9s Coming Back! AppleInfo.net - Check Back Soon
-----------------------------------------------
"Steve Jobs will use anybody to his own advantage. He will say one thing
and anybody who heard it would think that he was saying 'Maybe yes' or
'Maybe no.' You could never tell what he was thinking." -Steve Wozniak