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::
;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)),&,&)
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)) }
}
[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?
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
BeachCreeps search is here bourneident -->> http://www.hawkee.com/snippet/8178/
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