Should be fairly straightforward. Simply 'save' the last time this user has posted a message. Then the next time they attempt to post a message check if the alloted time has passed and process accordingly.
I see you are using dict, so just add a record with that info and you should be set.