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