I can't.

If the event doesn't trigger, then the if statement won't be processed.

And I believe the problem lies somewhere in the if statement itself anyway.

---

Found a minor bug in the code. Updated here:

Code:
#CaptureWhois on
raw 311:*:{ set %WhoIsResults $1- }
#CaptureWhois end

alias IsOnline {
  if ( $$1 == $null ) {
    /return $false
    /halt
  }
  /unset %WhoIsResults
  /.enable #CaptureWhois
  /whois $$1
  /.disable #CaptureWhois
  /echo Before If
  if ( !%WhoIsResults ) { /return $false  }
  /echo After If
  else { /return $true }
  /unset %WhoIsResults
}

alias test {
  /IsOnline Loki1
  if ( $result == $true ) { /echo Online }
  else { /echo Offline }
}


---

After a bit of research, I think I finally found the problem. Just not sure of the solution...

If you run the test alias, you will notice that the whois happens after the rest of the code.

I believe the /whois is not happening until after all code is being run. Is there a way to force it to wait for it to come back?

I tried creating a dummy variable, set to $true before the /whois, and set to $false in the raw. In the main code, I did a while loop to wait until the variable was $false. It never was. The code kept cycling until I broke it, and then the /whois showed.

Any ideas?

---

One last note. My objective here is to simply be able to tell if a nickname is online, even if they're not in the same room as me. If this is possible some other way, I'm open to suggestions.

Thank you so much for your help.