| View previous topic :: View next topic |
| Author |
Message |
pogue Voice

Joined: 17 May 2009 Posts: 28
|
Posted: Tue Mar 01, 2011 3:53 am Post subject: |
|
|
Mygamercard has bit the dust, so this script is now null and void.
http://www.mygamercard.net/ _________________ Helpful Tools:
|
|
| Back to top |
|
 |
stefftastiq Voice
Joined: 07 May 2010 Posts: 6
|
Posted: Mon Dec 05, 2011 6:46 am Post subject: |
|
|
anyone know of any alternative scripts? which works?  |
|
| Back to top |
|
 |
bAN01TgAZ Voice
Joined: 30 Sep 2012 Posts: 1 Location: UK
|
Posted: Sun Sep 30, 2012 1:08 pm Post subject: working code |
|
|
| Code: | #####################################################
## Xbox Live GamerTag Status' by Danneh/GrimReaper ##
#####################################################
## Initial Setup ##
#####################################################
set xblchar "."
#####################################################
## End Setup ##
#####################################################
proc xblinfo {nick host hand chan search} {
if {[lsearch -exact [channel info $chan] +xblinfo] != -1} {
set xbllogo "\0039X\00314box Live\003"
set xblsite "Live.xbox.com"
set xblstatusfound "0"
if {$search == ""} {
putserv "PRIVMSG $chan :$xbllogo, Please enter a GamerTag to search for.."
} else {
set xblsrcurl1 [urlencode [regsub -all { } $search +]]
set xblsrcurl2 [encurl $search]
set xblsrcurl3 "/en-GB/Profile?gamertag=${xblsrcurl2}"
if {[catch {set xblsrcsock [socket -async $xblsite 80]} sockerr]} {
return 0
} else {
puts $xblsrcsock "GET $xblsrcurl3 HTTP/1.0"
puts $xblsrcsock "Host: $xblsite"
puts $xblsrcsock "User-Agent: Opera 9.6"
puts $xblsrcsock ""
flush $xblsrcsock
while {![eof $xblsrcsock]} {
set xblstatus "[gets $xblsrcsock]"
if {$xblstatusfound == "on"} {
putserv "PRIVMSG $chan :$xbllogo status for \0037$search\003: [xblstrip [string trimleft [recode "${xblstatus}"]]]"
close $xblsrcsock
return 0
}
if {[regexp -all {<div class="custom">} $xblstatus]} {
set xblstatusfound "on"
}
}
putserv "PRIVMSG $chan :Sorry, I couldn't find \0037$search\003 on $xbllogo"
close $xblsrcsock
return 0
}
}
}
}
proc xblgsinfo {nick host hand chan search} {
if {[lsearch -exact [channel info $chan] +xblinfo] != -1} {
set xbllogo "\0039X\00314box Live\003"
set xblsite "Live.xbox.com"
if {$search == ""} {
putserv "PRIVMSG $chan :$xbllogo, Please enter a GamerTag to search GamerScore for.."
} else {
set xblsrcurl1 [urlencode [regsub -all { } $search +]]
set xblsrcurl2 [encurl $search]
set xblsrcurl3 "/en-GB/Profile?gamertag=${xblsrcurl2}"
if {[catch {set xblsrcsock [socket -async $xblsite 80]} sockerr]} {
return 0
} else {
puts $xblsrcsock "GET $xblsrcurl3 HTTP/1.0"
puts $xblsrcsock "Host: $xblsite"
puts $xblsrcsock "User-Agent: Opera 9.6"
puts $xblsrcsock ""
flush $xblsrcsock
while {![eof $xblsrcsock]} {
set xblstatus "[gets $xblsrcsock]"
if {[regexp -all {<div class="gamerscore">(.*?)</div>} $xblstatus match xblgamerscore]} {
putserv "PRIVMSG $chan :$xbllogo GamerScore for \0037$search\003: $xblgamerscore"
close $xblsrcsock
return 0
}
}
putserv "PRIVMSG $chan :Sorry, I couldn't find \0037$search\003 on $xbllogo"
close $xblsrcsock
return 0
}
}
}
}
proc encurl {string} {
return [string map {" " %20} "$string"]
}
proc xblstrip {string} {
return [regsub -all {<[^<>]+>} $string ""]
}
proc urlencode {string} {
return [subst [regsub -nocase -all {([^a-z0-9+])} $string {%[format %x [scan "\\&" %c]]}]]
}
proc recode { textin } {
return [string map {" \" · · & &} [subst [regsub -nocase -all {&#([0-9]{1,5});} $textin {\u\1}]]]
}
bind pub - ${xblchar}xbl xblinfo
bind pub - ${xblchar}xblgs xblgsinfo
setudef flag xblinfo
putlog "Xbox Live Gamertag status' by Danneh/GrimReaper" |
use telnet and set | Code: | | .chanset #chanelname +xblinfo |
usage :
.xbl gamertag
.xblgs gamertag |
|
| Back to top |
|
 |
doubleu Voice
Joined: 10 Feb 2008 Posts: 11
|
Posted: Fri Feb 08, 2013 1:27 pm Post subject: Re: working code |
|
|
| bAN01TgAZ wrote: | | Code: | #####################################################
## Xbox Live GamerTag Status' by Danneh/GrimReaper ##
#####################################################
## Initial Setup ##
#####################################################
set xblchar "."
#####################################################
## End Setup ##
#####################################################
proc xblinfo {nick host hand chan search} {
if {[lsearch -exact [channel info $chan] +xblinfo] != -1} {
set xbllogo "\0039X\00314box Live\003"
set xblsite "Live.xbox.com"
set xblstatusfound "0"
if {$search == ""} {
putserv "PRIVMSG $chan :$xbllogo, Please enter a GamerTag to search for.."
} else {
set xblsrcurl1 [urlencode [regsub -all { } $search +]]
set xblsrcurl2 [encurl $search]
set xblsrcurl3 "/en-GB/Profile?gamertag=${xblsrcurl2}"
if {[catch {set xblsrcsock [socket -async $xblsite 80]} sockerr]} {
return 0
} else {
puts $xblsrcsock "GET $xblsrcurl3 HTTP/1.0"
puts $xblsrcsock "Host: $xblsite"
puts $xblsrcsock "User-Agent: Opera 9.6"
puts $xblsrcsock ""
flush $xblsrcsock
while {![eof $xblsrcsock]} {
set xblstatus "[gets $xblsrcsock]"
if {$xblstatusfound == "on"} {
putserv "PRIVMSG $chan :$xbllogo status for \0037$search\003: [xblstrip [string trimleft [recode "${xblstatus}"]]]"
close $xblsrcsock
return 0
}
if {[regexp -all {<div class="custom">} $xblstatus]} {
set xblstatusfound "on"
}
}
putserv "PRIVMSG $chan :Sorry, I couldn't find \0037$search\003 on $xbllogo"
close $xblsrcsock
return 0
}
}
}
}
proc xblgsinfo {nick host hand chan search} {
if {[lsearch -exact [channel info $chan] +xblinfo] != -1} {
set xbllogo "\0039X\00314box Live\003"
set xblsite "Live.xbox.com"
if {$search == ""} {
putserv "PRIVMSG $chan :$xbllogo, Please enter a GamerTag to search GamerScore for.."
} else {
set xblsrcurl1 [urlencode [regsub -all { } $search +]]
set xblsrcurl2 [encurl $search]
set xblsrcurl3 "/en-GB/Profile?gamertag=${xblsrcurl2}"
if {[catch {set xblsrcsock [socket -async $xblsite 80]} sockerr]} {
return 0
} else {
puts $xblsrcsock "GET $xblsrcurl3 HTTP/1.0"
puts $xblsrcsock "Host: $xblsite"
puts $xblsrcsock "User-Agent: Opera 9.6"
puts $xblsrcsock ""
flush $xblsrcsock
while {![eof $xblsrcsock]} {
set xblstatus "[gets $xblsrcsock]"
if {[regexp -all {<div class="gamerscore">(.*?)</div>} $xblstatus match xblgamerscore]} {
putserv "PRIVMSG $chan :$xbllogo GamerScore for \0037$search\003: $xblgamerscore"
close $xblsrcsock
return 0
}
}
putserv "PRIVMSG $chan :Sorry, I couldn't find \0037$search\003 on $xbllogo"
close $xblsrcsock
return 0
}
}
}
}
proc encurl {string} {
return [string map {" " %20} "$string"]
}
proc xblstrip {string} {
return [regsub -all {<[^<>]+>} $string ""]
}
proc urlencode {string} {
return [subst [regsub -nocase -all {([^a-z0-9+])} $string {%[format %x [scan "\\&" %c]]}]]
}
proc recode { textin } {
return [string map {" \" · · & &} [subst [regsub -nocase -all {&#([0-9]{1,5});} $textin {\u\1}]]]
}
bind pub - ${xblchar}xbl xblinfo
bind pub - ${xblchar}xblgs xblgsinfo
setudef flag xblinfo
putlog "Xbox Live Gamertag status' by Danneh/GrimReaper" |
use telnet and set | Code: | | .chanset #chanelname +xblinfo |
usage :
.xbl gamertag
.xblgs gamertag |
I think this isn't working anymore. No matter what gamertag I choose, it always responds with Sorry, I couldn't find <gamertag> on Xbox Live |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|