From patchwork Tue Jun 27 18:14:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander 'lynxis' Couzens X-Patchwork-Id: 781329 X-Patchwork-Delegate: lynxis@fe80.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wxvHr02Wfz9s2G for ; Wed, 28 Jun 2017 04:16:08 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="EtGNf/Mn"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Message-Id: Date:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=719TrvKpdAyc/viKj2gozzoIqBgclQwTJSTO+SAhtfc=; b=EtGNf/Mn2n16+v iOZKlTawVY2Fy29WK9d7+GqATiZ/gRGhc2TpGEWp+KsvbBOOSklo96NHw7HidtiI3+lekD9tNjHdc 4oFJB43hxkUKND4lmbjhDVZc9e1b5mZY5/Ebe29ww/cfb0IzpJYEuX+sNJcdB8zS12jW35+ofzWvW qGsrTRwC3+/ecbacTBkGPEoSMwoGf+a0scTmY3gJxLkVCzgY7INjlD7RzuO20+Gk95FF1GkiDq+tA 9glEqYfANq8o0Hio8TRrflvqC55J9WkJ6Pq8vOXRNYXrTsqXm+hkP8Ms+JwFBAl944/DAPyDZLa44 /9OoLXxzIWUkhhGkgMkQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dPv1d-00082u-Bn; Tue, 27 Jun 2017 18:15:45 +0000 Received: from mail.base45.de ([2001:67c:2050:310::a:2]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dPv1Y-00080d-Aw for lede-dev@lists.infradead.org; Tue, 27 Jun 2017 18:15:42 +0000 Received: from static.214.155.40.188.clients.your-server.de ([188.40.155.214] helo=lazus.yip) by mail.base45.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1dPv0t-0000DN-Fw; Tue, 27 Jun 2017 20:14:59 +0200 From: Alexander Couzens To: Jo-Philipp Wich Date: Tue, 27 Jun 2017 20:14:47 +0200 Message-Id: <20170627181447.8805-1-lynxis@fe80.eu> X-Mailer: git-send-email 2.13.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170627_111540_538885_27C60088 X-CRM114-Status: UNSURE ( 7.99 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Subject: [LEDE-DEV] [PATCH] phase1: irc-bot: allow to use noticeOnChannel X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lede-dev@lists.infradead.org, Alexander Couzens MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org notices are shown in a different color or handled in a different way on the clients. --- phase1/config.ini.example | 1 + phase1/master.cfg | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/phase1/config.ini.example b/phase1/config.ini.example index bfbe837..f2c15fd 100644 --- a/phase1/config.ini.example +++ b/phase1/config.ini.example @@ -18,6 +18,7 @@ port = 6667 channel = #example-channel nickname = example-builder password = example +notice = True [repo] url = https://git.lede-project.org/source.git diff --git a/phase1/master.cfg b/phase1/master.cfg index 04879e8..c6fb0c3 100644 --- a/phase1/master.cfg +++ b/phase1/master.cfg @@ -803,6 +803,7 @@ if ini.has_option("irc", "host") and ini.has_option("irc", "nickname") and ini.h irc_chan = ini.get("irc", "channel") irc_nick = ini.get("irc", "nickname") irc_pass = None + irc_notice = False if ini.has_option("irc", "port"): irc_port = ini.getint("irc", "port") @@ -810,13 +811,17 @@ if ini.has_option("irc", "host") and ini.has_option("irc", "nickname") and ini.h if ini.has_option("irc", "password"): irc_pass = ini.get("irc", "password") + if ini.has_option("irc", "notice") + irc_notice = ini.getboolean("irc", "notice") + irc = words.IRC(irc_host, irc_nick, port = irc_port, password = irc_pass, channels = [{ "channel": irc_chan }], notify_events = { 'exception': 1, 'successToFailure': 1, 'failureToSuccess': 1 - } + }, + noticeOnChannel=irc_notice ) c['status'].append(irc)