Giter Club home page Giter Club logo

irssi-pushover's Introduction

irssi-pushover

Plugin for irssi (a console based IRC client) to send push-notifications using pushover.net.

This allows you to be notified when someone messages/mentions you on IRC, when you're not online.

Installation

  1. Add a new application to your pushover control panel, note the API key.
  2. cp pushover.pl to ~/.irssi/scripts/ and symlink into scripts/autorun if you desire.
  3. touch ~/.irssi/pushover_ignores
  4. Within irssi: 1. /load autorun/pushover.pl 2. /set pushover_token <> 3. /set pushover_apptoken <> 4. /set pushover_sound (choose one from https://pushover.net/api#sounds, defaults to siren) 5. /save 6. /pushtest hello world. (sends test message to your device(s)).

Dependencies

  1. Account with pushover.net
  2. Crypt::SSLeay / libcrypt-ssleay-perl is installed

Other things

  1. /set pushover_debug 1 - should make it verbose.
  2. /set pushover_ignore 1 - turn on ignore configurability
  3. /set pushover_ignorefile - ignore messages from ....
  4. /set pushover_ignorechannels - space separated list of channels to ignore.
  5. /pushignore help - should get you started in populating the ignore list.
  6. /set pushover_only_if_away [on|off] - if set to on, then you'll need to be set to away before we send notifications.

irssi-pushover's People

Contributors

davidgoodwin avatar donnex avatar teranex avatar xintron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

irssi-pushover's Issues

Does not work for Jabber chatrooms (MUC)

First of all thanks for the nice plugin!

I found there is a small issue with the plugin: when using the irssi-plugin-xmpp to connect to a Jabber network, the script works for private messages, but it does not work for mentions in a chatroom (MUC). The reason for this is that $server->{nick} returns the JabberID ([email protected]), while the nick in the room is in most cases different, causing if ($data =~ /$safeNick/i) { to always be false.
I was able to hack a working version by looking at another script. (I really mean 'hack' as I don't know any Perl). This is what I came up with:

sub msg_print_text {
    my ($dest, $text, $stripped) = @_;
    my $server = $dest->{server};
    my $target = $dest->{target};

    return if (!$server || !($dest->{level} & MSGLEVEL_HILIGHT));

    if(check_ignore_channels($target)) {
        return;
    }

    if(check_away($server)) {
        return;
    }

    debug('Got nick highlight');
    $stripped =~ s/^\s+|\s+$//g;
    send_push($target, $stripped);
}

Irssi::signal_add_last('print text', 'msg_print_text');

HTTPS/SSL Issue?

Trying to send a message and I'm getting this:

Irssi: From Irssi::Script::pushover::send_push: Notification not sent: 500 Can't locate object method "new" via package "LWP::Protocol::https::Socket"

Not sure if something is missing but I already have these installed:

  • IO::Socket::SSL
  • LWP::Protocol::https::Socket
  • Crypt::SSLeay
  • LWP::Protocol::https::Socket
  • Crypt::SSLeay

Using perl v5.10.1

I had to change to http from https to get it to work in the mean time. The plugin works brilliantly though ๐Ÿ‘

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.