2013-10-16 06:24:12 +04:00
|
|
|
!:
|
2014-05-31 02:41:22 +04:00
|
|
|
:: /=main=/bin/chat/hoon
|
2013-10-16 06:24:12 +04:00
|
|
|
::
|
2013-11-26 23:28:15 +04:00
|
|
|
=> %= .
|
|
|
|
+
|
|
|
|
=> +
|
2014-07-30 05:09:11 +04:00
|
|
|
=* sed .
|
2013-11-26 23:28:15 +04:00
|
|
|
=> ^/===/lib/pony
|
2014-06-10 05:45:19 +04:00
|
|
|
=+ ^= flag
|
2014-07-04 05:47:51 +04:00
|
|
|
$? %leet
|
|
|
|
%monitor
|
|
|
|
%noob
|
|
|
|
%quiet
|
2014-07-10 23:01:24 +04:00
|
|
|
%time
|
2014-07-04 05:47:51 +04:00
|
|
|
[%tower p=@p]
|
2014-07-03 02:08:02 +04:00
|
|
|
[%s p=path]
|
2014-06-10 05:45:19 +04:00
|
|
|
==
|
2014-08-29 01:30:02 +04:00
|
|
|
=+ [flags=*(list flag) lat=&3:%]
|
2013-11-26 23:28:15 +04:00
|
|
|
=> |%
|
2014-07-03 02:08:02 +04:00
|
|
|
++ chat :: user action
|
|
|
|
$% [%all p=mess] :: say
|
2014-07-03 22:14:22 +04:00
|
|
|
[%back p=?(%da %dr %ud) q=@] :: backlog
|
2014-07-10 21:42:05 +04:00
|
|
|
[%def p=mess] :: use current prompt
|
2014-07-03 02:08:02 +04:00
|
|
|
[%how ~] :: help
|
2014-07-04 05:47:51 +04:00
|
|
|
[%priv p=@p q=mess] :: private
|
2014-07-03 02:08:02 +04:00
|
|
|
[%who ~] :: who
|
|
|
|
== ::
|
2014-07-04 05:47:51 +04:00
|
|
|
++ idad ,[p=@p q=@t] :: identity
|
2014-07-03 02:08:02 +04:00
|
|
|
++ mess :: message
|
|
|
|
$% [%do p=@t] :: act
|
|
|
|
[%exp p=@t q=tank] :: code
|
|
|
|
[%say p=@t] :: say
|
|
|
|
== ::
|
2014-07-10 21:42:05 +04:00
|
|
|
++ prom :: prompt type
|
|
|
|
$% [%pub ~] :: public message
|
|
|
|
[%pri p=ship] :: private message
|
|
|
|
== ::
|
2014-07-04 05:47:51 +04:00
|
|
|
++ user :: amigos
|
|
|
|
$% [%in p=idad] :: coming on the air
|
|
|
|
[%out p=idad] :: signing off
|
|
|
|
== ::
|
2014-07-03 02:08:02 +04:00
|
|
|
++ station path ::
|
2014-08-01 06:44:49 +04:00
|
|
|
++ zung :: client to server
|
2014-07-03 22:14:22 +04:00
|
|
|
$% [%backlog p=path q=?(%da %dr %ud) r=@] ::
|
2014-07-03 02:08:02 +04:00
|
|
|
[%hola p=station] ::
|
|
|
|
[%mess p=station q=mess] ::
|
2014-08-01 06:44:49 +04:00
|
|
|
[%tint p=ship] ::
|
2014-07-03 02:08:02 +04:00
|
|
|
== ::
|
|
|
|
++ zong :: server to client
|
|
|
|
$% [%mess p=@da q=ship r=mess] ::
|
|
|
|
== ::
|
|
|
|
--
|
|
|
|
=> |%
|
2013-11-26 23:28:15 +04:00
|
|
|
++ chat
|
|
|
|
%+ cook |=(a=^chat a)
|
|
|
|
;~ pose
|
|
|
|
(cold [%how ~] wut)
|
2014-07-03 02:08:02 +04:00
|
|
|
(cold [%who ~] tis)
|
2014-07-04 05:47:51 +04:00
|
|
|
(stag %back dat)
|
|
|
|
(stag %priv ;~(plug ;~(pfix sig fed:ag) ;~(pfix ace mess)))
|
2014-07-10 21:42:05 +04:00
|
|
|
(stag %all ;~(pfix pam mess))
|
|
|
|
(stag %def mess)
|
2013-11-26 23:28:15 +04:00
|
|
|
==
|
|
|
|
::
|
2014-07-03 02:08:02 +04:00
|
|
|
++ dat
|
2014-08-28 23:02:56 +04:00
|
|
|
%+ sear
|
2014-07-03 22:14:22 +04:00
|
|
|
|= p=coin
|
2014-08-28 23:02:56 +04:00
|
|
|
?. ?=([%$ ?(%da %dr %ud) @] p) ~
|
|
|
|
(some +.p)
|
|
|
|
;~(pfix bas bas (star ace) nuck:so)
|
2014-05-31 02:41:22 +04:00
|
|
|
::
|
2013-11-26 23:28:15 +04:00
|
|
|
++ expn
|
|
|
|
%- sear
|
|
|
|
:_ text
|
|
|
|
|= a=@t
|
|
|
|
^- (unit ,[p=@t q=tank])
|
2014-08-29 01:30:02 +04:00
|
|
|
~! %
|
|
|
|
=+ hun=(rush a wide:(vang | &1:% &2:% lat |3:%))
|
2013-12-26 21:12:07 +04:00
|
|
|
?~ hun ~
|
2014-07-30 05:05:05 +04:00
|
|
|
?~(a ~ [~ a (sell (slap !>(sed) u.hun))])
|
2013-11-26 23:28:15 +04:00
|
|
|
::
|
|
|
|
++ mess
|
|
|
|
%+ cook |=(a=^mess a)
|
|
|
|
;~ pose
|
|
|
|
(stag %do ;~(pfix pat text))
|
2014-07-03 02:08:02 +04:00
|
|
|
(stag %exp ;~(pfix hax expn))
|
2014-05-14 20:36:26 +04:00
|
|
|
(stag %do (full (easy '')))
|
2014-07-03 02:08:02 +04:00
|
|
|
(stag %say text)
|
2013-11-26 23:28:15 +04:00
|
|
|
==
|
2014-07-03 02:08:02 +04:00
|
|
|
::
|
|
|
|
++ text (boss 256 (star prn))
|
2013-11-26 23:28:15 +04:00
|
|
|
--
|
|
|
|
|%
|
2014-07-04 05:47:51 +04:00
|
|
|
++ idt
|
|
|
|
|= from=idad
|
|
|
|
?: |(!(lien flags |=(a=flag ?=(%noob a))) =("" q.from))
|
|
|
|
(scow %p p.from)
|
|
|
|
%- trip
|
|
|
|
%^ cat 3 %^ cat 3 (scot %p p.from) ' ' q.from
|
2013-11-26 23:28:15 +04:00
|
|
|
++ rend
|
2014-07-10 23:01:24 +04:00
|
|
|
|= [from=idad msg=^mess pre=tape tim=@da] :: roo=^room
|
|
|
|
=+ tst=(lien flags |=(a=flag ?=(%time a)))
|
2013-11-26 23:28:15 +04:00
|
|
|
^- tank
|
2014-07-03 02:08:02 +04:00
|
|
|
?- -.msg
|
2014-07-10 23:01:24 +04:00
|
|
|
%do
|
|
|
|
=+ mes=?:(=(0 p.msg) "remains quietly present" (trip p.msg))
|
|
|
|
:- %leaf
|
|
|
|
%+ weld
|
|
|
|
?. tst "" (timestamp tim)
|
|
|
|
"{pre}{(idt from)} {mes}"
|
|
|
|
%exp
|
|
|
|
:~ %rose
|
|
|
|
[" " "" ""]
|
|
|
|
:- %leaf
|
|
|
|
%+ weld
|
|
|
|
?. tst "" (timestamp tim)
|
|
|
|
"{pre}{(idt from)} {(trip p.msg)}"
|
|
|
|
q.msg
|
|
|
|
==
|
|
|
|
%say
|
|
|
|
:- %leaf
|
|
|
|
%+ weld
|
|
|
|
?. tst "" (timestamp tim)
|
|
|
|
"{pre}{(idt from)}: {(trip p.msg)}"
|
2013-11-26 23:28:15 +04:00
|
|
|
==
|
2014-07-10 23:01:24 +04:00
|
|
|
++ timestamp
|
|
|
|
|= t=@da
|
|
|
|
=+ da=(yell t)
|
|
|
|
"{?:((gth 10 h.da) "0" "")}{(scow %ud h.da)}:".
|
|
|
|
"{?:((gth 10 m.da) "0" "")}{(scow %ud m.da)} "
|
2013-11-26 23:28:15 +04:00
|
|
|
--
|
2014-07-03 02:08:02 +04:00
|
|
|
::
|
2013-11-26 23:28:15 +04:00
|
|
|
==
|
|
|
|
=> %= .
|
|
|
|
-
|
2014-07-04 05:47:51 +04:00
|
|
|
:- :* ami=*(map ,@p ,@t) ::
|
2014-07-03 02:08:02 +04:00
|
|
|
bud=(sein `@p`-<) :: chat server
|
2013-11-26 23:28:15 +04:00
|
|
|
dun=| :: done
|
2014-07-10 21:42:05 +04:00
|
|
|
giz=*(list gift) :: stuff to send
|
2014-07-04 05:47:51 +04:00
|
|
|
mon=*? :: leet mode
|
|
|
|
nub=*? :: monitor mode
|
2014-07-10 21:42:05 +04:00
|
|
|
pro=`prom`[%pub ~] :: prompt state
|
2014-07-03 02:08:02 +04:00
|
|
|
sta=*station :: station
|
2014-07-03 05:53:53 +04:00
|
|
|
sub=*(list path) :: subscriptions
|
2014-07-04 05:47:51 +04:00
|
|
|
tod=*(map ,@p ,@ud) :: outstanding, friend
|
2014-07-10 23:01:24 +04:00
|
|
|
tst=| :: timestamp mode
|
2014-07-04 05:47:51 +04:00
|
|
|
wak=_@da :: next heartbeat
|
2013-11-26 23:28:15 +04:00
|
|
|
==
|
|
|
|
[who=`@p`-< how=`path`->]
|
|
|
|
==
|
2013-10-16 06:24:12 +04:00
|
|
|
|= [est=time *]
|
2014-05-31 02:41:22 +04:00
|
|
|
|= args=(list flag)
|
2014-07-03 02:08:02 +04:00
|
|
|
=. flags args
|
2014-07-04 05:47:51 +04:00
|
|
|
=. wak est
|
2014-06-10 05:45:19 +04:00
|
|
|
=. bud
|
2014-07-04 05:47:51 +04:00
|
|
|
?: (lien args |=(a=flag &(?=(^ a) ?=(%tower -.a))))
|
|
|
|
(roll args |=([p=flag q=@p] ?:(&(?=(^ p) ?=(%tower -.p)) p.p q)))
|
2014-05-31 02:41:22 +04:00
|
|
|
bud
|
2014-07-04 05:47:51 +04:00
|
|
|
=. nub (lien args |=(a=flag ?=(%noob a)))
|
|
|
|
=. mon (lien args |=(a=flag ?=(%monitor a)))
|
2014-07-03 02:08:02 +04:00
|
|
|
=. sta
|
2014-07-04 05:47:51 +04:00
|
|
|
?: (lien args |=(a=flag &(?=(^ a) ?=(%s -.a))))
|
|
|
|
(roll args |=([p=flag q=station] ?:(&(?=(^ p) ?=(%s -.p)) p.p q)))
|
2014-07-03 02:08:02 +04:00
|
|
|
sta
|
2014-07-10 23:01:24 +04:00
|
|
|
=. tst (lien args |=(a=flag ?=(%time a)))
|
2013-11-26 23:28:15 +04:00
|
|
|
|- ^- bowl
|
|
|
|
=< abet:init
|
|
|
|
|%
|
|
|
|
++ abet `bowl`[(flop giz) ?:(dun ~ [~ hope vent(giz ~)])]
|
2014-07-03 02:08:02 +04:00
|
|
|
++ hope
|
2014-07-10 21:42:05 +04:00
|
|
|
:^ [/wa %wa wak]
|
|
|
|
[/ya %lq %ya]
|
|
|
|
:^ /up %up %text
|
|
|
|
:_ ""
|
|
|
|
?- -.pro
|
|
|
|
%pub "& "
|
|
|
|
%pri (weld (scow %p p.pro) " ")
|
|
|
|
==
|
2014-07-04 05:47:51 +04:00
|
|
|
%+ welp
|
|
|
|
(turn sub |=(pax=path [[%gr pax] [%gr ~]]))
|
|
|
|
%+ turn (~(tap by tod))
|
|
|
|
|= [p=@p q=@ud]
|
|
|
|
[[%ra (scot %p p) ~] [%ow ~]]
|
|
|
|
::
|
|
|
|
++ iden
|
|
|
|
|= her=@p
|
|
|
|
(fall (~(get by ami) her) *@t)
|
|
|
|
::
|
2014-08-01 06:44:49 +04:00
|
|
|
++ init
|
2014-08-02 03:17:24 +04:00
|
|
|
(joke:(subs:(subs:tint (welp sta /amigos)) (welp sta /mensajes)) %hola sta)
|
2014-07-04 05:47:51 +04:00
|
|
|
::
|
|
|
|
++ jake
|
|
|
|
|= [her=@p msg=^mess]
|
|
|
|
^+ +>
|
|
|
|
%= +>.$
|
|
|
|
giz :_(giz [%sq her %ya [%ra (scot %p her) ~] msg])
|
2014-07-10 21:42:05 +04:00
|
|
|
pro [%pri her]
|
2014-07-04 05:47:51 +04:00
|
|
|
tod (~(put by tod) her +((fall (~(get by tod) her) 0)))
|
|
|
|
==
|
2013-11-26 23:28:15 +04:00
|
|
|
::
|
|
|
|
++ joke :: send message
|
2014-08-01 06:44:49 +04:00
|
|
|
|= msg=zung
|
2013-11-26 23:28:15 +04:00
|
|
|
^+ +>
|
2014-09-11 03:35:03 +04:00
|
|
|
+>(giz :_(giz [%xz [who %chat ~] who %zung msg]))
|
2013-11-26 23:28:15 +04:00
|
|
|
::
|
2014-07-03 02:08:02 +04:00
|
|
|
++ join
|
2014-07-04 05:47:51 +04:00
|
|
|
|= you=user
|
2013-11-26 23:28:15 +04:00
|
|
|
^+ +>
|
2014-07-04 05:47:51 +04:00
|
|
|
?- -.you
|
|
|
|
%in
|
|
|
|
=. ami (~(put by ami) p.you)
|
|
|
|
?. mon +>.$
|
|
|
|
(show %leaf "{(idt p.you)} comes on the air")
|
|
|
|
%out
|
|
|
|
=. ami (~(del by ami) p.p.you)
|
|
|
|
?. mon +>.$
|
|
|
|
(show %leaf "{(idt p.you)} signs off")
|
|
|
|
==
|
2014-07-03 02:08:02 +04:00
|
|
|
++ joyn
|
2014-07-04 05:47:51 +04:00
|
|
|
|= yall=(list idad)
|
|
|
|
^+ +>
|
|
|
|
=. ami (~(gas by ami) yall)
|
|
|
|
?. mon +>.$
|
|
|
|
(shew (turn yall |=(you=idad [%leaf "{(idt you)} is on the air"])))
|
|
|
|
::
|
|
|
|
++ nice :: got response
|
|
|
|
|= [her=@p kay=cape]
|
|
|
|
^+ +>
|
|
|
|
=. +>
|
|
|
|
=+ dyt=(need (~(get by tod) her))
|
|
|
|
%_ +>.$
|
|
|
|
tod
|
|
|
|
?: =(1 dyt)
|
|
|
|
(~(del by tod) her)
|
|
|
|
(~(put by tod) her (dec dyt))
|
|
|
|
==
|
|
|
|
?- kay
|
|
|
|
%good +>
|
|
|
|
%dead (show %leaf "server {(scow %p her)} choked")
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ priv
|
|
|
|
|= [now=@da her=@p mes=^mess]
|
2013-11-26 23:28:15 +04:00
|
|
|
^+ +>
|
2014-07-10 23:01:24 +04:00
|
|
|
(show (rend [her (iden her)] mes "(private) " now))
|
2013-11-26 23:28:15 +04:00
|
|
|
::
|
|
|
|
++ said :: server message
|
2014-07-03 02:08:02 +04:00
|
|
|
|= duz=(list zong)
|
2013-11-26 23:28:15 +04:00
|
|
|
^+ +>
|
|
|
|
?~ duz +>
|
|
|
|
%= $
|
|
|
|
duz t.duz
|
|
|
|
+>
|
2014-05-22 23:28:57 +04:00
|
|
|
?- -.i.duz
|
2014-07-08 05:15:53 +04:00
|
|
|
%mess
|
2014-07-10 23:01:24 +04:00
|
|
|
(show (rend [q.i.duz (iden q.i.duz)] r.i.duz "" p.i.duz))
|
2014-07-03 02:08:02 +04:00
|
|
|
== ==
|
2013-11-26 23:28:15 +04:00
|
|
|
::
|
|
|
|
++ shew |=(tax=(list tank) +>(giz [[%lo tax] giz])) :: print to screen
|
2013-12-09 01:23:03 +04:00
|
|
|
++ show |=(tan=tank +>(giz [[%la tan] giz])) :: print to screen
|
2014-07-03 02:08:02 +04:00
|
|
|
::
|
|
|
|
++ subs
|
|
|
|
|= pax=path
|
|
|
|
^+ +>
|
2014-09-11 03:35:03 +04:00
|
|
|
+>(sub [pax sub], giz :_(giz [%zz /g [%gr pax] %show [who %chat ~] who pax]))
|
2013-11-26 23:28:15 +04:00
|
|
|
::
|
2014-07-04 05:47:51 +04:00
|
|
|
++ take (joke(wak (add ~m1 (max wak est))) %hola sta) :: beat heart
|
2014-08-01 06:44:49 +04:00
|
|
|
++ tint (joke %tint bud) :: init local chat
|
2013-11-26 23:28:15 +04:00
|
|
|
++ toke :: user action
|
2014-07-03 02:08:02 +04:00
|
|
|
|= [now=@da txt=@t]
|
2013-11-26 23:28:15 +04:00
|
|
|
^+ +>
|
2014-05-31 02:41:22 +04:00
|
|
|
?: =(0 txt) +>
|
2014-08-29 01:30:02 +04:00
|
|
|
=+ rey=(rush txt chat(lat (scot da/est)))
|
2013-12-09 01:23:03 +04:00
|
|
|
?~ rey
|
2013-11-26 23:28:15 +04:00
|
|
|
(show %leaf "invalid input")
|
2014-07-10 21:42:05 +04:00
|
|
|
|-
|
2013-12-09 01:23:03 +04:00
|
|
|
?- -.u.rey
|
2014-07-10 21:42:05 +04:00
|
|
|
%all (joke(pro [%pub ~]) %mess sta p.u.rey)
|
2014-07-03 22:14:22 +04:00
|
|
|
%back (joke %backlog sta p.u.rey q.u.rey)
|
2014-07-10 21:42:05 +04:00
|
|
|
%def $(u.rey ?-(-.pro %pub [%all p.u.rey], %pri [%priv p.pro p.u.rey]))
|
2014-08-05 22:35:16 +04:00
|
|
|
%how (shew (turn (lore ^:@/===pub/src/doc/chat/help/txt) |=(a=@t [%leaf (trip a)])))
|
2014-07-04 05:47:51 +04:00
|
|
|
%priv (jake p.u.rey q.u.rey)
|
|
|
|
%who
|
|
|
|
%^ show %rose [", " "" ""]
|
|
|
|
%+ turn (~(tap by ami))
|
2014-07-10 23:01:24 +04:00
|
|
|
|= p=idad
|
|
|
|
:- %leaf
|
|
|
|
%- trip
|
|
|
|
%^ cat 3 %^ cat 3 (scot %p p.p) ' ' q.p
|
2013-11-26 23:28:15 +04:00
|
|
|
==
|
|
|
|
::
|
|
|
|
++ vent :: handle event
|
|
|
|
|= [now=@da pax=path nut=note]
|
|
|
|
^- bowl
|
|
|
|
=. est now
|
|
|
|
=< abet
|
2014-07-03 02:08:02 +04:00
|
|
|
?+ -.pax ~& [%chat-vent-unknown -.nut] +>.$
|
|
|
|
%gr ?> ?=(%gr -.nut)
|
2014-07-04 05:47:51 +04:00
|
|
|
?+ p.nut ~& %chat-vent-logo-fail +>.$
|
|
|
|
%user (join ((hard user) q.nut))
|
|
|
|
%users (joyn ((hard (list idad)) q.nut))
|
2014-08-01 06:44:49 +04:00
|
|
|
%zong =+(zog=((hard zong) q.nut) (said ?:(=(who q.zog) ~ [zog ~])))
|
2014-08-02 03:17:24 +04:00
|
|
|
%zongs (said (flop ((hard (list zong)) q.nut)))
|
2014-07-03 02:08:02 +04:00
|
|
|
==
|
|
|
|
%up ?>(?=(%up -.nut) (toke now p.nut))
|
2014-07-04 05:47:51 +04:00
|
|
|
%ra ?> &(?=(%ow -.nut) ?=(^ t.pax))
|
|
|
|
(nice (need (slaw %p i.t.pax)) p.nut)
|
|
|
|
%wa ?>(?=(%wa -.nut) take)
|
|
|
|
%ya ?> ?=(%lq -.nut)
|
|
|
|
=+ n=((soft ^mess) r.nut)
|
|
|
|
?~ n
|
|
|
|
~& %chat-mess-fail +>+
|
|
|
|
(priv now p.nut u.n)
|
2013-11-26 23:28:15 +04:00
|
|
|
==
|
|
|
|
--
|