source: abuse/trunk/data-abuse/lisp/chat.lsp @ 582

Last change on this file since 582 was 582, checked in by Sam Hocevar, 10 years ago

data: remove \r and trailing spaces and tabs from all Lisp sources.

File size: 568 bytes
Line 
1(enable_chatting)
2
3(defun chat_input (str)
4  (if (and (> (length str) 0) (equal (elt str 0) #\/))
5      (if (and (search "/nick " str) (> (length str) 6))
6          (chat_print (concatenate 'string "# " (player_name) " is known as "
7                                   (progn (set_player_name (substr 6 (- (length str) 1) str))
8                                          (player_name))))
9        (if (search "/help" str)
10            (if (local_player)
11                (chat_print "Commands : /nick name, /help"))
12        (if (local_player)
13            (chat_print (concatenate 'string "unknown command " str)))))
14
15    (chat_print (concatenate 'string "<" (player_name) "> " str))))
Note: See TracBrowser for help on using the repository browser.