blackvenomm666 commented on a Page, Xbox Live Gamer-Tag Look-Up Socket  -  Apr 21, 2012
on $*:text:/^@xbox\s(.+)/iS:# {
  if (!$2) && (!%f) {
    inc -u3 %f.xbox
    if ($sock(xbox)) sockclose xbox 
    sockopen xbox live.xbox.com 80
    .sockmark xbox $+(/en-US/Profile?gamertag=,$replace($readini(xboxgamer.ini, Tag ,$nick),$chr(32),$+($chr(37),20))) $&
      msg # $+(04,$regml(1),)
  }
  elseif ($2 == @erase) { remini xboxgamer.ini Tag $nick
    msg # $nick $+ , your gamer tag has been reset.  Please re-add your Gamertag if you wish with !xbox register [xboxtag]
  }

  elseif ($2 == register) {
    if (!$3) { msg # please put in your xbox username, if you change it. Please remember to reset it.
    }
    else {
      writeini xboxgamer.ini Tag $nick $3
      msg # $nick $+ , Your gamer tag of $$3- has been memorized.
    }
  }
  else { if (!%f) { inc -u3 %f
      if ($sock(xbox)) sockclose xbox
      sockopen xbox live.xbox.com 80
      sockmark xbox $+(/en-US/Profile?gamertag=,$replace($regml(1),$chr(32),$+($chr(37),20))) $&
        msg # $+(04,$regml(1),)
    }
  }
}

on *:sockopen:xbox: {
  sockwrite -nt xbox GET $gettok($sock(xbox).mark,1,32) HTTP/1.1
  sockwrite -nt xbox Host: $+($sock(xbox).addr,$str($crlf,2))
}
on *:load: {
  echo 12 -a You Have Just Loaded Napa182's Xbox Live Look-up Socket
  echo 07 -a A irc.EzzyChat.com Production
}
on *:sockread:xbox: {
  var %xbox | sockread %xbox
  if ($regex(%xbox,/<h1.+CustomErrorTitle.+>(Ooops!).+<\/h1>/)) {
    $gettok($sock(xbox).mark,2-3,32) $regml(1) I don't know who $+(",$gettok($sock(xbox).mark,4-,32),") is. $&
      Looks like you may have misspelled the Gamer-tag you are looking for.
    sockclose xbox
  }
  if ($regex(%xbox,/<div.+presence.+>(.+)<\/div>/)) { 
    hadd -m xbox 1 $regsubex($regml(1),/&#(\d+);/g,$chr(\1))
  }
  if ($regex(%xbox,/<div.+gamerscore.+>(\d+)<\/div>/)) {
    $+($gettok($sock(xbox).mark,2-,32),$chr(44)) $hget(xbox,1) - 04Gamerscore $regml(1)
    sockclose xbox
  }
}

now because of the regex within the on text event only the @xbox taghere will do a lookup. but if you change the regex on it you should be able to get it to work. i suck at regex so i'm not touching that one
if you changed

on $*:text:/^@xbox\s(.+)/iS:# {

to

on $*:text:/^@xbox/iS:# {

the added part that you want to add will work but napa's original @xbox taghere won't work. but as i said i'm no good with regex. so have fun with it

 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.