Pluses don't work with dice rolling (but minuses do). So, [3d4+2] shows [3d4 2] instead of [3d4+1]=(2+3+1)+1=7”. If a plus is used in the dice equation, it should actually roll the dice, add the positive modifier and show the result.
Changed sendMessage() in im.basic.js to use encode '+' separately because encodeURIComponent() converts '+' into ' ' instead of encoding it.
Changed interpretDice() in ajax_act.php to use isset() so setting $modifier wouldn't cause PHP warning if there was no modifier. For example, if user did "[1d6]" instead of "[1d6+1]", setting the modifier caused a PHP warning in the output.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Changed sendMessage() in im.basic.js to use encode '+' separately because encodeURIComponent() converts '+' into ' ' instead of encoding it.
Changed interpretDice() in ajax_act.php to use isset() so setting $modifier wouldn't cause PHP warning if there was no modifier. For example, if user did "[1d6]" instead of "[1d6+1]", setting the modifier caused a PHP warning in the output.