@program #266 1 1000 d i $include $lib/alynna $def MARK trig "_mark" getpropstr $def MYNAME dup "%n" getpropstr dup not if pop name else swap pop then $def .tell me @ swap ansi_notify lvar mess (everything is a mess) lvar notifymsg lvar tmp : do-lock trig "_lock" getprop tmp ! ( no _lock prop, open channel ) tmp @ not if 1 "noprop" exit then ( Wizzes always pass ) me @ mlevel 6 >= if 1 "wizard" exit then ( Test for a certain level, if yours is higher than the requirement, you get in. ) tmp @ atoi if me @ mlevel tmp @ atoi >= if 1 "mlev" exit then else ( test for a prop ) me @ tmp @ getprop if 1 "prop" exit then then ( else fail ) 0 "fail" ; : do-help "________________________________________________________".tell "Fool's Moon - New chat server - (C) 2002 Alynna Trypnotk" .tell "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" .tell str command @ " #on - Tunes you into announce" cat .tell str command @ " #off - Tunes you out of announce" cat .tell str command @ " #notify - See when people come on and off." cat .tell str command @ " #!notify - Dont see when people come on and off." cat .tell str command @ " #who - Shows you who online is listening to you" cat .tell str command @ " #pose - Sets your announce pose verb" cat .tell str command @ " #say - Sets your announce say verb" cat .tell str command @ " #help - This screen" cat .tell ; : annit preempt online 1 + begin 1 - dup while swap dup str "@ann/" MARK "/on" cat getprop dup not if pop pop continue then "yes" strcmp not if dup "_ann/notify" getprop not notifymsg @ and if pop else mess @ ansi_notify then else pop then repeat pop ; : do-who str "[Listeners on " command @ "]" cat .tell preempt online 1 + begin 1 - dup while swap dup str "@ann/" MARK "/on" cat getprop dup not if pop pop continue then "yes" strcmp not if dup name 20 lj swap "%n" getpropstr dup not if pop "---" then strcat .tell else pop then repeat pop ; : do-pose me @ str "@ann/" MARK "/on" cat getprop not if pop str me @ "You must turn " command @ " #on!" cat .tell exit then MARK "> " strcat me @ "_ann/pose" getpropstr dup not if pop me @ MYNAME strcat " " strcat swap strcat else strcat ", " strcat me @ name strcat " " strcat swap strcat then 0 notifymsg ! mess ! annit ; : do-say me @ str "@ann/" MARK "/on" cat getprop not if pop str "You must turn " command @ " #on!" cat .tell exit then MARK "> " strcat me @ "_ann/say" getpropstr dup not if pop me @ MYNAME strcat " says, \"" strcat swap strcat "\"" strcat else me @ MYNAME " " strcat swap strcat "s, \"" strcat strcat swap "\"" strcat strcat then 0 notifymsg ! mess ! annit ; : do-on 1 notifymsg ! str MARK "> ^PURPLE^!!!^CYAN^ " me @ MYNAME "^GREEN^ has joined ^CYAN^" MARK "^NORMAL^" cat mess ! annit me @ str "@ann/" MARK "/on" cat "yes" setprop str "^CYAN^You have joined channel " MARK ".^NORMAL^" cat .tell ; : do-off 1 notifymsg ! me @ str "@ann/" MARK "/on" cat remove_prop str MARK "> ^PURPLE^!!!^CYAN^ " me @ MYNAME "^GREEN^ has left ^CYAN^" MARK "^NORMAL^" cat mess ! annit str "^CYAN^You have left channel " MARK ".^NORMAL^" cat .tell ; : do-notifyon me @ str "_ann/notify" cat "yes" setprop str "^PURPLE^!!!^CYAN^ Channel notify^GREEN^ is now set ^CYAN^ON^NORMAL^." cat .tell ; : do-notifyoff me @ str "_ann/notify" cat 0 setprop str "^PURPLE^!!!^CYAN^ Channel notify^GREEN^ is now set ^CYAN^OFF^NORMAL^." cat .tell ; : do-verb-pose 5 strcut swap pop strip dup not if str "Improper verb format! " command @ " #pose " cat .tell pop exit then me @ "_ann/pose" rot setprop "Chat Pose Verb Set!" .tell ; : do-verb-say 5 strcut swap pop strip dup not if str "Improper verb format! " command @ " #say " cat .tell pop exit then me @ "_ann/say" rot setprop "Chat Say Verb Set!" .tell ; : main do-lock pop ( str swap " " me @ " " trig " " cat #314 swap notify ) not if "^RED^Permission denied.^NORMAL^" .tell exit then dup not if do-help exit then dup tolower "#pose" 5 strncmp not if do-verb-pose exit then dup tolower "#say" 4 strncmp not if do-verb-say exit then dup tolower "#help" strcmp not if pop do-help exit then dup tolower "#on" strcmp not if pop do-on exit then dup tolower "#off" strcmp not if pop do-off exit then dup tolower "#notify" strcmp not if pop do-notifyon exit then dup tolower "#!notify" strcmp not if pop do-notifyoff exit then dup tolower "#who" strcmp not if pop do-who exit then dup ":" 1 strncmp not if 1 strcut swap pop do-pose exit then dup ";" 1 strncmp not if 1 strcut swap pop do-pose exit then do-say ; . c q