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
  1. menu channel {
  2.   $iif($istok(%profreadrooms,#,44),$style(1)) Profile Reader #: {
  3.     $iif($istok(%profreadrooms,#,44),set %profreadrooms $remtok(%profreadrooms,#,44),set %profreadrooms $addtok(%profreadrooms,#,44))
  4.   }
  5. }
  6. on !*:JOIN:#:{
  7.   if ((!$istok(%profreadrooms,#,44)) || (%Profileflood > 2) || ($left($nick,1) == ^) || ($left($nick,1) == >)) { halt }
  8.   inc -u2 %Profileflood
  9.   hadd -m mc_temp prof.ck. [ $+ [ $nick ] ] $chan
  10.   .raw PID $nick
  11. }
  12. raw data:*: {
  13.   if ($2 == PID) {
  14.     if ($hget(mc_temp,prof.ck. [ $+ [ $3 ] ])) {
  15.       getbuzzenprofile $3 $4 $hget(mc_temp,prof.ck. [ $+ [ $3 ] ])
  16.       hdel mc_temp prof.ck. [ $+ [ $3 ] ]  
  17.     }
  18.   }
  19.   halt
  20. }

  21. alias getbuzzenprofile {
  22.   var %ps $rand(1,9999999999999)
  23.   sockopen -e ckbprof. $+ %ps www.buzzen.com 443
  24.   sockmark ckbprof. $+ %ps $1 $2 $3
  25. }
  26. on *:sockopen:ckbprof.*: {
  27.   if ($sockerr) { sockclose $sockname | halt }
  28.   sockwrite -n $sockname GET /mircinfo/profileinfo.php?pid= $+ $gettok($sock($sockname).mark,2,32) HTTP/1.1
  29.   sockwrite -n $sockname User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8)
  30.   sockwrite -n $sockname Accept-Encoding: text/html
  31.   sockwrite -n $sockname Host: www.buzzen.com
  32.   sockwrite -n $sockname $crlf
  33. }
  34. on *:sockread:ckbprof.*: {
  35.   if ($sockerr > 0) return
  36.   var %bp
  37.   sockread %bp
  38.   if ($regex(%bp,/Picture: (.*?)<br \/>/)) { set -e %prof_pic $striphtml($regml(1)) }
  39.   if ($regex(%bp,/Nickname: (.*?)<br \/>/)) { set -e %prof_nick $striphtml($regml(1)) }
  40.   if ($regex(%bp,/Firstname: (.*?)<br \/>/)) { set -e %prof_first $striphtml($regml(1)) }
  41.   if ($regex(%bp,/Lastname: (.*?)<br \/>/)) { set -e %prof_last $striphtml($regml(1)) }
  42.   if ($regex(%bp,/City: (.*?)<br \/>/)) { set -e %prof_city $striphtml($regml(1)) }
  43.   if ($regex(%bp,/Country: (.*?)<br \/>/)) { set -e %prof_country $regml(1) }
  44.   if ($regex(%bp,/Age: (.*?)<br \/>/)) { set -e %prof_age $regml(1) }
  45.   if ($regex(%bp,/Gender: (.*?)<br \/>/)) { set -e %prof_gender $regml(1) }
  46.   if ($regex(%bp,/Orientation: (.*?)<br \/>/)) { set -e %prof_sexort $regml(1) }
  47.   if ($regex(%bp,/Marital: (.*?)<br \/>/)) { set -e %prof_marital $regml(1) }
  48.   if ($regex(%bp,/Homepage: (.*?)<br \/>/)) { set -e %prof_homepage $regml(1) }
  49.   if ($regex(%bp,/LastUpdate: (.*?)<br \/>/)) { set -e %prof_update $regml(1) }
  50.   if ($regex(%bp,/Mood: (.*?)<br \/>/)) { set -e %prof_mood $regml(1) }
  51.   if ($regex(%bp,/Views: (.*?)<br \/>/)) { set -e %prof_views $regml(1) }
  52.   if ($regex(%bp,/ENDPROF/)) {
  53.     tokenize 32 $sock($sockname).mark
  54.     echo $3 [Profile] -------------------------------------------------------------------------------------------
  55.     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 $+ ]
  56.     echo $3 -----------------------------------------------------------------------------------------------------
  57.     unset %prof_*
  58.     sockclose $sockname
  59.   }
  60. }


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