{"action":"created","issue":{"url":"https://api.github.com/repos/dwhagar/snowboard/issues/63","repository_url":"https://api.github.com/repos/dwhagar/snowboard","labels_url":"https://api.github.com/repos/dwhagar/snowboard/issues/63/labels{/name}","comments_url":"https://api.github.com/repos/dwhagar/snowboard/issues/63/comments","events_url":"https://api.github.com/repos/dwhagar/snowboard/issues/63/events","html_url":"https://github.com/dwhagar/snowboard/issues/63","id":177618819,"number":63,"title":"Bot Crashed on an Action Command containing a Channel","user":{"login":"dwhagar","id":6186138,"avatar_url":"https://avatars.githubusercontent.com/u/6186138?v=3","gravatar_id":"","url":"https://api.github.com/users/dwhagar","html_url":"https://github.com/dwhagar","followers_url":"https://api.github.com/users/dwhagar/followers","following_url":"https://api.github.com/users/dwhagar/following{/other_user}","gists_url":"https://api.github.com/users/dwhagar/gists{/gist_id}","starred_url":"https://api.github.com/users/dwhagar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwhagar/subscriptions","organizations_url":"https://api.github.com/users/dwhagar/orgs","repos_url":"https://api.github.com/users/dwhagar/repos","events_url":"https://api.github.com/users/dwhagar/events{/privacy}","received_events_url":"https://api.github.com/users/dwhagar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dwhagar/snowboard/labels/bug","name":"bug","color":"ee0701"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/dwhagar/snowboard/milestones/2","html_url":"https://github.com/dwhagar/snowboard/milestones/v0.2","labels_url":"https://api.github.com/repos/dwhagar/snowboard/milestones/2/labels","id":1922819,"number":2,"title":"v0.2","description":"Would like to have the bot be a useful alternative to chanserv.","creator":{"login":"dwhagar","id":6186138,"avatar_url":"https://avatars.githubusercontent.com/u/6186138?v=3","gravatar_id":"","url":"https://api.github.com/users/dwhagar","html_url":"https://github.com/dwhagar","followers_url":"https://api.github.com/users/dwhagar/followers","following_url":"https://api.github.com/users/dwhagar/following{/other_user}","gists_url":"https://api.github.com/users/dwhagar/gists{/gist_id}","starred_url":"https://api.github.com/users/dwhagar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwhagar/subscriptions","organizations_url":"https://api.github.com/users/dwhagar/orgs","repos_url":"https://api.github.com/users/dwhagar/repos","events_url":"https://api.github.com/users/dwhagar/events{/privacy}","received_events_url":"https://api.github.com/users/dwhagar/received_events","type":"User","site_admin":false},"open_issues":16,"closed_issues":3,"state":"open","created_at":"2016-08-04T04:38:25Z","updated_at":"2016-09-18T00:00:11Z","due_on":"2017-01-01T05:00:00Z","closed_at":null},"comments":1,"created_at":"2016-09-18T00:00:11Z","updated_at":"2016-09-18T00:30:05Z","closed_at":null,"body":"[16/09/17 19:34:43.882]  * Thumper will probably not even be safe for upstairs, and will have to join #multiverse-attic\r\n\r\nTraceback (most recent call last):\r\n  File \"snowboard.py\", line 27, in <module>\r\n    sys.exit(snowboard.main(sys.argv[1:]))\r\n  File \"/home/cyclops/snowboard/snowboard/main.py\", line 255, in main\r\n    cmds = __process_responses(net, data)\r\n  File \"/home/cyclops/snowboard/snowboard/main.py\", line 122, in __process_responses\r\n    cmds = __get_commands(raw, net)\r\n  File \"/home/cyclops/snowboard/snowboard/main.py\", line 189, in __get_commands\r\n    commands += scripts.rawMessages(net, raw)\r\n  File \"/home/cyclops/snowboard/snowboard/scripts.py\", line 101, in rawMessages\r\n    seenCommands.rawTriggers(net, message)\r\n  File \"/home/cyclops/snowboard/snowboard/seenCommands.py\", line 95, in rawTriggers\r\n    seen.save(nick, host, act)\r\nUnboundLocalError: local variable 'act' referenced before assignment"},"comment":{"url":"https://api.github.com/repos/dwhagar/snowboard/issues/comments/247816291","html_url":"https://github.com/dwhagar/snowboard/issues/63#issuecomment-247816291","issue_url":"https://api.github.com/repos/dwhagar/snowboard/issues/63","id":247816291,"user":{"login":"RodentOfUnusualSize","id":19480340,"avatar_url":"https://avatars.githubusercontent.com/u/19480340?v=3","gravatar_id":"","url":"https://api.github.com/users/RodentOfUnusualSize","html_url":"https://github.com/RodentOfUnusualSize","followers_url":"https://api.github.com/users/RodentOfUnusualSize/followers","following_url":"https://api.github.com/users/RodentOfUnusualSize/following{/other_user}","gists_url":"https://api.github.com/users/RodentOfUnusualSize/gists{/gist_id}","starred_url":"https://api.github.com/users/RodentOfUnusualSize/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RodentOfUnusualSize/subscriptions","organizations_url":"https://api.github.com/users/RodentOfUnusualSize/orgs","repos_url":"https://api.github.com/users/RodentOfUnusualSize/repos","events_url":"https://api.github.com/users/RodentOfUnusualSize/events{/privacy}","received_events_url":"https://api.github.com/users/RodentOfUnusualSize/received_events","type":"User","site_admin":false},"created_at":"2016-09-18T00:30:05Z","updated_at":"2016-09-18T00:30:05Z","body":"The problem seems to have been caused by line 42 in `seenCommands.py`:\r\n\r\n```py\r\ndbTriggerC = r\"^(.*)!(.*@.*) (JOIN|PART) (#.*)$\"\r\n```\r\n\r\nWhat's happening is that third `.*` is eating everything up until the `join` (because `*` is greedy).\r\n\r\nSo: `nick!user@host (whatever goes here) will probably not even be safe for upstairs, and will have to join #multiverse-attic` is being interpreted as:\r\n\r\n*   `nick` as the first match;\r\n*   `user@host (whatever goes here) will probably not even be safe for upstairs, and will have to` as the second match;\r\n*   `join` as the third match; and\r\n*   `#multiverse-attic` as the fourth match.\r\n\r\n*THEN* what happens is the 3rd match is `join`... not `JOIN`. so on lines 90-93:\r\n\r\n```py\r\n        if data[3] == \"JOIN\":\r\n            act = \"joining \" + dest\r\n        elif data[3] == \"PART\":\r\n            act = \"leaving \" + dest\r\n```\r\n\r\nNothing gets matched (because `join` != `JOIN`).\r\n\r\nThus `act` never gets set. Thus you get the unbound local error."}}
{"actor":{"display_login":"RodentOfUnusualSize"}}