{"action":"opened","issue":{"url":"https://api.github.com/repos/pathmann/pyTSon/issues/95","repository_url":"https://api.github.com/repos/pathmann/pyTSon","labels_url":"https://api.github.com/repos/pathmann/pyTSon/issues/95/labels{/name}","comments_url":"https://api.github.com/repos/pathmann/pyTSon/issues/95/comments","events_url":"https://api.github.com/repos/pathmann/pyTSon/issues/95/events","html_url":"https://github.com/pathmann/pyTSon/issues/95","id":330962268,"node_id":"MDU6SXNzdWUzMzA5NjIyNjg=","number":95,"title":"Why is this script not working?","user":{"login":"GitSimonHub","id":39445589,"node_id":"MDQ6VXNlcjM5NDQ1NTg5","avatar_url":"https://avatars0.githubusercontent.com/u/39445589?v=4","gravatar_id":"","url":"https://api.github.com/users/GitSimonHub","html_url":"https://github.com/GitSimonHub","followers_url":"https://api.github.com/users/GitSimonHub/followers","following_url":"https://api.github.com/users/GitSimonHub/following{/other_user}","gists_url":"https://api.github.com/users/GitSimonHub/gists{/gist_id}","starred_url":"https://api.github.com/users/GitSimonHub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GitSimonHub/subscriptions","organizations_url":"https://api.github.com/users/GitSimonHub/orgs","repos_url":"https://api.github.com/users/GitSimonHub/repos","events_url":"https://api.github.com/users/GitSimonHub/events{/privacy}","received_events_url":"https://api.github.com/users/GitSimonHub/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-10T11:50:38Z","updated_at":"2018-06-10T11:50:38Z","closed_at":null,"author_association":"NONE","body":"from ts3plugin import ts3plugin\r\n\r\nimport ts3lib, ts3defines\r\nfrom os import path\r\nfrom ts3plugin import ts3plugin\r\n\r\nclass userManager(ts3plugin):\r\n    name = \"userManager\"\r\n    requestAutoload = False\r\n    version = \"1.0\"\r\n    apiVersion = 21\r\n    author = \"Simon\"\r\n    description = \"This is a testplugin\"\r\n    offersConfigure = True\r\n    commandKeyword = \"manager\"\r\n    infoTitle = \"\"\r\n    menuItems = []\r\n    hotkeys = []\r\n\tini = path.join(ts3lib.getPluginPath(), \"pyTSon\", \"scripts\", \"userManager\", \"cfg\", \"settings.ini\")\r\n\r\n    def __init__(self):\r\n        ts3lib.printMessageToCurrentTab(\"The userManager script is now running! :)\")\r\n\t\tif path.isfile(self.ini):\r\n            self.config.read(self.ini)\r\n            if not self.config.has_section('general'):\r\n                self.config.add_section('general')\r\n                self.config.set('general', 'admin', \"10\")\r\n                self.config.set('general', 'operator', \"11\")\r\n                self.config.set('general', 'ban', \"12\")\r\n                self.config.set('general', 'message', \"Du bist geblockt.\")\r\n\t\t\t\tself.config.set('general', 'autoTalk', \"True\")\r\n                self.config.set('general', 'autoOperator', \"True\")\r\n                self.config.set('general', 'autoBan', \"True\")\r\n\t\t\telse:\r\n\t\t\t\tself.config['general'] = {\"admin\": \"10\", \"operator\": \"11\", \"ban\": \"12\", \"message\": \"Du bist geblockt.\", \"autoTalk\": \"True\", \"autoOperator\": \"True\", \"autoBan\": \"True\" }\r\n\r\n    def stop(self):\r\n        ts3lib.printMessageToCurrentTab(\"The userManager script has stopped! :(\")\r\n\r\n    def onNewChannelEvent(self, schid, channelID, channelParentID):\r\n        err, name = ts3lib.getChannelVariableAsString(schid, channelID, ts3defines.ChannelProperties.CHANNEL_NAME)\r\n        if err == ts3defines.ERROR_ok:\r\n            ts3lib.printMessageToCurrentTab(\"new channel %s\" % name)\r\n        else:\r\n            ts3lib.printMessageToCurrentTab(\"got error %s\" % err)\r\n\r\ni have in the \"userManager\" folder a \"cfg\" folder with the settings.ini\r\nbut pyTSon is not showing this script"}}
{"actor":{"display_login":"GitSimonHub"}}