Disconnect

From Gwen Morse's Wiki
Jump to: navigation, search
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Redefine /quit to disconnect from the current world only 
; if there's any open worlds.  Saves me fscking up and mis-typing 
; /quit to quit from IRC and accidentally restarting tf.
;
;               *** New version for TF 5 ***
;
; Written by Ken Keys <hawkeye at tcp dot com> on the TinyFugue mailing list
; Tue Dec  9 16:50:31 EST 2003

/def -ag -hCONFLICT silent

/def numsockets = /listsockets %* %| /result %?


/def quit =\
  /if (numsockets() == (${world_name} !~ "" && !is_open())) %;\
     /@quit%;\
  /else \
     /dc %*%;\
  /endif

/undef silent