Changed plugin js function environment. Added basic IRC function bridge to JS env.