Project

hwping

0.0
No commit activity in last 3 years
No release in over 3 years
IRC bot for HW pinging with the Dream Cheeky Thunder missile launcher
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.1.4
~> 10.5.0
~> 3.4.0
~> 0.37.2
~> 0.11.2

Runtime

~> 2.3.1
~> 0.5.1
 Project Readme

hwping

Gem Version Dependency Status Build Status Inline docs

IRC bot for HW pinging with the Dream Cheeky Thunder missile launcher.

Installation

The bot was tested on ruby 2.0.0-p643, but it should work with other versions. It uses libusb for the USB communication and cinch as the IRC client.

gem install hwping

Usage

hwping [options]

Configuration

The bot uses ./config.yml as a configuration file, which is automatically saved upon exit. An alternative configuration file can be specified with the -c/--config-file argument.

The default settings are those:

---
nick: hwping
server: irc.freenode.net
port: 6667
channels: # an array of channels to listen without the beginning # symbol
  - hwping-test
auth_nicks: # an array of nicks to obey
targets: # a hash in {nick => [x, y]} format specifying the possible targets
webcam:
  path: /tmp # the folder where the image will be saved

Channel message commands:

  • hwping <nick> - fire a rocket at <nick> when he has been set as a target and is present in the channel's user list

Private message commands:

  • help - displays a help text
  • snap - creates a snapshot with the attached webcamera and returns with its URL
  • panorama - creates a panorama with the attached webcamera and returns with its URL
  • fire - fires a rocket
  • reset - resets the launcher into the default position (bottom-left)
  • position - returns the actual position of the rocket launcher
  • <direction> <ms> - rotates the launcher into the given direction (up, down, left, right) for the given milliseconds
  • target list - displays the list of the available targets
  • target get <nick> - displays the coordinates of <nick>
  • target del <nick> - deletes the coordinates of <nick>
  • target set <nick> - sets the coordinates of <nick> to the actual position
  • target set <nick> <X> <Y> - sets the coordinates of <nick> to right(X), up(Y)

TODO

  • Listen to a nick other than hwping
  • High-precision timer for better positioning
  • Event-based solution instead of threads
  • Add a superuser to modify the list of authorized users during runtime

License

This project is released under the GPLv2 license.

Credits

The launcher code in lib/hwping/launcher.rb was inspired by robhurring/thunder.