summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul W. Frields <stickster@gmail.com>2007-01-28 01:39:26 +0000
committerPaul W. Frields <stickster@gmail.com>2007-01-28 01:39:26 +0000
commitefd2efb54863b16bbcd0730e86194cb1001f8562 (patch)
tree8bf617ba89ed87ccbed2481fd3dbcbb6026d064d
parent9eed1f6e24b5d8b2ba7551237f62767b49b61288 (diff)
downloadirssi-notify-efd2efb54863b16bbcd0730e86194cb1001f8562.tar.gz
irssi-notify-efd2efb54863b16bbcd0730e86194cb1001f8562.tar.xz
irssi-notify-efd2efb54863b16bbcd0730e86194cb1001f8562.zip
Yeah, don't be a meanie.
git-svn-id: https://irssi-libnotify.googlecode.com/svn/trunk@19 291cbfae-0d27-0410-99d7-557b17e6fe3d
-rw-r--r--notify.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/notify.pl b/notify.pl
index fa40e99..bd00c3d 100644
--- a/notify.pl
+++ b/notify.pl
@@ -27,8 +27,11 @@ Irssi::settings_add_str('notify', 'notify_time', '5000');
sub notify {
my ($server, $summary, $message) = @_;
my $bus = Net::DBus->session;
+ return if (!$bus);
my $svc = $bus->get_service("org.freedesktop.Notifications");
+ return if (!$svc);
my $obj = $svc->get_object("/org/freedesktop/Notifications");
+ return if (!$obj);
# Make the message entity-safe. This is all a crappy hack and I'd
# love to know a Perl-ish way to do this properly.