From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: William Cummings Newsgroups: gmane.emacs.devel Subject: ircv3 support in rcirc Date: Mon, 20 Jun 2016 15:28:48 -0700 Message-ID: <1466461728.3605741.643445049.59252300@webmail.messagingengine.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1466461778 1999 80.91.229.3 (20 Jun 2016 22:29:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Jun 2016 22:29:38 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 21 00:29:21 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bF7h0-0001hh-R4 for ged-emacs-devel@m.gmane.org; Tue, 21 Jun 2016 00:29:18 +0200 Original-Received: from localhost ([::1]:46868 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF7gw-0004TJ-VA for ged-emacs-devel@m.gmane.org; Mon, 20 Jun 2016 18:29:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48217) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF7gl-0004T9-HE for emacs-devel@gnu.org; Mon, 20 Jun 2016 18:29:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bF7gh-00051h-A9 for emacs-devel@gnu.org; Mon, 20 Jun 2016 18:29:03 -0400 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:51690) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bF7gg-000501-0V for emacs-devel@gnu.org; Mon, 20 Jun 2016 18:28:59 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 70C6820BC8 for ; Mon, 20 Jun 2016 18:28:48 -0400 (EDT) Original-Received: from web1 ([10.202.2.211]) by compute4.internal (MEProxy); Mon, 20 Jun 2016 18:28:48 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=E5IWO1AOTc4w1tQsAcYZJEGPC2w=; b=SwGV+ S9IgfMoJO/WB3MaiL190XhqaylLP2W0Ig3sgETLgOyWUI4Tc3Nc4kcqaaTNurcUI jVe3dH6HxvvDgSKb6K7q34YCU6rYhhJVVKA7MkpEUkeezcqwUk7zWA5+okFiXKjC HVnOuxIexbHmvZaPUkpqYGuXnXON9hWLeFKbYo= Original-Received: by mailuser.nyi.internal (Postfix, from userid 99) id 424596A509; Mon, 20 Jun 2016 18:28:48 -0400 (EDT) X-Sasl-Enc: 5BNBFsSSriSUg2e2eFAiTdtwtiirftZRTZ/qwM8HGumC 1466461728 X-Mailer: MessagingEngine.com Webmail Interface - ajax-eb8588c4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.27 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:204614 Archived-At: Hey all, I've been hacking up rcirc.el to support the ircv3 [1] server-time capability. I use this to get nice backlogs from ZNC [2] :) Right now I just have a hacked up copy of rcirc.el in my dotemacs. I'm starting to think about how to extend rcirc to support ircv3 capabilities, so that my code could be a cleaner extension of rcirc. Is this a patch that would be welcome? Here's how I imagine this working: * v3 extensions can be implemented in separate features, for ex. rcirc-server-time * rcirc has a list holding a list of capabilities it will request, the feature will append the capabilities it would like to request * rcirc sends CAP REQ for each requested feature upon connection * when rcirc receives a CAP ACK message, it dispatches this to the appropriate functions/hooks, for ex rcirc-CAP-ACK-server-time or rcirc-cap-ack-received-hook rcirc could maintain its own list of ack'd capabs, and hooks could do something like (rcirc-with-capability "server-time" ...) which would only execute if the capab has been ack'd by the server * when present message tags will be parsed and provided to callbacks and hooks * maybe a on-connect hook? i need this to req backlog after connection but doesnt necessarily relate to the rest here Something along these lines would allow me (and others) to implement a v3 extension w/o overriding functions in rcirc. Any thoughts about this approach? [1] http://ircv3.net/irc/ [2] http://wiki.znc.in/Playback