tglogo.png
0 LIKES

Snippet


Buzzen Profile Info

In Category Buzzen Posted by err0r On 01/07/16
Tags: buzzen err0r profile 

Show buzzen member profile information on join
menu channel {
  $iif($istok(%profreadrooms,#,44),$style(1)) Profile Reader #: { 
    $iif($istok(%profreadrooms,#,44),set %profreadrooms $remtok(%profreadrooms,#,44),set %profreadrooms $addtok(%profreadrooms,#,44)) 
  }
}
on !*:JOIN:#:{ 
  if ((!$istok(%profreadrooms,#,44)) || (%Profileflood > 2) || ($left($nick,1) == ^) || ($left($nick,1) == >)) { halt }
  inc -u2 %Profileflood
  hadd -m mc_temp prof.ck. [ $+ [ $nick ] ] $chan
  .raw PID $nick
}
raw data:*: { 
  if ($2 == PID) { 
    if ($hget(mc_temp,prof.ck. [ $+ [ $3 ] ])) { 
      getbuzzenprofile $3 $4 $hget(mc_temp,prof.ck. [ $+ [ $3 ] ])
      hdel mc_temp prof.ck. [ $+ [ $3 ] ]  
    }
  } 
  halt
}

alias getbuzzenprofile {
  var %ps $rand(1,9999999999999) 
  sockopen -e ckbprof. $+ %ps www.buzzen.com 443 
  sockmark ckbprof. $+ %ps $1 $2 $3
}
on *:sockopen:ckbprof.*: { 
  if ($sockerr) { sockclose $sockname | halt }
  sockwrite -n $sockname GET /mircinfo/profileinfo.php?pid= $+ $gettok($sock($sockname).mark,2,32) HTTP/1.1
  sockwrite -n $sockname User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8)
  sockwrite -n $sockname Accept-Encoding: text/html
  sockwrite -n $sockname Host: www.buzzen.com
  sockwrite -n $sockname $crlf
}
on *:sockread:ckbprof.*: {
  if ($sockerr > 0) return
  var %bp
  sockread %bp
  if ($regex(%bp,/Picture: (.*?)<br \/>/)) { set -e %prof_pic $striphtml($regml(1)) }
  if ($regex(%bp,/Nickname: (.*?)<br \/>/)) { set -e %prof_nick $striphtml($regml(1)) }
  if ($regex(%bp,/Firstname: (.*?)<br \/>/)) { set -e %prof_first $striphtml($regml(1)) }
  if ($regex(%bp,/Lastname: (.*?)<br \/>/)) { set -e %prof_last $striphtml($regml(1)) }
  if ($regex(%bp,/City: (.*?)<br \/>/)) { set -e %prof_city $striphtml($regml(1)) }
  if ($regex(%bp,/Country: (.*?)<br \/>/)) { set -e %prof_country $regml(1) }
  if ($regex(%bp,/Age: (.*?)<br \/>/)) { set -e %prof_age $regml(1) }
  if ($regex(%bp,/Gender: (.*?)<br \/>/)) { set -e %prof_gender $regml(1) }
  if ($regex(%bp,/Orientation: (.*?)<br \/>/)) { set -e %prof_sexort $regml(1) }
  if ($regex(%bp,/Marital: (.*?)<br \/>/)) { set -e %prof_marital $regml(1) }
  if ($regex(%bp,/Homepage: (.*?)<br \/>/)) { set -e %prof_homepage $regml(1) }
  if ($regex(%bp,/LastUpdate: (.*?)<br \/>/)) { set -e %prof_update $regml(1) }
  if ($regex(%bp,/Mood: (.*?)<br \/>/)) { set -e %prof_mood $regml(1) }
  if ($regex(%bp,/Views: (.*?)<br \/>/)) { set -e %prof_views $regml(1) }
  if ($regex(%bp,/ENDPROF/)) { 
    tokenize 32 $sock($sockname).mark
    echo $3 [Profile] -------------------------------------------------------------------------------------------
    echo $3  $+ $1 [Name: %prof_first %prof_last $+ ] [Gender: %prof_gender $+ ] [Age: %prof_age $+ ] [From: %prof_city %prof_country $+ ] [Sexual Orientation: %prof_sexort $+ ] [Status: %prof_marital $+ ] [Mood: %prof_mood $+ ] [Views: %prof_views $+ ] [Updated: %prof_update $+ ] 
    echo $3 -----------------------------------------------------------------------------------------------------
    unset %prof_*
    sockclose $sockname
  }
}


Comments 4

danger - Thursday, 8 October, 2020
also alias getbuzzenprofile needs a return on end else the hdel in activating code wont occur
danger - Thursday, 8 October, 2020
err0r that switch will err0r if its the only channel in %profreadrooms when you remove it
err0r - Monday, 25 January, 2016
I just tested it in a new empty mirc. works fine. if you are using this in something like moschino you will probably have to change the raw data pid return
Paige - Monday, 25 January, 2016
Isn't working for me , doesn't show profile details of anyone who joins rooms, when switched on or otherwise.

Please note that on our website we use cookies necessary for the functioning of our website, cookies that optimize the performance. To learn more about our cookies, how we use them and their benefits, please read our Cookie Policy.
I Understand