Is there script or anyway to code a script such that whenever there is a topic change, it will match it in the database to see if the topic exist. If it exist, ignore it. Else, it will write the new topic into the database with the date, time and user who set it. Also, it must be able to show the last 5 topics set with commands like !topics
Any help would be appreciated

Thanks in advance