mIRC Home    About    Download    Register    News    Help

Print Thread
#226493 03/10/10 07:48 AM
Joined: Jun 2009
Posts: 11
F
feisu Offline OP
Pikka bird
OP Offline
Pikka bird
F
Joined: Jun 2009
Posts: 11
I want to write a simple script that help me check if someone online. e.g when typing /whois User333 . if Mirc returns User333 No such nick/channel then Halt. but if it return with User333 is ****** which means this nick is online then msg User333 Hello.

make it easy is to check if a nick online. if online. msg the nick. if not do nothing.

I dont know how to catch raw event or echo event. as whois return in status windows. Hope I make my question clear. thanks.

feisu #226501 03/10/10 12:42 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Why not just message the nick? If online, it will send. If not, you'll get an error.


Invision Support
#Invision on irc.irchighway.net
Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
U could also use:
Code:
alias UserIsOn {
  $+(.timerISON,$cid,:,$$1) 1 10 echo 04 -a $1 is not online
  .ison $1
}
raw 303:*:{
  if ($2 != :) && ($timer($+(ISON,$cid,$2))) {
    $+(.timer,ison,$cid,$2) off
    echo 12  -a $right($2,-1) is online
    haltdef
  }
}


The only issue is that if the nick isn't online, the message "ison: no such user" will be displayed in ur status

Last edited by FroggieDaFrog; 03/10/10 04:41 PM.

I am SReject
My Stuff
Joined: Aug 2010
Posts: 69
N
Babel fish
Offline
Babel fish
N
Joined: Aug 2010
Posts: 69
I think this might be more of what you need.

Code:
raw 311:*: { iison $2 }
alias iison {
  if ($1 == on) { %ison = $true }
  elseif ($1 == off) { %ison = $false }
  elseif ($1 != on) && ($1 != off) {
    if (%ison == $true) { .timer $+ $nick 1 1 query $1 Hello there! }
  }
}
menu nicklist,channel,query,status {
  Auto Messager $iif(%ison == $true,ON,OFF)
  .ON:iison on
  .OFF:iison off
}


You can turn it on or off through you pop-up menus and whenever you do a /whois on someone, if they are online, it automatically opens a message window and sends the user the message "Hello there!"


"There is no theory of evolution, only a list of creatures Chuck Norris allows to live."

Link Copied to Clipboard