So Yes I'm really into inputs and aliases.
Screw dialogs.
Also, I am very fond of the sites such as Bash.org
and Fmylife.com
Here are a couple of inputs (and text) sockets
Bashon *:input:*:if ($regex($1-,/^\+bash?\s?(\d+)?$/iS)) $iif($regml(1),$bash(#,$v1),$bash(#))
on $*:text:/^~bash?\s?(\d+)?$/iS:#:$iif($regml(1),$bash(#,$v1),$bash(#))
alias -l bash {
if (!$($+(%,f,$1),2)) { inc -u4 $+(%,f,$1)
if ($sock($+(bash,$1))) sockclose $+(bash,$1)
sockopen $+(bash,$1) www.bash.org 80
sockmark $+(bash,$1) $+(/?,$iif($2,$2,random)) msg $1 4,1[14,1Bash4,1]
}
}
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.+does not exist.)<\/font>/)) {
$gettok($sock($sockname).mark,2-,32) $regml(1)
sockclose $sockname
}
elseif ($regex(%bash,/^(<p class=.+>|)(\S.+)(<br \/>|<\/p>)/)) {
$gettok($sock($sockname).mark,2-,32) $replace($regml(2),<,<,>,>,",", ,$chr(32),&,&)
}
if ($regml(3) = </p>) { sockclose $sockname }
}
and for
FMyLifeon *:input:*:if ($regex($1,/^\+fml$/iS)) $fml(#)
on $*:text:/^~fml$/iS:#:$fml(#)
alias -l fml {
if (!%f) { inc -u4 %f
if ($sock(fu_ck)) sockclose fu_ck
sockopen fu_ck www.fmylife.com 80
sockmark fu_ck msg $1 14,1[4,1F My Life14,1]
}
}
on *:sockopen:fu_ck: {
sockwrite -n fu_ck GET /random HTTP/2.0
sockwrite -n fu_ck Host: $+($sock(fu_ck).addr,$str($crlf,2))
}
on *:sockread:fu_ck: {
var %fuc_kit | sockread %fuc_kit
if ($regex(%fuc_kit,/<a href=.+fmllink">(Today.+FML)<\/a><\/p>/)) {
$sock(fu_ck).mark $regsubex($regml(1),/[^<]*>|<[^>]*>|<[^>]*|"/g,$chr(32))
sockclose fu_ck
}
}
The commands are as followed
For you it would be
+(trigger) here
For someone else it would be
~(trigger)
I.e.
:|: 12:01 :|: |@ morbid | +bash
:|: 12:01 :|: |@ morbid | [Bash] <ck3k> i wonder how people with parkingson's disease wipe their ass
:|: 12:01 :|: |@ morbid | [Bash] <ck3k> that must be a **** trial
:|: 12:01 :|: |@ morbid | [Bash] <ck3k> i bet muhammed ali has a whole staff hired just to do that
and
:|: 12:01 :|: |@ morbid | +fml
:|: 12:01 :|: |@ morbid | [F My Life] Today, I went to a family dinner. While waiting to be seated, a guy walked by and I looked to see if he was hot. Then my grandma yelled, Get your eyeballs back in your head and quit staring at boys! The whole restaurant heard her. Including the guy. And yes, he was hot. FML