/slap - Reinvented
Platform: mIRC
Published Feb 10, 2009
Updated Jun 14, 2011
This snippet slaps a user with anything but a large trout.
Syntax:
/slap NickName
If a user is not provided, it slaps the user(s) selected in the nicklist. If no user is selected/provided then nothing happens.
If you use this in a window that is not a channel/query/chat window, do not say it has a bug. You are simply just retarded.
EDIT: 14 JUN 2011
FIXED: 31 OCT 2010
FIXED: 26 MAY 2009
;Slapper
;napalm - 14 JUN 2011
alias slap {
var %n $iif($1,$1,$$snicks)
if ($sock(slap)) sockclose slap
sockopen slap www.watchout4snakes.com 80
sockmark slap $active %n
}
alias slap.error echo $color(kick) -at /SLAP: Sock $+ $2 Error. $sock($1).wsmsg
on *:sockopen:slap:{
if ($sockerr) || ($sock($sockname).status != active) { slap.error $sockname open | return }
sockwrite -n $sockname GET /CreativityTools/RandomWord/RandomPhrase.aspx HTTP/1.1
sockwrite -n $sockname Host: www.watchout4snakes.com
sockwrite -n $sockname User-Agent: mIRC $version
sockwrite -n $sockname $crlf
}
on *:sockread:slap:{
var %r | sockread %r | tokenize 32 %r
if ($sockerr) || ($sock($sockname).status != active) { slap.error $sockname read | return }
elseif ($regex(%r,main_lblPhrase.+>(.+)</span>)) {
tokenize 32 $sock($sockname).mark $regml(1)
describe $1 slaps $2 around a bit with $+(a,$iif($regex($left($3,1),[aeiou]),n)) $3-
return
}
elseif ($1 == </HTML>) sockclose $sockname
}
;EOF