;;;;;;; Watch def. /watch to hilite that text in cyan. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; /set attr_watch=xCcyan /def -i watch = \ /let opt_P=0%; \ /test getopts("P:")%; \ /if (opt_P !~ 0) /let _attr_watch=%opt_P%; \ /else /let _attr_watch=%{attr_watch}%; \ /endif%; \ /if (!{#}) \ /quote -S /~listwatch `/list -s -i -mglob watch_${world_type}_%{1-*}%; \ /else \ /eval /def -i -T${world_type} -Fp20 -P2%{_attr_watch} \ -t'\(^|[^A-Za-z]\)\(%1\)\([^A-Za-z]|$$$\)' watch_${world_type}_%1%; \ /endif /def -i ~listwatch = /echo /watch $[substr({L}, 7+strlen(${world_type}))] ${%L} /def -i unwatch = /undef watch_${world_type}_%1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;; add/del_name defs. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; /def -i add_name = \ /let opt_P=0%; \ /test getopts("P:")%; \ /watch -P%{opt_P} %1%; \ /if (!(regmatch(strcat(" ", tolower({1}), " "), {completion_list}))) \ /set completion_list=$[strcat({completion_list}, " ", tolower({1}))]%; \ /endif%; \ /alias -sw %2 !tell %1 /def -i del_name = \ /unwatch %1%; \ /unalias -w %2 /def -i names = /watch ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; as is this only works for Darker Realms, but modifying it for other places ; should be trivial /def -i watched = \ /if ({#} > 0) \ /let _watched_cmd=%*%; \ /else \ /let _watched_cmd=who%; \ /endif%; \ ; /def -i -Fp101 -mregexp -t'^[ 0-9GgESWw]*([A-Z][a-z]*) *' _watched_trig = \ /def -i -Fp101 -mregexp \ -t'^( |[E0-9]|wiz|Wiz|Sen|Eld|god|GOD)*([A-Z][a-z]*) *' _watched_trig = \ /if (!(regmatch(strcat(" ", tolower({P2}), " "), {completion_list}))) \ /substitute%%; \ /endif%; \ /def -i -p100 -mregexp -t'^\$' -ag _watched_gag%; \ /def -i -p102 -n1 -mregexp -t'^There (is|are)' _watched_done = \ /undef _watched_trig%%; \ /undef _watched_gag%; \ %_watched_cmd%; /alias -sx ww /watched who /alias -sx wp /watched p