diff options
-rw-r--r-- | notify.pl | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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. |