Using variables or hash entries shouldn't really change the layout of your code. Hash tables are of course a lot cleaner, and I'd use a hash table myself, but I didn't want to over complicate the example.

$nick works fine if you don't expect people to change their nickname.

You should still decide for yourself if you want to track vote totals each time someone votes, or only when someone calls for their statistics.

When someone calls for the statistics will be cleaner, but requires quite a bit of calculation every time someone does !stats, hogging all the calculations made at a single point in time. Calculating the votes as they go results into more code (after all, you also got to track of people changing their vote, or votes expiring), but when someone calls for the statistics, you just have to display them the 4 sum totals, without having to first calculate them.

Also, you're sure using a +i channel is smarter than using a PM?

Last edited by Thels; 26/08/10 09:44 AM.

Learning something new every day.