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.
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
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."