Stewie1k94 commented on a Page, Bash Quote Socket  -  May 06, 2012

Try this:

alias -l bash {
  if (!$($+(%,#,bash),2)) { inc -u10 $+(%,#,bash)
    if ($sock($+(bash,#))) sockclose $+(bash,#) 
    sockopen $+(bash,#) www.bash.org 80 
    sockmark $+(bash,#) $+(/?,$iif($1,$1,random)) msg #
  }
}
on *:load: { 
  echo 12 -a You Have Just Loaded Napa182's Bash Quote Socket 
  echo 07 -a A irc.EzzyChat.com Production 
  echo -a 08!!04WARNING08 This snippet may04/08will say curse04/08foul words 04WARNING08!!
}
on *:input:#:if ($regex($1-,/^@bash?\s?(\d+)?$/iS)) bash $iif($regml(1),$v1)
on $*:text:/^@bash?\s?(\d+)?$/iS:#:bash $iif($regml(1),$v1)
on *:sockopen:bash*: { 
  sockwrite -n bash* GET $gettok($sock($sockname).mark,1,32) HTTP/1.1 
  sockwrite -n bash* Host: $+($sock($sockname).addr,$str($crlf,2)) 
}
on *:sockread:bash*: {
  var %bash | sockread %bash
  if ($regex(%bash,/<center.+>Quote\s\43(\d+\s.+exist\56)<\/font>/)) {
    $gettok($sock($sockname).mark,2-,32) :[04Bash Quote $+($chr(35),04,$regml(1),]:)
    sockclose $sockname
  }
  if ($regex(%bash,/<b>\43(\d+)<\/b>/)) {
    $gettok($sock($sockname).mark,2-,32) Looking Up :[04Bash Quote$&
      $+($chr(35),04,$regml(1),]: Please wait...) 
  }
  if ($regex(%bash,/^(<p class=.+>|)(\S.+)(<br \/>|<\/p>)/)) { 
    inc -u10 $+(%,$sockname) 
    .timerbash $+ $($+(%,$sockname),2) 1 $calc(2* $($+(%,$sockname),2))$& 
      $gettok($sock($sockname).mark,2-,32) :[04BASH]:$&
      $replace($regml(2),&lt;,<,&gt;,>,&nsbsp,$chr(32),&,&)
  }
  if ($regml(3) = </p>) { sockclose $sockname }
}

Before: > [10:41pm] <~Stewie|Toclafane> @Bash
[10:41pm] <&thunderbolt> Looking Up :[Bash Quote #355]: Please wait...
[10:41pm] <&thunderbolt> :[BASH]: <Rapture> I wasn't naked! I had a sock on! After: > [10:43pm] <~Stewie|Toclafane> @bash 355
[10:43pm] <&thunderbolt> Looking Up :[Bash Quote #355]: Please wait...
[10:43pm] <&thunderbolt> :[BASH]: I wasn't naked! I had a sock on!

 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.