IRCCloud Keep Alive

by tech234a

GitHub Readme.md

IRCCloud Keep Alive Utility

A simple Heroku application to keep your IRCCloud connection always alive (without paying 💵)! No credit card verification or command line tool installations needed!

This script is forked from the version made by vijaiaeroastro. Unlike that version, this fork does not require Heroku credit card verification or command line tool installation or usage. This fork can be completely deployed and configured from the browser. This version also runs on Python 3.8 and uses the current versions of all modules. In addition, instead of editing code files, this fork uses Heroku config vars to store your IRCCloud credentials.

Note: None of this is illegal
IRCCloud has publicly documented their API and different RPC calls they make.
It is publicly listed on Github and you can read it on the IRCCloud Wiki. Also, while this script prevents IRCCloud disconnecting from IRC servers after 120 minutes of inactivity, it does not provide access to any other of the numerous features that are available in the Pro version of IRCCloud. Please support them if you can!

Requirements

  • A Free Heroku account
  • A Free cron-job.org account

Deploy

Detailed Setup Instructions

  1. Click the "Deploy to Heroku" button above.
  2. Sign up for or log into Heroku.
  3. Choose an app name on Heroku. It doesn't really matter what it is, but I wouldn't recommend making it a perfect name as you won't be entering it once you automate the application's execution. Enter this name into the "App name" field and the heroku-app-name config var.
  4. Create a new authorization token. Leave the expiration field blank. Once again, it doesn't matter what you description you provide for it. Fill it into the heroku-key config var.
  5. Fill out the IRCCLOUD_PASSWORD and IRCCLOUD_USERNAME config vars. This is required to authenticate with IRCCloud and send a signal indicating an active client. While I understand some people might be reluctant to enter their credentials, Heroku does actually recommend using config vars for storing data encryption keys.
  6. Go to cron-job.org and sign up for or log into an account.
  7. Go to the Members page and then to the Cronjobs tab. Create a new cron job.
  8. The title of the job does not matter.
  9. For the address, enter https://api.heroku.com/apps/[Heroku app name]/formation, where [Heroku app name] is the same app name you entered earlier.
  10. For schedule, select "User-defined". Select all "Days of month", "Days of week", "Months" and "Hours". (Tip: Select the first entry in the list and, while holding the Shift key, select the last entry in the list to select the whole list.
  11. Select any one specific minute. This configures the job to run once per hour (IRCCloud disconnects users after 2 hours of inactivity.)
  12. Click "Create cronjob".
  13. Click the "Edit" button next to the cronjob you just created.
  14. Under "Advanced", select PATCH for the request method.
  15. Add the following request header names and values:
  • Content-Type: application/json
  • Accept: application/vnd.heroku+json; version=3
  • Authorization: Bearer [Heroku authorization token] where [Heroku authorization token] is the authorization token you created earlier.
  1. Enter the following for "Request body": {"updates": [{ "quantity": 1, "type": "worker" } ] }
  2. Ensure "Enable cronjob" is checked.
  3. Click "Save", and you're done!

License

UNLICENSE