Jump to content
chain

/slap - Reinvented

Recommended Posts

  • Administrators

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.

 

;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

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...