Walmart PeopleOfWalmart Search

By FordLawnmower on Nov 29, 2010

Searches PeopleOfWalmart.com for funny images/stories from walmart.
It's actually pretty funny stuff.
This script was requested by Dark|
Credit for the idea goes to Dark|

Using the script::

  • Copy this code, paste it to a new remote and save it with a unique file name.
  • Type +Walmart in the channels you want to run the script (requires ops)
  • Notice trigger: !walmart search words. (notices results to user)
  • Message trigger: @walmart search words. (voices or higher. Messages the channel)
  • There is a master on/off switch on the right click menu.
  • See the comments at the top of the script for color/logo changes.
    Screen Shot:
    Image
;PeopleOfWalmart search script by Ford_Lawnmower irc.abjects.net #mIRC
;Script Idea and Request by Dark|
;;;;;Edit the 3 alias's below to adjust the logo, text color and link color ;;;;;;;
alias -l w.logo return 04W07a06l09m13a04r07t06 
alias -l w.textcolor return 04
alias -l w.linkcolor return 
;;;;;End of edit area;;;;;;;;
menu Channel,Status {
  .$iif($group(#Walmart) == On,$style(1)) Walmart Trigger
  ..$iif($group(#Walmart) == On,$style(2)) On: .enable #Walmart
  ..$iif($group(#Walmart) == Off,$style(2)) Off: .disable #Walmart
}
#Walmart on
On $*:Text:/^(\+|-|!|@)Walmart.*/Si:#: {
  var %action $regml(1)
  if (%action isin +-) && ($regex($nick($chan,$nick).pnick,/(!|~|&|@)/)) {
    if (%action == +) {
      if ($istok(%WalmartChanList,$+($network,$chan),32)) { .msg $chan $nick $chan is already running the Walmart script }
      else { 
        .enable #Walmart
        Set %WalmartChanList $addtok(%WalmartChanList,$+($network,$chan),32)
        .msg $chan $nick has activated the Walmart script for $chan .
      }
    }
    else {
      if (!$istok(%WalmartChanList,$+($network,$chan),32)) { .msg $chan $nick $chan is not running the Walmart script }
      else { 
        Set %WalmartChanList $remtok(%WalmartChanList,$+($network,$chan),1,32)
        .msg $chan $nick has deactivated the Walmart script for $chan . 
      }
    }
  }
  elseif (!$timer($+(Walmart,$network,$nick))) && ($istok(%WalmartChanList,$+($network,$chan),32)) {
    .timer $+ $+(Walmart,$network,$nick) 1 6 noop
    var %method $iif(%action == !,.notice $nick,$iif($regex($nick($chan,$nick).pnick,/(!|~|&|@|%|\+)/),.msg $chan,.notice $nick))
    GetWalmart %method $2-
  }
}
#Walmart end
alias Walmart { GetWalmart echo -a $1- }
alias -l GetWalmart {
  $1-2 Searching........
  var %sockname $+(Walmart,$network,$2,$ticks)
  sockopen %sockname www.peopleofwalmart.com 80
  sockmark %sockname $1-2 $+(/?s=,$replace($strip($3-),$chr(32),+)) 0
}
On *:sockopen:Walmart*: {
  if (!$sockerr) {
    sockwrite -nt $sockname GET $gettok($sock($sockname).mark,3,32) HTTP/1.0
    sockwrite -n $sockname Host: www.peopleofwalmart.com
    sockwrite -n $sockname $crlf
  }
  else { sockclose $sockname | return }
}
On *:sockread:Walmart*: {
  if ($sockerr) { echo -st Socket Error $nopath($script) | sockclose $sockname | return }
  else {
    var %Walmart | sockread %Walmart
    if ($regex(wal,%Walmart,/<h2><a href="(.*?)">(.*?)<\/a><\/h2>/i)) {
      tokenize 32 $sock($sockname).mark
      put $1-2 $w.logo $w.textcolor $utf8fix($regml(wal,2)) $+($w.linkcolor,$regml(wal,1))
    }
    elseif (<h2>Not Found</h2> isin %Walmart) {
      put $gettok($sock($sockname).mark,1-2,32) $w.logo $w.textcolor Nothing found! Please refine your search and try again!
      sockclose $sockname
    }
    elseif (</html> isin %Walmart) sockclose $sockname
  }
}
alias Put {
  if (!$regex($1,/(\.|^)(msg|notice)$/Si)) || (!$3) { echo -st **Put error** Syntax /Put msg #channel text - or - /Put notice nickname text  | return }
  tokenize 32 $regsubex($1-,/([$\|%\[\]\}\{][^\s]*)/g,$+($chr(2),$chr(2),\t))
  var %tokens $0, %Tstart 3, %Dtimer 1500
  if ($timer($+(Put,$2,$network)).secs) { %Dtimer = $calc($v1 * 1000) }  
  while ($len($($+($,%Tstart,-,%tokens),2)) > 430) {
    dec %tokens
    if ($len($($+($,%Tstart,-,%tokens),2)) <= 430) {
      .timer -m 1 %Dtimer $1-2 $($+($,%Tstart,-,%tokens),2))
      inc %Dtimer 1500
      %Tstart = $calc(%tokens + 1)
      %tokens = $0
    }
  }
  .timer -m 1 %Dtimer $1-2 $($+($,%Tstart,-,%tokens),2))
  .timer $+ $+(Put,$2,$network) -m 1 $calc(%Dtimer + 1500) noop 
}
alias -l utf8fix return $replace($regsubex($1-,/&#([\d]{2,4});/g,$utf8(\t)),&amp;,&)
alias -l UTF8 {
  if ($version >= 7) return $chr($1)
  else {
    var %x $base($1,10,2),%y $len(%x)
    if ($1 < 161) { return $chr($1) }
    elseif (%y < 12) { return $+($shift(11000000,$left(%x,-6)),$shift(10000000,$right(%x,6))) }
    elseif (%y < 17) { return $+($shift(11100000,$left(%x,-12)),$shift(10000000,$mid(%x,-12,6)),$shift(10000000,$right(%x,6))) }
    elseif (%y < 22) {
      return $+($shift(11110000,$left(%x,-18)),$shift(10000000,$mid(%x,$iif(%y < 18,$+(-,%y),-18),6)),$shift(10000000,$mid(%x,-12,6)),$shift(10000000,$right(%x,6)))
    }
  }
}
alias -l shift {
  if ($2) { return $chr($base($+($left($1,$+(-,$len($2))),$2),2,10)) }
  else { return $chr($base($1,2,10)) }
}

Comments

Sign in to comment.
dma   -  Feb 21, 2016

[3:28:pm] [ ~dma ] @walmart food
[3:28:pm] <@TheBoss> Searching........
[3:28:pm] <@TheBoss> Walmart Three Ring Blogs http://threeringblogs.com/" title="Funny Blogs

Not working you see where it goes?

 Respond  
FordLawnmower   -  Nov 25, 2011

Updated.
Thanks for letting me know jasonh :)

 Respond  
jasonh   -  Nov 24, 2011

not working for me anymore. i think POW changed their site again

 Respond  
b0sse   -  Sep 29, 2011

Oh btw, you should make a trigger like this with http://dumbtweets.com as well...
so when you type @dumbtweets it will msg the channel with a random tweet from that site.

would also be cool with a script like that for http://failblog.org

 Respond  
b0sse   -  Sep 29, 2011

No, thank you, FordLawnmower :)

 Respond  
FordLawnmower   -  Sep 28, 2011

It was broken b0sse. Thanks for noticing :)
Updated and working again.

 Respond  
b0sse   -  Sep 27, 2011

All I get is "Searching......."

then nothing happens :(

 Respond  
Dark|   -  Dec 02, 2010

well, i wouldnt know its been working fine for me, so it could be your internet or the site just dosent like you

 Respond  
bourneident   -  Dec 02, 2010

yeah i think it is but why only that site is what gets me

 Respond  
Dark|   -  Dec 02, 2010

What do you mean going down?
its been working fine for me :)
it could be your internet

 Respond  
bourneident   -  Dec 02, 2010

the walmart site keeps going down quite a bit strange

 Respond  
bourneident   -  Dec 02, 2010

you rock :)

 Respond  
FordLawnmower   -  Dec 01, 2010

BeachCreeps search is here bourneident -->> http://www.hawkee.com/snippet/8178/

 Respond  
FordLawnmower   -  Dec 01, 2010

Thanks for the comments Dark|, Tidum , H0LLYWOOD :)
@bourneident I'm glad it's working for you :) The beach thing looks pretty funny. I'll make it here in a little while.

 Respond  
bourneident   -  Dec 01, 2010

works great and i noticed there is a link on that site for another site that is pretty much the same any chance of an added search feature for http://www.beachcreeps.com bro

 Respond  
bourneident   -  Nov 30, 2010

not working for me ford i just get searching.....

Edit: working now after a day or so weird :S

 Respond  
H0LLYWOOD   -  Nov 29, 2010

i watched this idea being born, great idea by Dark|, great snippet by Ford_Lawnmower.
Gj Guys.

 Respond  
Tidum   -  Nov 29, 2010

Cool snippet Ford, like it. :D

 Respond  
Dark|   -  Nov 29, 2010

YEY xD thanks ford

 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.