xintron / irssi-pushover Goto Github PK
View Code? Open in Web Editor NEWPlugin for irssi to send push-notifications using pushover.net
Plugin for irssi to send push-notifications using pushover.net
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');
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:
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 ๐
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.