File: tools.tf

package info (click to toggle)
tf5 5.0beta8-14
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,976 kB
  • sloc: ansic: 25,499; perl: 103; makefile: 79; sh: 70
file content (45 lines) | stat: -rw-r--r-- 1,131 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
;;;; Miscellaneous useful macros.

/loaded __TFLIB__/tools.tf
/require lisp.tf


; for compatibility
/def -i shl = /sys %*


;;; Put an existing {macro,variable,world} definition in the input window for
;;; editing.
; syntax:  /ed{mac,var,world} <name>

/def -i edmac = /grab $(/cddr $(/@list -i - %{L-@}))
/def -i edvar = /grab $(/@listvar - %{L-@})
/def -i edworld = /grab $(/@listworlds -c - %{L-@})

/def -i reedit = /edmac %*


;;; name - change your name (on a TinyMUD style mud)
; syntax:  /name [<name>]

/def -i name =\
    /if (${world_type} =/ "tiny.mush*") \
        @name me=%{1-${world_character}}%;\
    /elseif (${world_type} =/ "tiny*") \
        @name me=%{1-${world_character}} ${world_password}%;\
    /else \
        /echo -e %% %0: Assuming this is a TinyMUD-like server.%;\
        @name me=%{1-${world_character}} ${world_password}%;\
    /endif


;;; getline - grab the nth line from history and stick it in the input buffer
; syntax:  /getline <n>

/def -i getline = /quote /grab #%{1}-%{1}


;;; xtitle - change the titlebar on an xterm.
; syntax:  /xtitle <text>

/def -i xtitle = /echo -r \033]2;%*\07