From adc22d5f01a4e8b70e1924f2a1b8f7cf6f7f3d88 Mon Sep 17 00:00:00 2001 From: John Reese Date: Sun, 18 May 2014 10:53:03 -0700 Subject: [PATCH] Only link to issue numbers greater than zero MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will fix some of the "< ZNC-Linker> https://github.com/znc/znc/issues/0 – 404 Not Found" messages in channel. --- znclinker.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/znclinker.pm b/znclinker.pm index e863270..6af9728 100755 --- a/znclinker.pm +++ b/znclinker.pm @@ -109,7 +109,9 @@ sub OnChanMsg { $self->put_chan($chan=>"Pointless question detected! $nick, we are not telepaths, please ask a concrete question and wait for an answer. Be sure that you have checked http://wiki.znc.in/FAQ first. You may want to read http://catb.org/~esr/faqs/smart-questions.html Sorry if this is a false alarm."); } if (my ($issue) = $what=~m@(?:#|https://github.com/znc/znc/(?:issues|pull)/)(\d+)@) { - $self->CreateSocket('znclinker::github', $issue, $self->GetNetwork, $chan); + if ($issue > 0) { + $self->CreateSocket('znclinker::github', $issue, $self->GetNetwork, $chan); + } } return $ZNC::CONTINUE;