CC: Tweaked

CC: Tweaked

57M Downloads

Pastebin get failed

blooddrunkreaper opened this issue ยท 14 comments

commented

I've recently started playing Enigmatica 2 expert mode running the latest version with cc-tweaked-180pr1.14 and managed to make myself a mining turtle pretty early to get some early game automated mining.

Sadly I've been unable to download the quarry script that I've always used for computercraft because the connection to pastebin keeps failing even though I have the API enabled and pastebin is whitelisted.

2019-03-03

commented

@blooddrunkreaper Try this: pastebin get rpXRAzs4 Quarry - you're supposed to just put the ID in, not the whole URL.

commented

As Lem says, you only need to put the ID in. However, it would be good if we handled putting in the whole URL.

commented

Thanks for the fast reply, Been far too long since I used computercraft so I forgot that I only need the code lol

commented

It's still not working
2019-03-03 1

commented

Try this:

wget http://pastebin.com/raw/rpXRAzs4
mv rpXRAzs4 Quarry
commented

Wget returns domain not permitted even though I've got pastebin whitelisted

commented

Can you show us your whole config file?

commented

Let me add it to pastebin and grab you a link

commented
commented

You screwed up the whitelist. You shouldn'tve added http to it, and also, if you would've needed to, you missed the colon. (http://). Set it to either this:

    S:whitelist <
        *
     >

Or this:

    S:whitelist <
        pastebin.com
     >
commented

That worked :) thanks for all the help

commented

Glad you've got it working :). I'm just gonna keep this open for a wee bit - there's definitely some things we could make more obvious (config validation, better functionality in pastebin).

commented

Config validation (ideas are not mutually exclusive):

  • Log an error into the console
  • Show an error on player join in the chat
  • Return an error in HTTP calls (like current whitelist failures do), e.g. Config whitelist invalid
  • Prevent booting the BIOS and show an error

Pastebin:

  • Fetch the ID using a pattern (e.g. ^https?://pastebin%.com/(%1+)$) and handle raw URLs too
  • Detect malformed IDs
commented

I've made the changes I want to as far as this issue goes.

I think we could do more work on notifying the user when there's a malformed config, but I think that's a separate issue, and I want to think about the flow of that first.