| View previous topic :: View next topic |
| Author |
Message |
sk-4 Halfop
Joined: 06 Oct 2007 Posts: 51
|
Posted: Thu May 21, 2009 11:29 am Post subject: yahoo online checker |
|
|
seem the tcl not working,even the user offline it showing online
# __
# / /
# ____/ /_____
# / __ // ___/
# / /_/ // /___
# \____/ \____/
# This script will check the Yahoo Messenger status (available/invisible/online). Script active on all eggdrop channels.
# Nothing to set. Just load the script and enjoy.
# Commands:
# !id <the_id>
# or
# !ym <the_id>
# This is the one and only version. Nothing to upgrade.
# Contact: dc@rock.com
package require http
bind pub -|- !id yahoo:status
bind pub -|- !ym yahoo:status
proc yahoo:status {nick host hand chan arg} {
set yahooid [join [lindex [split $arg] 0]]
set token [http::config -useragent "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"]
set token [http::geturl "http://www.invisible-scanner.com/?yid=$yahooid"]
set html [http::data $token]
putlog "Checking online status for $yahooid."
if {[string match "*Online*" $html]} {
puthelp "PRIVMSG $chan :$yahooid is Online!"
return 0
}
if {[string match "*Offline*" $html]} {
puthelp "PRIVMSG $chan :$yahooid is Offline!"
return 0
}
if {[string match "*Invisible*" $html]} {
puthelp "PRIVMSG $chan :$yahooid is Invisible!"
return 0
}
if {[string match "*Server is busy*" $html]} {
puthelp "PRIVMSG $chan :Server is busy, try later!"
return 0
}
}
putlog "Yahoo Messenger Status Checker loaded sucessfully."
# __
# / /
# ____/ /_____
# / __ // ___/
# / /_/ // /___
# \____/ \____/ |
|
| Back to top |
|
 |
arfer Master

Joined: 26 Nov 2004 Posts: 436 Location: Manchester, UK
|
Posted: Thu May 21, 2009 1:31 pm Post subject: |
|
|
I have tried the URL manually and can't seem to get it to work, so presumably that is the problem.
In any event I noticed that you have the author's email address in the script comments. _________________ I must have had nothing to do |
|
| Back to top |
|
 |
sk-4 Halfop
Joined: 06 Oct 2007 Posts: 51
|
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Thu May 21, 2009 9:16 pm Post subject: |
|
|
| Code: | var url="ans2.php"
params="user="+user
//if (isId) params=params+"&isId=1"
//if (isOnline) params=params+"&isOnline=1"
params=params+"&isOnline=1"
//if (isAvatar) params=params+"&isAvatar=1"
params=params+"&isAvatar=1"
params=params+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged
xmlHttp.open("POST",url,true)
xmlHttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
xmlHttp.send(params);
|
Above you can clearly see the variable url is actually pointing at http://www.invisible-scanner.com/ans2.php. Then it sets the variable params (the query) using a few evaluations and a few hardcoded. It then sends off an Xmlhttp (ajax) request to wait for the new information to display. In this way it doesn't need to refresh the entire page (showing you a blank page while it loads), it can display a cute little ajax spinning image while the request is being handled. Then once the reply is returned the data can be scrubbed into the page. The script your using relies on simple get queries and isn't using post queries. It also doesn't properly set up an XML header request, nor supply the params we see now used above. The script would need to be retooled to supply these now required fields before it can function again. _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
|