baines / insobot

C99 modular IRC bot with markov chains
MIT License
74 stars 5 forks source link

Random chance PSAs #11

Open baines opened 3 years ago

baines commented 3 years ago

Currently each "PSA" has one response associated with it - !psa+ will simply overwrite anything that existed with the same ID previously.

The PSA system could be extended to support multiple responses for a single ID / set of conditions, either with a new command, or different argument to !psa+.

It will probably need a "chance to occur" parameter too - could just be an integer. Then when executing a PSA, all the chance numbers are summed and a random number generated between 0..sum to pick one of the responses.

This could also be extended to mod_alias - though the syntax of !alias doesn't currently have parameters like !psa+.

I imagine it might be annoying if a PSA/alias with a lot of responses set up accidentally gets overwritten using the original (existing) style of !alias / !psa+, so there should maybe be a confirmation step or specific syntax to prevent this.