There are still many errors in your code and its not good to hardcore those rules inside the plugin. Its not very user friendly.
Take a look in my rules plugin i made some time ago and use it however you please.
It reads the rules from file so people can add their own rules.