Yahoo Visibility Checker (not invisibile)

By evil-critter on Feb 04, 2010

Copy the code
open mirc
open mIRC's Remotes Section
paste code into empty remote file
click ok
right click on status screen to get a popup opening the dialog.
in the dialog, enter a persons name then click on Check Button.
The drop down containing #'s 1-16 are for different gif images on the yahoo side, sent in response to querying a persons status.
I have it set where mirc reads the socket info, using a "binvar", it simply write the info into a file called "online.gif" , the numbers 1 - 16 were all i could get to work on mirc, there are 24 responses both for on and offline. As is this works 100%, i found nothing wrong with it.
I made it myself and have no testers.

TYVM Fordlawnmower, you're absolutely right, it's pretty sloppy on my part. I changed those things you mentioned the 'remove' has a dot to silence it, no more echoing it out, and the -t switch on the sockwrite.
If you check those pages, somehow they dont seem to have headers, I use firefox to try an view the source and i couldnt, the 1st thing in the sockread is GIF89a on every read shrug.
It just makes it easier to parse, (no parsing), i just read it all straight to a file.
Do you think you can tell me why when i try to use the images above 16 mirc gives me this error?
/did: 'yvisible' error loading 'C:\Documents and Settings\Default\Desktop\mIRC\online.gif'
there are 8 more images yahoo uses , or 16 more actually for online offline, 24 in all, i can only get the 16 to work without error.
Thanks again.

menu status {  
  Yahoo Visible Checker:/dialog -m yvisible yvisible 
}
dialog YVisible {
  title "Y! Visibility Check"
  size -1 -1 195 208
  option pixels notheme
  edit "", 1, 2 150 138 20, edit autohs
  button "Check", 2, 3 176 65 25
  icon 4, 24 5 139 138
  button "Close", 3, 127 176 65 25, ok cancel
  combo 5, 143 151 52 70, edit drop
}
on *:dialog:yvisible:init:0: {
  var %visb 1
  while (%visb <= 16) {   
    did -i yvisible 5 %visb %visb
    inc %visb 
  }
  did -i yvisible 5 0 8
}
on *:dialog:yvisible:sclick:2: { $iif($did(yvisible,1).text == $null,echo -a You Must Enter A Name To Check On!,vischeck) }
alias vischeck { if ($exists(online.gif)) { .remove online.gif } | sockopen vischeck mail.opi.yahoo.com 80 }
on *:sockopen:vischeck: sockwrite -t vischeck $+(GET /online?u=,$did(yvisible,1).text,&m=g&t=,$did(yvisible,5).seltext,$crlf,$crlf)
on *:sockread:vischeck: {
  if ($sockerr > 0) return 
  sockread &ysl 
  bwrite online.gif -1 -1 &ysl
}
on *:sockclose:vischeck: { did -g yvisible 4 0 online.gif }

Comments

Sign in to comment.
FordLawnmower   -  Feb 04, 2010

You should put a dot(.) in front of this line -->> remove online.gif <<-- to keep it from echoing each time it removes a file.
You also need to put -t in the sockwrite statement.
This:

on *:sockopen:vischeck: sockwrite vischeck $+(GET /online?u=,$did(yvisible,1).text,&m=g&t=,$did(yvisible,5).seltext,$crlf,$crlf)

Should be this:

on *:sockopen:vischeck: sockwrite -t vischeck $+(GET /online?u=,$did(yvisible,1).text,&m=g&t=,$did(yvisible,5).seltext,$crlf,$crlf)

By default mIRC will treat anything that starts with & in a sockwrite as a binary variable, so &m=g&t= is resolved to $null $null. It doesn't seem to hurt the script but it would break it if m= and t= were needed. -t makes it treat everything as plain text.

You got it to work though and you did it with some style. Pictures instead of text, you certainly aren't a minimalist.

Intresting that this works without a Host: line and without removing the headers from the pictures.

I don't use Yahoo, but it would be a nice project to make a "friends tracker" script that pops up when one of your friends Goes offline/online.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.