making the script more generic

i made the script more generic so there are no hardcoded values, this means you can use this plugin now with any p2pool (including altcoin p2pool due to being able to specify port) without creating a script for each p2pool.