add funciton to create privmsg and notice
Fixed things that should not be static