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

Last change on this file since 581 was 44, checked in by Sam Hocevar, 11 years ago
  • Importing abuse-frabs 2.10.
File size: 569 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.