This section will be much easier to understand if you obtain listings of the script files supplied with xchat. Blank lines are ignored. A label specifies a state name. All lines between a pair of labels are the statements for a single state. When a state is entered, all of its actions are performed in the order in which they appear in the file.
Processing resumes with the first action statement of the new state.
It then transitions to the state named in the expect statement. Finally, there are two action statements which, when executed, cause the script to exit. This section describes all of the statements that may appear in script files, except for a few special action statements. For all statements that accept two arguments, the first is the name of a new state, and the second specifies a condition or reason for changing to the new state. These statements are used to place entries into the Taylor UUCP Log file, and to cause xchat to exit with successful or failure status.