mIRC Homepage

performing an action (whois on connect)

Posted By: state

performing an action (whois on connect) - 13/12/08 10:13 AM

Code:
on *:start: { 
  ; Sqtnet
  server 87.117.196.13
}

on *:connect: {
  ; Sqtnet 
  if (SquatNet isin $network ) {
    whois juicer
   IF JUICER IS ON THE NETWORK /JOIN #CHANNEL
   ELSE IF HE IS NOT CONNECTED DO NOTHING
  } 
}


should be easy for you lot to follow. been try for a hour or so now but i dont no how to handle the whois reply
Posted By: RusselB

Re: performing an action (whois on connect) - 13/12/08 11:54 AM

Personally, I wouldn't bother with a /whois for this, but rather use /ison or the /notify command.

For a single nick, the notify code is the one I would recommend, as it is the shortest.
For multiple nicks, I would recommend the /ison as most networks allow up to 16 nicks to be sent at one time with the /ison command.

I would only recommend the /whois code (with modification) if you wanted to join a channel that the person you /whoised was already on.

So you have code for your actual request, as well as 2 other options for you to consider.

For /ison
Code:
on *:connect:{
  if SquatNet isin $network {    .ison juicer  }
}
on *:snotice:ison*:{
  if $istok($2-,juicer,32) {    .join #channel  }
}


For notify
Code:
on *:connect:{
  if SquatNet isin $network && $notify(juicer).ison {    .join #channel  }
}


For /whois
Code:
on *:connect:{
  if SquatNet isin $network {
    .enable juicer_on
    .whois juicer
  }
}
#juicer_on off
raw 317:*:{
  if $2 == juicer {    set %juicer $true  }
  halt
}
raw 318:*:{
  .disable #juicer_on
  if %juicer {    .join #channel  }
  haltdef
}
#juicer_on end

Posted By: state

Re: performing an action (whois on connect) - 14/12/08 01:51 PM

Thank you for your reply. But am i doing something wrong?

Code:
on *:start: { 
  ; Sqtnet
  server 87.117.196.13
}

on *:connect:{
  if SquatNet isin $network && $notify(juicer).ison {    .join #squatjuice  }
}


None of the 3 are working? The other 2 i either get the whois reply but no join. or i get ison: juicer echo on ym screen
© 2022 mIRC Discussion Forums