mIRC Home    About    Download    Register    News    Help

Topic Options
#207315 - 13/12/08 10:13 AM performing an action (whois on connect)
state Offline
Vogon poet

Registered: 17/06/04
Posts: 133
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

Top
#207318 - 13/12/08 11:54 AM Re: performing an action (whois on connect) [Re: state]
RusselB Offline
Planetary brain

Registered: 03/08/04
Posts: 7252
Loc: Ontario, Canada
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


Top
#207353 - 14/12/08 01:51 PM Re: performing an action (whois on connect) [Re: state]
state Offline
Vogon poet

Registered: 17/06/04
Posts: 133
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

Top