Yes it is possible, BogusTrivia uses this exact concept in its /msg bot .add command for adding questions to the database.
Code: Select all
6. Add Questions to Create the Database:
Using the /msg command, message your bot with one of the .add commands.
.add is sufficient if you're adding the included question file or files
with *triv* in the filename(s). Follow the message window as the script may
ask for user input. It may have you verify by sending you 3 examples from
the file you're adding.
You will need to answer yes or no {or: y or n}.
Note: If you are adding multiple question files and you're sure they ALL
follow the same format, you may answer using "yes all" {or: y a}.
The script provides error correction and creates a file called t2.badqes,
these are broken Q&A and may later be edited or discarded as you wish.
I did this by making two processes, NOT by "the process stops, waiting for an option".
The first proc accepts the initial command, and sets a few global variables, to save the users nick and any needed info from his command.
1st proc also must make binds for 'Y' and 'N' to the second proc.
You may also wish to set a timer or bind time to remove the variables/binds if user doesn't finish the command (may require a 3rd proc).
The second proc just waits for one of the bound answers to call it.
When called, it confirms the nick, and does as the user has answered, then removes the associated binds/variables.
Make sure if you timer called a 3rd cleanup proc earlier, that it does not error out trying to remove things the 2nd proc already did:)