MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | SYNOPSIS |
| 2 | string get_ed_buffer_save_object_name(string edited_file) |
| 3 | |
| 4 | DESCRIPTION |
| 5 | This function is called when an interactive user object is |
| 6 | destructed or looses connection through remove_interactive() |
| 7 | while editing with ed() the file edite_file (emergency save). |
| 8 | this_player() is set to the object that loosing connection. |
| 9 | The function should return a file name for the emergency save |
| 10 | file. |
| 11 | |
| 12 | EXAMPLE |
| 13 | string get_ed_buffer_save_object_name(string file) { |
| 14 | return "/players/"+getuid(this_player())+"/.dead_ed_files/" |
| 15 | + explode(file, "/")[<1]; |
| 16 | } |
| 17 | |
| 18 | This breaks up file into its components and stores it in the |
| 19 | user's emergency save directory under the file's basename. |
| 20 | |
| 21 | SEE ALSO |
| 22 | ed(E), destruct(E), remove_interactive(E), valid_write(M) |