Irccontrol.iss scripting help.

Cr4zyb4rd

Active Member
Ok, I've been accused of being a bully lately for making comments like this, but c'mon, where you dropped on your head? How in the world is this a "feature request", even granted that you failed to read the very recently posted and stickied message asking people to stop posting script-related issues there.

Moved to the scripts forum.

Code:
but if someone can give me some hints or examples
hints: read the wiki. read these forums.

examples: A B C
 

eqjoe

Active Member
Code:
function main()
{

 do
 { 
    if !${IRC(exists)}
    {
      execute ext isxirc
    }
  
    if !${Script[irc](exists)}
    {
       runscript irc
    }
  waitframe
 }
 while ${ISXVG(exists)}
 
}

Of course you would want to use a different while condition if you are not running ISXVG....
And of course if your ISXIRC wrapper script is not named "irc.iss"......

-j
 

eqjoe

Active Member
Well, that is how you would make sure that your wrapper script stays loaded. Any error in your wrapper script will cause it to crash and this would reconnect you in that case.

What you want to do is check your server and reconnect if needed.

Check
Code:
${IRCUser[${MyNick}].Server}
and do
Code:
IRC:Connect[${MyServer},${MyNick}]
if needed.

-j
 

Amadeus

The Maestro
Staff member
Just as a FYI for my extensions (since I use a patcher), one slight modification:

Code:
function main()
{
 
[COLOR=darkred] if (${ISXVG(exists)} && !${ISXVG.IsReady})
 {
     do
     { 
        waitframe
     }
     while !${ISXVG.IsReady}
 }[/COLOR]
 
 do
 { 
    if !${IRC(exists)}
    {
      execute ext isxirc
    }
 
    if !${Script[irc](exists)}
    {
       runscript irc
    }
  waitframe
 }
 while ${ISXVG(exists)}
 
}
 

jelsea

Active Member
Amadeus said:
Just as a FYI for my extensions (since I use a patcher), one slight modification:

Code:
function main()
{
 
[COLOR=darkred] if (${ISXVG(exists)} && !${ISXVG.IsReady})
 {
     do
     { 
        waitframe
     }
     while !${ISXVG.IsReady}
 }[/COLOR]
 
 do
 { 
    if !${IRC(exists)}
    {
      execute ext isxirc
    }
 
    if !${Script[irc](exists)}
    {
       runscript irc
    }
  waitframe
 }
 while ${ISXVG(exists)}
 
}
I havn't been able to get the above to work, is there a certain spot in the "function main" part that I need to put that. So far I put it at he bottom of the function main and dosnt' seem to be working.
 

jelsea

Active Member
eqjoe said:
Well, that is how you would make sure that your wrapper script stays loaded. Any error in your wrapper script will cause it to crash and this would reconnect you in that case.

What you want to do is check your server and reconnect if needed.

Check
Code:
${IRCUser[${MyNick}].Server}
and do
Code:
IRC:Connect[${MyServer},${MyNick}]
if needed.

-j
eqjoe, does this look ok to you?

Code:
	if ${IRCUser[${MyNick}].Server}
	 {
		do
		{
		IRC:Connect[${MyServer},${MyNick}]
		wait 5
		IRCUser[${MyNick}]:Join[${MyChan1}]
		}
	 while ${ISXVG(exists)}
	 }
 
Last edited:
Top Bottom