pymud 0.21.0a3__py3-none-any.whl → 0.21.0a5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pymud/__init__.py +16 -16
- pymud/__main__.py +3 -3
- pymud/decorators.py +234 -0
- pymud/dialogs.py +166 -160
- pymud/extras.py +918 -942
- pymud/i18n.py +63 -42
- pymud/lang/i18n_chs.py +223 -204
- pymud/lang/i18n_eng.py +846 -42
- pymud/logger.py +167 -162
- pymud/main.py +220 -206
- pymud/modules.py +285 -431
- pymud/objects.py +1032 -1030
- pymud/pkuxkx.py +280 -262
- pymud/protocol.py +1010 -1008
- pymud/pymud.py +1286 -1292
- pymud/session.py +3448 -3392
- pymud/settings.py +196 -193
- {pymud-0.21.0a3.dist-info → pymud-0.21.0a5.dist-info}/METADATA +433 -369
- pymud-0.21.0a5.dist-info/RECORD +23 -0
- {pymud-0.21.0a3.dist-info → pymud-0.21.0a5.dist-info}/licenses/LICENSE.txt +674 -674
- pymud-0.21.0a3.dist-info/RECORD +0 -22
- {pymud-0.21.0a3.dist-info → pymud-0.21.0a5.dist-info}/WHEEL +0 -0
- {pymud-0.21.0a3.dist-info → pymud-0.21.0a5.dist-info}/entry_points.txt +0 -0
- {pymud-0.21.0a3.dist-info → pymud-0.21.0a5.dist-info}/top_level.txt +0 -0
pymud/lang/i18n_eng.py
CHANGED
@@ -1,43 +1,847 @@
|
|
1
|
-
TRANSLATION = {
|
2
|
-
"text" : {
|
3
|
-
"welcome" : "Welcome to
|
4
|
-
|
5
|
-
|
6
|
-
"
|
7
|
-
"
|
8
|
-
"
|
9
|
-
"
|
10
|
-
"
|
11
|
-
"
|
12
|
-
"
|
13
|
-
"
|
14
|
-
"
|
15
|
-
"
|
16
|
-
"
|
17
|
-
"
|
18
|
-
"
|
19
|
-
"
|
20
|
-
"
|
21
|
-
"
|
22
|
-
"
|
23
|
-
|
24
|
-
"
|
25
|
-
"
|
26
|
-
|
27
|
-
#
|
28
|
-
"
|
29
|
-
|
30
|
-
"
|
31
|
-
"
|
32
|
-
"
|
33
|
-
"
|
34
|
-
"
|
35
|
-
"
|
36
|
-
|
37
|
-
"
|
38
|
-
"
|
39
|
-
"
|
40
|
-
|
41
|
-
"
|
42
|
-
|
1
|
+
TRANSLATION = {
|
2
|
+
"text" : {
|
3
|
+
"welcome" : "Welcome to PYMUD Client - PKUXKX, the best Chinese MUD game", # the welcome text shown in the statusbar when pymud start
|
4
|
+
|
5
|
+
# text in pymud.py
|
6
|
+
"world" : "World", # the display text of menu "world"
|
7
|
+
"new_session" : "Create New Session", # the display text of sub-menu "new_session"
|
8
|
+
"show_log" : "Show Log Information", # the display text of sub-menu "show_log"
|
9
|
+
"exit" : "Exit", # the display text of sub-menu "exit"
|
10
|
+
"session" : "Session", # the display text of menu "session"
|
11
|
+
"connect" : "Connect/Reconnect", # the display text of sub-menu "connect"
|
12
|
+
"disconnect" : "Disconnect", # the display text of sub-menu "disconnect"
|
13
|
+
"beautify" : "Toggle Beautify Display", # the display text of sub-menu "toggle beautify"
|
14
|
+
"echoinput" : "Toggle Echo Input Commands", # the display text of sub-menu "toggle echo input"
|
15
|
+
"nosplit" : "Disable Split Screen", # the display text of sub-menu "no split"
|
16
|
+
"copy" : "Copy (Plain Text)", # the display text of sub-menu "copy (pure text)"
|
17
|
+
"copyraw" : "Copy (ANSI)", # the display text of sub-menu "copy (raw infomation)"
|
18
|
+
"clearsession" : "Clear Session Content", # the display text of sub-menu "clear session buffer"
|
19
|
+
"closesession" : "Close Current Page", # the display text of sub-menu "close current session"
|
20
|
+
"autoreconnect" : "Toggle Auto Reconnect", # the display text of sub-menu "toggle auto reconnect"
|
21
|
+
"loadconfig" : "Load Script Configuration", # the display text of sub-menu "load config"
|
22
|
+
"reloadconfig" : "Reload Script Configuration", # the display text of sub-menu "reload config"
|
23
|
+
"layout" : "Layout", # the display text of menu "layout" (not used now)
|
24
|
+
"hide" : "Hide Status Window", # the display text of sub-menu "hide status window" (not used now)
|
25
|
+
"horizon" : "Bottom Status Window", # the display text of sub-menu "horizon layout" (not used now)
|
26
|
+
"vertical" : "Right Status Window", # the display text of sub-menu "vertical layout" (not used now)
|
27
|
+
"help" : "Help", # the display text of menu "help"
|
28
|
+
"about" : "About", # the display text of menu "about"
|
29
|
+
|
30
|
+
"session_changed" : "Successfully switched to session: {0}",
|
31
|
+
"input_prompt" : '<prompt><b>Command:</b></prompt>',
|
32
|
+
"msg_copy" : "Copied: {0}",
|
33
|
+
"msg_copylines" : "Copied: {0} lines",
|
34
|
+
"msg_no_selection" : "No content selected...",
|
35
|
+
"msg_session_exists" : "Error! A session named {0} already exists, please try another name.",
|
36
|
+
|
37
|
+
"logfile_name" : "Log File Name",
|
38
|
+
"logfile_size" : "File Size",
|
39
|
+
"logfile_modified" : "Last Modified Time",
|
40
|
+
|
41
|
+
"warning" : "Warning",
|
42
|
+
"warning_exit" : "Application Exit Warning",
|
43
|
+
"session_close_prompt" : "Session {0} is still connected, confirm to close?",
|
44
|
+
"app_exit_prompt" : "There are still {0} sessions {1} connected, confirm to close?",
|
45
|
+
|
46
|
+
"msg_beautify" : "Beautify display is now",
|
47
|
+
"msg_echoinput" : "Echo input commands is set to:",
|
48
|
+
"msg_autoreconnect" : "Auto reconnect is set to:",
|
49
|
+
"msg_open" : "On",
|
50
|
+
"msg_close" : "Off",
|
51
|
+
|
52
|
+
"msg_cmd_session_error" : 'When creating a session with a single parameter, use the format group.name, e.g. #session pkuxkx.newstart',
|
53
|
+
"msg_cmdline_input" : "Command line input:",
|
54
|
+
"msg_no_session" : "No active session currently running.",
|
55
|
+
"msg_invalid_plugins" : "File: {0} is not a valid plugin file, loading error, message: {1}",
|
56
|
+
|
57
|
+
"status_nobeautify" : "Beautify disabled",
|
58
|
+
"status_mouseinh" : "Mouse disabled",
|
59
|
+
"status_ignore" : "Global disable",
|
60
|
+
"status_notconnect" : "Not connected",
|
61
|
+
"status_connected" : "Connected",
|
62
|
+
|
63
|
+
# text in dialogs.py
|
64
|
+
"basic_dialog" : "Basic Dialog",
|
65
|
+
"ok" : "OK",
|
66
|
+
"cancel" : "Cancel",
|
67
|
+
"visit" : "Visit",
|
68
|
+
"displayhelp" : "to view the latest help documentation",
|
69
|
+
"appinfo" : '<b fg="red">PYMUD {0}</b> - a MUD Client Written in Python',
|
70
|
+
"author" : 'Author: <b>{0}</b> <b>E-mail</b>: <u>{1}</u>',
|
71
|
+
"sysversion" : 'System:{} {} Python Version:{}',
|
72
|
+
"sessionname" : "Session Name",
|
73
|
+
"host" : "Server Address",
|
74
|
+
"port" : "Port",
|
75
|
+
"encoding" : "Encoding",
|
76
|
+
"nolog" : "No Log",
|
77
|
+
"chooselog" : "Select Log to View",
|
78
|
+
|
79
|
+
# text in modules.py
|
80
|
+
"configuration_created" : "Configuration object {0}.{1} created successfully.",
|
81
|
+
"configuration_recreated" : "Configuration object {0}.{1} recreated successfully.",
|
82
|
+
"configuration_fail" : "Configuration object {0}.{1} creation failed. Error message: {}",
|
83
|
+
"entity_module" : "Main Configuration Module",
|
84
|
+
"non_entity_module" : "Sub Configuration Module",
|
85
|
+
"load_ok" : "Load completed",
|
86
|
+
"load_fail" : "Load failed",
|
87
|
+
"unload_ok" : "Unload completed",
|
88
|
+
"reload_ok" : "Reload completed",
|
89
|
+
"msg_plugin_unloaded" : "Plugin {0} has been disabled for this session.",
|
90
|
+
"msg_plugin_loaded" : "Plugin {0} has been enabled for this session.",
|
91
|
+
|
92
|
+
# text in objects.py
|
93
|
+
"excpetion_brace_not_matched" : "Invalid code block, number of braces does not match",
|
94
|
+
"exception_quote_not_matched" : "Number of quotes does not match",
|
95
|
+
"exception_forced_async" : "This command contains both forced synchronous and asynchronous commands, will use asynchronous execution, synchronous commands will be invalid.",
|
96
|
+
"exception_session_type_fail" : "session must be an instance of Session type object!",
|
97
|
+
"exception_message" : "Exception information: <{}> {}",
|
98
|
+
"exception_traceback" : "Exception occurred at line number {1} in file '{0}', and function name is '{2}'",
|
99
|
+
"script_error" : "Script Error",
|
100
|
+
|
101
|
+
# text display in session.py
|
102
|
+
"msg_var_autoload_success" : "Variables automatically loaded from {0} successfully.",
|
103
|
+
"msg_var_autoload_fail" : "Failed to automatically load variables from {0}, error message: {1}.",
|
104
|
+
"msg_auto_script" : "Will automatically load the following modules: {0}",
|
105
|
+
"msg_connection_fail" : "Error occurred during connection creation, time: {0}, error message: {1}.",
|
106
|
+
"msg_auto_reconnect" : "Will automatically reconnect in {0} seconds...",
|
107
|
+
"msg_connected" : "{0}: Successfully connected to server.",
|
108
|
+
"msg_disconnected" : "{0}: Disconnected from server.",
|
109
|
+
"msg_duplicate_logname" : "A logger named {0} already exists in other sessions, will return this logger directly.",
|
110
|
+
"msg_default_statuswindow" : "This is a default status window message\nSession: {0} Connection Status: {1}",
|
111
|
+
"msg_mxp_not_support" : "MXP support is not yet developed, please do not enable MXP support settings for now!",
|
112
|
+
"msg_no_session" : "No session named {0} exists.",
|
113
|
+
"msg_num_positive" : "#{num} {cmd} only supports positive integers!",
|
114
|
+
"msg_cmd_not_recognized" : "Unrecognized command: {0}",
|
115
|
+
"msg_id_not_consistent" : "Object {0} dictionary key {1} does not match its id {2}, will discard key and add to session using its id...",
|
116
|
+
"msg_shall_be_string" : "{0} must be string type",
|
117
|
+
"msg_shall_be_list_or_tuple" : "{0} names should be tuple or list, other types not accepted",
|
118
|
+
"msg_names_and_values" : "names and values should not be empty and have equal length",
|
119
|
+
"msg_not_null" : "{0} cannot be null",
|
120
|
+
"msg_topic_not_found" : "Topic {0} not found, please confirm input is correct.",
|
121
|
+
"Day" : "Day",
|
122
|
+
"Hour" : "Hour",
|
123
|
+
"Minute" : "Minute",
|
124
|
+
"Second" : "Second",
|
125
|
+
"msg_connection_duration" : "Connected to server for: {0}",
|
126
|
+
"msg_no_object" : "No {1} named {0} exists in current session.",
|
127
|
+
"msg_no_global_object" : "No {1} named {0} exists in global space.",
|
128
|
+
"msg_object_value_setted" : "Successfully set {0} {1} value to {2}.",
|
129
|
+
"variable" : "variable",
|
130
|
+
"globalvar" : "global variable",
|
131
|
+
"msg_object_not_exists" : "No {1} with key {0} exists in current session, please confirm and try again.",
|
132
|
+
"msg_object_enabled" : "Object {0} enabled status is now on.",
|
133
|
+
"msg_object_disabled" : "Object {0} enabled status is now off.",
|
134
|
+
"msg_object_deleted" : "Object {0} has been deleted from session.",
|
135
|
+
"msg_object_param_invalid" : "#{0} command's second parameter only accepts on/off/del",
|
136
|
+
"msg_ignore_on" : "All trigger enables are globally disabled.",
|
137
|
+
"msg_ignore_off" : "No longer globally disable all trigger enables.",
|
138
|
+
"msg_T_plus_incorrect" : "#T+ enable group usage incorrect, correct usage example: #t+ mygroup \nPlease use #help ignore for query.",
|
139
|
+
"msg_T_minus_incorrect" : "#T- disable group usage incorrect, correct usage example: #t- mygroup \nPlease use #help ignore for query.",
|
140
|
+
"msg_group_enabled" : "Group {0}: {1} aliases, {2} triggers, {3} commands, {4} timers, {5} GMCP triggers are all enabled.",
|
141
|
+
"msg_group_disabled" : "Group {0}: {1} aliases, {2} triggers, {3} commands, {4} timers, {5} GMCP triggers are all disabled.",
|
142
|
+
"msg_repeat_invalid" : "Current session is not connected or no command has been entered, repeat invalid",
|
143
|
+
"msg_window_title" : "Message from session {0}",
|
144
|
+
"msg_module_load_fail" : "Module {0} load failed, exception: {1}, type: {2}.",
|
145
|
+
"msg_exception_traceback" : "Exception traceback: {0}",
|
146
|
+
"msg_module_not_loaded" : "Specified module name {0} is not loaded.",
|
147
|
+
"msg_all_module_reloaded" : "All configuration modules reloaded successfully.",
|
148
|
+
"msg_plugins_reloaded" : "Plugin {0} reloaded successfully.",
|
149
|
+
"msg_name_not_found" : "Specified name {0} neither found as module nor plugin, reload failed...",
|
150
|
+
"msg_no_module" : "No modules loaded in current session.",
|
151
|
+
"msg_module_list" : "Current session has loaded {0} modules, including (in loading order): {1}.",
|
152
|
+
"msg_module_configurations" : "Module {0} contains configurations: {1}.",
|
153
|
+
"msg_submodule_no_config" : "Module {0} is a submodule, contains no configurations.",
|
154
|
+
"msg_module_not_loaded" : "No module named {0} exists in this session, may not be loaded to this session yet.",
|
155
|
+
"msg_variables_saved" : "Session variable information saved to {0}.",
|
156
|
+
"msg_alias_created" : "Alias {0} created successfully: {1}",
|
157
|
+
"msg_trigger_created" : "Trigger {0} created successfully: {1}",
|
158
|
+
"msg_timer_created" : "Timer {0} created successfully: {1}",
|
159
|
+
|
160
|
+
"msg_tri_triggered" : " {0} triggered normally.",
|
161
|
+
"msg_tri_wildcards" : " Captured: {0}",
|
162
|
+
"msg_tri_prevent" : " {0}This trigger does not have keepEval enabled, will prevent subsequent triggers.{1}",
|
163
|
+
"msg_tri_ignore" : " {1}{0} can trigger, but due to priority and keepEval settings, trigger will not activate.{2}",
|
164
|
+
"msg_tri_matched" : " {0} can match trigger.",
|
165
|
+
"msg_enabled_summary_0" : "{0} Among enabled triggers, none can trigger.",
|
166
|
+
"msg_enabled_summary_1" : "{0} Among enabled triggers, {1} can trigger, actually triggered {2}, another {3} will not activate due to keepEval.",
|
167
|
+
"msg_enabled_summary_2" : "{0} Among enabled triggers, all {1} can trigger normally.",
|
168
|
+
"msg_disabled_summary_0" : "{0} Among disabled triggers, {1} can match.",
|
169
|
+
"msg_disabled_summary_1" : "{0} Disabled triggers, none can match.",
|
170
|
+
"msg_test_summary_0" : " Test content: {0}",
|
171
|
+
"msg_test_summary_1" : " Test result: No matching triggers.",
|
172
|
+
"msg_test_summary_2" : " Test result: {0} triggers can trigger normally, total {1} satisfy matching requirements.",
|
173
|
+
"msg_test_title" : "Trigger Test - {0}",
|
174
|
+
"msg_triggered_mode" : "'Response Mode'",
|
175
|
+
"msg_matched_mode" : "'Test Mode'",
|
176
|
+
|
177
|
+
"msg_no_plugins" : "PYMUD currently has no plugins loaded.",
|
178
|
+
"msg_plugins_list" : "PYMUD currently has {0} plugins loaded, respectively:",
|
179
|
+
"msg_plugins_info" : "Author {2} Version {1} Release Date {3}\n Description: {0}",
|
180
|
+
|
181
|
+
"msg_py_exception" : "Python execution error: {0}",
|
182
|
+
|
183
|
+
"title_msg" : "Message",
|
184
|
+
"title_warning" : "Warning",
|
185
|
+
"title_error" : "Error",
|
186
|
+
"title_info" : "Info",
|
187
|
+
|
188
|
+
"msg_log_title" : "Logger status in this session:",
|
189
|
+
"msg_log_title2" : "Logger status in other sessions of this application:",
|
190
|
+
"logger" : "Logger",
|
191
|
+
"enabled" : "Enabled",
|
192
|
+
"disabled" : "Disabled",
|
193
|
+
"logger_status" : "Current Status",
|
194
|
+
"file_mode" : "File Mode",
|
195
|
+
"logger_mode" : "Log Mode",
|
196
|
+
"ANSI" : "ANSI",
|
197
|
+
"plain_text" : "Plain Text",
|
198
|
+
|
199
|
+
"filemode_new" : "New",
|
200
|
+
"filemode_append" : "Append",
|
201
|
+
"filemode_overwrite" : "Overwrite",
|
202
|
+
|
203
|
+
"msg_logger_enabled" : "{0}: Logger {1} enabled with {2} file mode and {3} log mode.",
|
204
|
+
"msg_logger_disabled" : "{0}: Logger {1} logging disabled.",
|
205
|
+
"msg_logfile_not_exists" : "Specified log file {0} does not exist.",
|
206
|
+
|
207
|
+
"exception_logmode_error" : "Invalid log mode: {0}",
|
208
|
+
"exception_plugin_file_not_found" : "Specified plugin file {0} does not exist or format is incorrect.",
|
209
|
+
},
|
210
|
+
|
211
|
+
"docstring" : {
|
212
|
+
"PyMudApp": {
|
213
|
+
"handle_session" :
|
214
|
+
'''
|
215
|
+
The execution function of the embedded command #session, used to create a remote connection session.
|
216
|
+
This function should not be called directly in the code.
|
217
|
+
|
218
|
+
Usage:
|
219
|
+
- #session {name} {host} {port} {encoding}
|
220
|
+
- When Encoding is not specified, the default encoding is utf-8.
|
221
|
+
- You can directly use #{name} to switch sessions and operate session commands.
|
222
|
+
|
223
|
+
- #session {group}.{name}
|
224
|
+
- This is equivalent to directly clicking the {name} menu under the {group} menu to create a session. If the session already exists, switch to that session.
|
225
|
+
|
226
|
+
Parameters:
|
227
|
+
:name: Session name
|
228
|
+
:host: Server domain name or IP address
|
229
|
+
:port: Port number
|
230
|
+
:encoding: Encoding format. If not specified, the default is utf8.
|
231
|
+
|
232
|
+
:group: Group name, which is a keyword under the sessions field in the configuration file.
|
233
|
+
:name: Shortcut name for the session, which is a keyword under the chars field of the above group keyword.
|
234
|
+
|
235
|
+
Examples:
|
236
|
+
``#session {name} {host} {port} {encoding}``
|
237
|
+
Create a remote connection session, connect to the specified port of the remote host using the specified encoding format, and save it as {name}. The encoding can be omitted, in which case the value of Settings.server["default_encoding"] will be used, with a default of utf8.
|
238
|
+
``#session newstart mud.pkuxkx.net 8080 GBK``
|
239
|
+
Connect to port 8080 of mud.pkuxkx.net using GBK encoding, and name the session newstart.
|
240
|
+
``#session newstart mud.pkuxkx.net 8081``
|
241
|
+
Connect to port 8081 of mud.pkuxkx.net using UTF8 encoding, and name the session newstart.
|
242
|
+
``#newstart``
|
243
|
+
Switch the session named newstart to the current session.
|
244
|
+
``#newstart give miui gold``
|
245
|
+
Make the session named newstart execute the "give miui gold" command without switching to that session.
|
246
|
+
|
247
|
+
``#session pkuxkx.newstart``
|
248
|
+
Create a session through the specified shortcut configuration, which is equivalent to clicking the World -> pkuxkx -> newstart menu to create a session. If the session exists, switch to that session.
|
249
|
+
|
250
|
+
Related commands:
|
251
|
+
- #close
|
252
|
+
- #exit
|
253
|
+
|
254
|
+
''',
|
255
|
+
|
256
|
+
|
257
|
+
},
|
258
|
+
"Session": {
|
259
|
+
"handle_exit" :
|
260
|
+
'''
|
261
|
+
The execution function of the embedded command #exit, used to exit the `PyMudApp` application.
|
262
|
+
This function should not be called directly in the code.
|
263
|
+
|
264
|
+
*Note: When there are sessions still connected in the application, exiting the application with #exit will pop up dialog boxes one by one to confirm whether to close these sessions.*
|
265
|
+
|
266
|
+
Related commands:
|
267
|
+
- #close
|
268
|
+
- #session
|
269
|
+
''',
|
270
|
+
|
271
|
+
"handle_close" :
|
272
|
+
'''
|
273
|
+
The execution function of the embedded command #close, used to close the current session and remove it from the session list of `PyMudApp`.
|
274
|
+
This function should not be called directly in the code.
|
275
|
+
|
276
|
+
*Note: When the current session is connected, closing the session with #close will pop up a dialog box to confirm whether to close.*
|
277
|
+
|
278
|
+
Related commands:
|
279
|
+
- #exit
|
280
|
+
- #session
|
281
|
+
''',
|
282
|
+
|
283
|
+
"handle_variable" :
|
284
|
+
'''
|
285
|
+
The execution function of the embedded command #variable / #var, used to operate session variables.
|
286
|
+
This command can be used with no parameters, one parameter, or two parameters.
|
287
|
+
This function should not be called directly in the code.
|
288
|
+
|
289
|
+
Usage:
|
290
|
+
- #var: List all variables in this session.
|
291
|
+
- #var {name}: List the value of the variable named {name} in this session.
|
292
|
+
- #var {name} {value}: Set the value of the variable named {name} in this session to {value}, create it if it does not exist.
|
293
|
+
|
294
|
+
Parameters:
|
295
|
+
:name: Variable name.
|
296
|
+
:value: Variable value. Note: After assignment, this value will be of type str!
|
297
|
+
|
298
|
+
Related commands:
|
299
|
+
- #global
|
300
|
+
''',
|
301
|
+
|
302
|
+
"handle_global" :
|
303
|
+
'''
|
304
|
+
The execution function of the embedded command #global, used to operate global variables.
|
305
|
+
This command can be used with no parameters, one parameter, or two parameters.
|
306
|
+
This function should not be called directly in the code.
|
307
|
+
|
308
|
+
Usage:
|
309
|
+
- #global: List all global variables.
|
310
|
+
- #global {name}: List the value of the global variable named {name}.
|
311
|
+
- #global {name} {value}: Set the value of the global variable named {name} to {value}, create it if it does not exist.
|
312
|
+
|
313
|
+
Parameters:
|
314
|
+
:name: Variable name.
|
315
|
+
:value: Variable value. Note: After assignment, this value will be of type str!
|
316
|
+
|
317
|
+
Related commands:
|
318
|
+
- #variable
|
319
|
+
''',
|
320
|
+
|
321
|
+
"handle_task" :
|
322
|
+
'''
|
323
|
+
The execution function of the embedded command #task, used to display all managed task lists (for debugging only).
|
324
|
+
This function should not be called directly in the code.
|
325
|
+
|
326
|
+
Note:
|
327
|
+
When there are many managed tasks, this command will affect system response.
|
328
|
+
''',
|
329
|
+
|
330
|
+
"handle_ignore" :
|
331
|
+
'''
|
332
|
+
The execution function of the embedded commands #ignore / #ig, #t+ / #t-, used to handle enable/disable status.
|
333
|
+
This function should not be called directly in the code.
|
334
|
+
|
335
|
+
Usage:
|
336
|
+
- #ig: Toggle the global enable/disable status of triggers.
|
337
|
+
- #t+ {group}: Enable all objects in the {group} group, including aliases, triggers, commands, timers, GMCP triggers, etc.
|
338
|
+
- #t- {group}: Disable all objects in the {group} group, including aliases, triggers, commands, timers, GMCP triggers, etc.
|
339
|
+
|
340
|
+
Parameters:
|
341
|
+
:group: Group name.
|
342
|
+
|
343
|
+
Examples:
|
344
|
+
- ``#ig``: Toggle the global enable/disable status of triggers. When disabled, "Global disabled" will be displayed in the lower right corner of the status bar.
|
345
|
+
- ``#t+ mygroup``: Enable all objects in the group named mygroup, including aliases, triggers, commands, timers, GMCP triggers, etc.
|
346
|
+
- ``#t- mygroup``: Disable all objects in the group named mygroup, including aliases, triggers, commands, timers, GMCP triggers, etc.
|
347
|
+
|
348
|
+
Related commands:
|
349
|
+
- #trigger
|
350
|
+
- #alias
|
351
|
+
- #timer
|
352
|
+
''',
|
353
|
+
|
354
|
+
"handle_help" :
|
355
|
+
'''
|
356
|
+
The execution function of the embedded command #help, used to display help information for the specified topic.
|
357
|
+
This function should not be called directly in the code.
|
358
|
+
|
359
|
+
Usage:
|
360
|
+
- #help: Display a list of all available commands.
|
361
|
+
- #help <topic>: Display help information for the specified topic.
|
362
|
+
|
363
|
+
Examples:
|
364
|
+
- #help alias: Display help information for the alias command.
|
365
|
+
- #help trigger: Display help information for the trigger command.
|
366
|
+
''',
|
367
|
+
|
368
|
+
"handle_test" :
|
369
|
+
'''
|
370
|
+
The execution function of the embedded command #test/#show/#echo, trigger testing command. Similar to zmud's #show command.
|
371
|
+
This function should not be called directly in the code.
|
372
|
+
|
373
|
+
Usage:
|
374
|
+
- #show {some_text}: Test trigger response when receives {some_text}. Triggers won't actually execute.
|
375
|
+
- #test {some_text}: Difference from #show is that matched triggers will execute regardless of enabled status.
|
376
|
+
- #echo {some_text}: Simulate receiving {some_text} from server, triggers will execute normally but won't display test results.
|
377
|
+
|
378
|
+
Examples:
|
379
|
+
- ``#show You take a deep breath and stand up.``: Simulate trigger testing when server receives "You take a deep breath and stand up." (display test results only)
|
380
|
+
- ``#test %copy``: Copy a sentence and simulate trigger testing when server receives the copied content again
|
381
|
+
- ``#test You take a deep breath and stand up.``: Actual trigger execution will occur even if disabled
|
382
|
+
- ``#echo You take a deep breath and stand up.``: Simulate trigger testing when server receives "You take a deep breath and stand up." (won't display test results)
|
383
|
+
|
384
|
+
Notes:
|
385
|
+
- #show command only displays test results without actual trigger execution
|
386
|
+
- #test command forces actual trigger execution regardless of enabled status
|
387
|
+
- #echo command can be used to manually trigger triggers
|
388
|
+
''',
|
389
|
+
|
390
|
+
"handle_timer" :
|
391
|
+
'''
|
392
|
+
The execution function of embedded command #timer/#ti for timer operations. Can be used with 0-2 parameters.
|
393
|
+
This function should not be called directly in the code.
|
394
|
+
|
395
|
+
Usage:
|
396
|
+
- #ti: Show all timers in current session
|
397
|
+
- #ti {ti_id}: Show details of timer with ID {ti_id}
|
398
|
+
- #ti {ti_id} {on/off/del}: Enable/disable/delete timer with ID {ti_id}
|
399
|
+
- #ti {second} {code}: Create new timer with interval {second} seconds executing {code}
|
400
|
+
- PyMUD supports multiple concurrent timers
|
401
|
+
|
402
|
+
Parameters:
|
403
|
+
:ti_id: Timer ID
|
404
|
+
:on: Enable
|
405
|
+
:off: Disable
|
406
|
+
:del: Delete
|
407
|
+
:second: Interval in seconds for new timer
|
408
|
+
:code: Code to execute when timer triggers
|
409
|
+
|
410
|
+
Examples:
|
411
|
+
- ``#ti``: List all timers
|
412
|
+
- ``#ti my_timer``: Show details of 'my_timer' timer
|
413
|
+
- ``#ti my_timer on``: Enable 'my_timer' timer
|
414
|
+
- ``#ti my_timer off``: Disable 'my_timer' timer
|
415
|
+
- ``#ti my_timer del``: Delete 'my_timer' timer
|
416
|
+
- ``#ti 100 {drink jiudai;#wa 200;eat liang}``: Create timer executing drink/eat commands every 100 seconds
|
417
|
+
|
418
|
+
Related commands:
|
419
|
+
- #alias
|
420
|
+
- #trigger
|
421
|
+
- #command
|
422
|
+
''',
|
423
|
+
|
424
|
+
"handle_command" :
|
425
|
+
'''
|
426
|
+
The execution function of the embedded command #command / #cmd for command operations. Can be used with 0-2 parameters.
|
427
|
+
This function should not be called directly in the code.
|
428
|
+
|
429
|
+
Usage:
|
430
|
+
- #cmd: Show all commands in current session
|
431
|
+
- #cmd {cmd_id}: Show details of command with ID {cmd_id}
|
432
|
+
- #cmd {cmd_id} {on/off/del}: Enable/disable/delete command with ID {cmd_id}
|
433
|
+
- Commands can only be created through script code due to their special nature
|
434
|
+
|
435
|
+
Parameters:
|
436
|
+
:cmd_id: Command ID
|
437
|
+
:on: Enable
|
438
|
+
:off: Disable
|
439
|
+
:del: Delete
|
440
|
+
|
441
|
+
Examples:
|
442
|
+
- ``#cmd`` : No parameters, list all commands
|
443
|
+
- ``#cmd my_cmd`` : Single parameter, show details of 'my_cmd' command
|
444
|
+
- ``#cmd my_cmd on`` : Two parameters, enable 'my_cmd' command
|
445
|
+
- ``#cmd my_cmd off`` : Two parameters, disable 'my_cmd' command
|
446
|
+
- ``#cmd my_cmd del`` : Two parameters, delete 'my_cmd' command
|
447
|
+
|
448
|
+
Related commands:
|
449
|
+
- #alias
|
450
|
+
- #trigger
|
451
|
+
- #timer
|
452
|
+
''',
|
453
|
+
|
454
|
+
"handle_warning" :
|
455
|
+
'''
|
456
|
+
The execution function of the embedded command #warning, using session.warning to output messages for testing.
|
457
|
+
This function should not be called directly in the code.
|
458
|
+
|
459
|
+
Usage:
|
460
|
+
- #warning {msg}
|
461
|
+
|
462
|
+
Related commands:
|
463
|
+
- #info
|
464
|
+
- #error
|
465
|
+
''',
|
466
|
+
|
467
|
+
"handle_error" :
|
468
|
+
'''
|
469
|
+
The execution function of the embedded command #error, using session.error to output messages for testing.
|
470
|
+
This function should not be called directly in the code.
|
471
|
+
|
472
|
+
Usage:
|
473
|
+
- #error {msg}
|
474
|
+
|
475
|
+
Related commands:
|
476
|
+
- #info
|
477
|
+
- #warning
|
478
|
+
''',
|
479
|
+
|
480
|
+
"handle_log" :
|
481
|
+
'''
|
482
|
+
Execution function for the embedded command #log, controlling the logging status of the current session.
|
483
|
+
This function should not be called directly in code.
|
484
|
+
|
485
|
+
Usage:
|
486
|
+
- #log : Display status of all loggers
|
487
|
+
- #log start [logger-name] [-a|-w|-n] [-r] : Start a logger
|
488
|
+
|
489
|
+
Parameters:
|
490
|
+
- :logger-name: Logger name. When unspecified, uses session name (default session logger)
|
491
|
+
- :-a|-w|-n: File mode selection.
|
492
|
+
-a Append mode (default), adds to end of existing log file
|
493
|
+
-w Overwrite mode, clears existing file and starts fresh
|
494
|
+
-n New mode, creates timestamped file in name.now.log format
|
495
|
+
- :-r: Enable raw logging mode
|
496
|
+
|
497
|
+
- #log stop [logger-name] : Stop a logger
|
498
|
+
|
499
|
+
Parameters:
|
500
|
+
- :logger-name: Logger name. When unspecified, uses session name (default session logger)
|
501
|
+
|
502
|
+
- #log show [loggerFile]: Display all logs or specific log file
|
503
|
+
|
504
|
+
Parameters:
|
505
|
+
- :loggerFile: Specific log file to display. Shows directory listing when unspecified
|
506
|
+
|
507
|
+
Examples:
|
508
|
+
- ``#log`` : List all logger statuses in current session
|
509
|
+
- ``#log start`` : Start default session logger (using session name). Logs in plain text mode to log/name.log in append mode
|
510
|
+
- ``#log start -r`` : Start default logger in raw mode
|
511
|
+
- ``#log start chat`` : Start 'chat' logger for specific logging via .log() calls
|
512
|
+
- ``#log stop`` : Stop default session logger
|
513
|
+
|
514
|
+
Notes:
|
515
|
+
- File mode changes (-a/-w/-n) only take effect on next logger start
|
516
|
+
- Logging mode (-r) changes take effect immediately
|
517
|
+
''',
|
518
|
+
|
519
|
+
"handle_gmcp" :
|
520
|
+
'''
|
521
|
+
Execution function for the embedded command #gmcp, used to manage GMCPTriggers.
|
522
|
+
This command can be used with no parameters, one parameter, or two parameters.
|
523
|
+
This function should not be called directly in code.
|
524
|
+
|
525
|
+
Usage:
|
526
|
+
- #gmcp: Display all GMCPTriggers in this session
|
527
|
+
- #gmcp {gmcp_key}: Show details of the GMCPTrigger named {gmcp_key} in this session
|
528
|
+
- #gmcp {gmcp_key} {on/off/del}: Enable/disable/delete the GMCPTrigger named {gmcp_key} in this session
|
529
|
+
- Note: GMCPTriggers can only be created through script code due to their special nature
|
530
|
+
|
531
|
+
Parameters:
|
532
|
+
:gmcp_key: Name/identifier of the GMCPTrigger
|
533
|
+
:on: Enable
|
534
|
+
:off: Disable
|
535
|
+
:del: Delete
|
536
|
+
|
537
|
+
Examples:
|
538
|
+
- ``#gmcp`` : No parameters, list all GMCPTriggers in current session
|
539
|
+
- ``#gmcp GMCP.Move`` : Single parameter, display details of GMCPTrigger named GMCP.Move
|
540
|
+
- ``#gmcp GMCP.Move on`` : Two parameters, enable GMCPTrigger named GMCP.Move (enabled = True)
|
541
|
+
- ``#gmcp GMCP.Move off`` : Two parameters, disable GMCPTrigger named GMCP.Move (enabled = False)
|
542
|
+
- ``#gmcp GMCP.Move del`` : Two parameters, delete GMCPTrigger named GMCP.Move
|
543
|
+
|
544
|
+
Related commands:
|
545
|
+
- #alias
|
546
|
+
- #trigger
|
547
|
+
- #timer
|
548
|
+
''',
|
549
|
+
|
550
|
+
"handle_plugins" :
|
551
|
+
'''
|
552
|
+
Execution function for the embedded command #plugins, displays plugin information. Can be used with no parameters or one parameter.
|
553
|
+
This function should not be called directly in code.
|
554
|
+
|
555
|
+
Usage:
|
556
|
+
- #plugins: Show list of all plugins loaded in current session
|
557
|
+
- #plugins {myplug}: Show detailed information for plugin named myplug
|
558
|
+
|
559
|
+
Related commands:
|
560
|
+
- #modules
|
561
|
+
''',
|
562
|
+
|
563
|
+
"handle_replace" :
|
564
|
+
'''
|
565
|
+
Execution function for the embedded command #replace, modifies display content by replacing original line content with new message. No newline needed.
|
566
|
+
This function should not be called directly in code.
|
567
|
+
|
568
|
+
Usage:
|
569
|
+
- #replace {new_display}: Replace current line display with {new_display}
|
570
|
+
|
571
|
+
Parameters:
|
572
|
+
- :new_display: Replacement display content (supports ANSI color codes)
|
573
|
+
|
574
|
+
Example:
|
575
|
+
- ``#replace %raw - Captured this line`` : Add annotation after captured line information
|
576
|
+
|
577
|
+
Note:
|
578
|
+
- Should be used in synchronous trigger processing. For multi-line triggers, replacement only affects last line.
|
579
|
+
|
580
|
+
Related commands:
|
581
|
+
- #gag
|
582
|
+
''',
|
583
|
+
|
584
|
+
"handle_all" :
|
585
|
+
'''
|
586
|
+
Execution function for embedded command #all, sends same command to all sessions.
|
587
|
+
This function should not be called directly in code.
|
588
|
+
|
589
|
+
Usage:
|
590
|
+
- #all {command}: Broadcast specified command to all sessions in current application
|
591
|
+
|
592
|
+
Parameters:
|
593
|
+
:command: Command to broadcast
|
594
|
+
|
595
|
+
Example:
|
596
|
+
- #all look: Execute 'look' command in all sessions
|
597
|
+
- #all #cls: Clear display content for all sessions
|
598
|
+
''',
|
599
|
+
"handle_save" :
|
600
|
+
'''
|
601
|
+
The execution function of the embedded command #save, which saves the current session variables (excluding system variables and temporary variables) to a file. This command does not take any parameters.
|
602
|
+
System variables include %line, %copy, and %raw. Temporary variables refer to variables whose names start with an underscore.
|
603
|
+
This function should not be called directly in the code.
|
604
|
+
|
605
|
+
Usage:
|
606
|
+
- #save: Save the current session variables.
|
607
|
+
|
608
|
+
Notes:
|
609
|
+
1. The file is saved in the current directory with the name {session_name}.mud.
|
610
|
+
2. The Python pickle module is used to save variables, so all variables should be type introspective.
|
611
|
+
3. Although variables support all Python types, it is still recommended to use only serializable types in variables.
|
612
|
+
4. namedtuple is not recommended because type matching will fail after loading, and two namedtuples with the same definition will not be considered the same type.
|
613
|
+
|
614
|
+
Related commands:
|
615
|
+
- #variable
|
616
|
+
''',
|
617
|
+
|
618
|
+
"handle_reset" :
|
619
|
+
'''
|
620
|
+
The execution function of the embedded command #reset, which resets all scripts. This command does not take any parameters.
|
621
|
+
The reset operation will reset all triggers, commands, and incomplete tasks, and clear all triggers, commands, aliases, and variables.
|
622
|
+
This function should not be called directly in the code.
|
623
|
+
|
624
|
+
Usage:
|
625
|
+
- #reset: Reset all scripts.
|
626
|
+
|
627
|
+
Related commands:
|
628
|
+
- #load
|
629
|
+
- #unload
|
630
|
+
- #reload
|
631
|
+
''',
|
632
|
+
|
633
|
+
"handle_load" :
|
634
|
+
'''
|
635
|
+
The execution function of the embedded command #load, which performs module loading operations for the current session. When loading multiple modules, separate them with spaces or commas.
|
636
|
+
This function should not be called directly in the code.
|
637
|
+
|
638
|
+
Usage:
|
639
|
+
- #load {mod1}: Load a module with the specified name.
|
640
|
+
- #load {mod1} {mod2} ... {modn}: Load multiple modules with the specified names.
|
641
|
+
- #load {mod1},{mod2},...{modn}: Load multiple modules with the specified names.
|
642
|
+
- Note: When loading multiple modules, they will be loaded one by one in sequence. Therefore, if there are dependencies between modules, please pay attention to the order.
|
643
|
+
|
644
|
+
Parameters:
|
645
|
+
:modx: Module name.
|
646
|
+
|
647
|
+
Examples:
|
648
|
+
- ``#load myscript`` : Load the myscript module. First, it will look for the myscript.py file in the current directory where the PyMUD application is executed and load it.
|
649
|
+
- ``#load pymud.pkuxkx`` : Load the pymud.pkuxkx module, which is equivalent to the import pymud.pkuxkx command in the script.
|
650
|
+
- ``#load myscript1 myscript2`` : Load the myscript1 and myscript2 modules in sequence.
|
651
|
+
- ``#load myscript1,myscript2`` : Multiple scripts can also be separated by commas.
|
652
|
+
|
653
|
+
Related commands:
|
654
|
+
- #unload
|
655
|
+
- #reload
|
656
|
+
- #module
|
657
|
+
''',
|
658
|
+
|
659
|
+
"handle_unload" :
|
660
|
+
'''
|
661
|
+
The execution function of the embedded command #unload, which unloads modules.
|
662
|
+
This function should not be called directly in the code.
|
663
|
+
|
664
|
+
Usage:
|
665
|
+
- #unload {modname}: Unload a loaded module with the specified name.
|
666
|
+
- #unload {mod1} {mod2} ... {modn}: Unload multiple modules/plugins with the specified names.
|
667
|
+
- #unload {mod1},{mod2},...{modn}: Unload multiple modules/plugins with the specified names.
|
668
|
+
- Note: When unloading a module, the objects created by the module will not be automatically cleaned up. Instead, the unload method of the Configuration class in the module will be called. If you need to clean up the objects created by the module, please explicitly put the cleanup code in this method.
|
669
|
+
|
670
|
+
Parameters:
|
671
|
+
:modname: Module name.
|
672
|
+
:modn: Module name.
|
673
|
+
|
674
|
+
Examples:
|
675
|
+
- ``#unload mymodule``: Unload the module named mymodule (and call the unload method of the Configuration class in it if it exists).
|
676
|
+
|
677
|
+
Related commands:
|
678
|
+
- #load
|
679
|
+
- #reload
|
680
|
+
- #module
|
681
|
+
''',
|
682
|
+
"handle_modules" :
|
683
|
+
'''
|
684
|
+
The execution function of the embedded command #modules, used to manage loaded configuration modules.
|
685
|
+
This function should not be called directly in the code.
|
686
|
+
|
687
|
+
Usage:
|
688
|
+
- #modules: List all loaded modules in the current session.
|
689
|
+
- #modules <module>: Display the configuration details of the specified module.
|
690
|
+
|
691
|
+
Parameters:
|
692
|
+
:module: Module name (optional).
|
693
|
+
''',
|
694
|
+
|
695
|
+
"handle_reload" :
|
696
|
+
'''
|
697
|
+
The execution function of the embedded command #reload, used to reload modules/plugins.
|
698
|
+
This function should not be called directly in the code.
|
699
|
+
|
700
|
+
Usage:
|
701
|
+
- #reload: Reload all loaded modules.
|
702
|
+
- #reload {modname}: Reload the module named modname.
|
703
|
+
- #reload {plugins}: Reload the plugin named plugins.
|
704
|
+
- #reload {mod1} {mod2} ... {modn}: Reload multiple modules/plugins with specified names.
|
705
|
+
- #reload {mod1},{mod2},...{modn}: Reload multiple modules/plugins with specified names.
|
706
|
+
|
707
|
+
Parameters:
|
708
|
+
:modname: Module name.
|
709
|
+
:plugins: Plugin name.
|
710
|
+
:modn: Module name.
|
711
|
+
|
712
|
+
Notes:
|
713
|
+
1. #reload can only reload modules loaded via the #load method (including those specified in pymud.cfg), but cannot reload modules imported using import xxx.
|
714
|
+
2. If there are syntax errors in the loaded module scripts, #reload may not take effect. In this case, you need to exit and reopen PyMUD.
|
715
|
+
3. If different modules are loaded sequentially and there are dependencies between them, when reloading, you should reload them one by one in the original dependency order; otherwise, it is easy to encounter missing dependencies or dependency errors.
|
716
|
+
|
717
|
+
Examples:
|
718
|
+
- ``#reload`` : Reload all loaded modules.
|
719
|
+
- ``#reload mymodule`` : Reload the module named mymodule.
|
720
|
+
- ``#reload myplugins`` : Reload the plugin named myplugins.
|
721
|
+
- ``#reload mymodule myplugins`` : Reload the module named mymodule and the plugin named myplugins.
|
722
|
+
|
723
|
+
Related commands:
|
724
|
+
- #load
|
725
|
+
- #unload
|
726
|
+
- #module
|
727
|
+
''',
|
728
|
+
|
729
|
+
"handle_gag" :
|
730
|
+
'''
|
731
|
+
The execution function of the embedded command #gag, used to prevent the current line from being displayed in the main window, usually used in triggers.
|
732
|
+
This function should not be called directly in the code.
|
733
|
+
|
734
|
+
Usage:
|
735
|
+
- #gag
|
736
|
+
|
737
|
+
Notes:
|
738
|
+
- Once the current line is gagged, it will never be displayed again, but the corresponding trigger will still take effect.
|
739
|
+
|
740
|
+
Related commands:
|
741
|
+
- #replace
|
742
|
+
''',
|
743
|
+
|
744
|
+
"handle_py" :
|
745
|
+
'''
|
746
|
+
The execution function of the embedded command #py, used to execute Python statements.
|
747
|
+
This function should not be called directly in the code.
|
748
|
+
|
749
|
+
Usage:
|
750
|
+
- #py {py_code}: Execute py_code in the current context.
|
751
|
+
- The environment is the current context, where self represents the current session.
|
752
|
+
|
753
|
+
Examples:
|
754
|
+
- ``#py self.info("hello")`` : Equivalent to calling ``session.info("hello")`` in the current session.
|
755
|
+
- ``#py self.enableGroup("group1", False)`` : Equivalent to calling ``session.enableGroup("group1", False)``.
|
756
|
+
''',
|
757
|
+
|
758
|
+
"handle_trigger" :
|
759
|
+
'''
|
760
|
+
The execution function of the embedded commands #trigger / #tri / #action, used to operate triggers. This command can be used with no parameters, one parameter, or two parameters.
|
761
|
+
This function should not be called directly in the code.
|
762
|
+
|
763
|
+
Usage:
|
764
|
+
- #tri: Display all triggers in this session.
|
765
|
+
- #tri {tri_id}: Display information about the trigger with id {tri_id} in this session.
|
766
|
+
- #tri {tri_id} {on/off/del}: Enable/disable/delete the trigger with id {tri_id} in this session.
|
767
|
+
- #tri {pattern} {code}: Create a new trigger with the matching pattern {pattern} and execute {code} when matched.
|
768
|
+
- In the trigger's code, %line can be used to represent the line, and %1~%9 can be used to represent the captured information.
|
769
|
+
|
770
|
+
Parameters:
|
771
|
+
:tri_id: The id of the Trigger.
|
772
|
+
:on: Enable.
|
773
|
+
:off: Disable.
|
774
|
+
:del: Delete.
|
775
|
+
:pattern: The matching pattern of the trigger, which should be a valid Python regular expression.
|
776
|
+
:code: The content to be executed when the trigger is successfully matched.
|
777
|
+
|
778
|
+
Examples:
|
779
|
+
- ``#tri``: Without parameters, print and list all triggers in the current session.
|
780
|
+
- ``#tri my_tri``: With one parameter, list detailed information about the Trigger object with id my_tri.
|
781
|
+
- ``#tri my_tri on``: With two parameters, enable the Trigger object with id my_tri (enabled = True).
|
782
|
+
- ``#tri my_tri off``: With two parameters, disable the Trigger object with id my_tri (enabled = False).
|
783
|
+
- ``#tri my_tri del``: With two parameters, delete the Trigger object with id my_tri.
|
784
|
+
- ``#tri {^[> ]*Duan Yu stumbles.+} {get duan}``: With two parameters, create a new Trigger object. Pick up Duan Yu when he is knocked down.
|
785
|
+
|
786
|
+
Related commands:
|
787
|
+
- #alias
|
788
|
+
- #timer
|
789
|
+
- #command
|
790
|
+
''',
|
791
|
+
"handle_wait" :
|
792
|
+
'''
|
793
|
+
The execution function of the embedded commands #wait / #wa, used for asynchronous delay waiting for a specified time, which is used for delay waiting between multiple commands.
|
794
|
+
This function should not be called directly in the code.
|
795
|
+
|
796
|
+
Usage:
|
797
|
+
- #wa {ms}
|
798
|
+
|
799
|
+
Parameters:
|
800
|
+
- ms: Waiting time (milliseconds)
|
801
|
+
|
802
|
+
Example:
|
803
|
+
- ``eat liang;#wa 300;drink jiudai``
|
804
|
+
Eat dry food, then execute "drink from the wine bag" after a 300-millisecond delay.
|
805
|
+
|
806
|
+
Related commands:
|
807
|
+
- #gag
|
808
|
+
- #replace
|
809
|
+
''',
|
810
|
+
|
811
|
+
"handle_clear" :
|
812
|
+
'''
|
813
|
+
The execution function of the embedded commands #clear / #cls, used to clear the current session buffer and display.
|
814
|
+
This function should not be called directly in the code.
|
815
|
+
|
816
|
+
Usage:
|
817
|
+
- #cls: Clear the current session buffer and display.
|
818
|
+
''',
|
819
|
+
|
820
|
+
"handle_message" :
|
821
|
+
'''
|
822
|
+
The execution function of the embedded commands #message / #mess, used to pop up a dialog box to display the given information.
|
823
|
+
This function should not be called directly in the code.
|
824
|
+
|
825
|
+
Usage:
|
826
|
+
- #mess {msg}: Pop up a dialog box to display the information specified by {msg}.
|
827
|
+
|
828
|
+
Parameters:
|
829
|
+
:msg: The information to be displayed in the pop-up window.
|
830
|
+
|
831
|
+
Examples:
|
832
|
+
- ``#mess This is a test line`` : Use a pop-up window to display "This is a test line".
|
833
|
+
- ``#mess %line`` : Use a pop-up window to display the value of the system variable %line.
|
834
|
+
''',
|
835
|
+
|
836
|
+
"handle_disconnect" :
|
837
|
+
'''
|
838
|
+
The execution function of the embedded commands #disconnect / #dis, used to disconnect from the remote server (only effective when the remote server is already connected).
|
839
|
+
This function should not be called directly in the code.
|
840
|
+
|
841
|
+
Related commands:
|
842
|
+
- #connect
|
843
|
+
- #close
|
844
|
+
''',
|
845
|
+
}
|
846
|
+
},
|
43
847
|
}
|