Include the message sender in desktop notification
[riece] / lisp / riece-keepalive.el
index 739d494..9d32757 100644 (file)
@@ -1,4 +1,4 @@
-;;; riece-keepalive.el --- keep an IRC connection
+;;; riece-keepalive.el --- keep an IRC connection -*- lexical-binding: t -*-
 ;; Copyright (C) 1998-2004 Daiki Ueno
 
 ;; Author: Daiki Ueno <ueno@unixuser.org>
@@ -19,8 +19,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
@@ -29,6 +29,7 @@
 ;;; Code:
 
 (require 'riece-options)
+(require 'riece-server)
 
 (defgroup riece-keepalive nil
   "Keep an IRC connection."
@@ -52,8 +53,7 @@
          (riece-run-at-time
           riece-keepalive-ping-repeat riece-keepalive-ping-repeat
           (lambda (buffer)
-            (save-excursion
-              (set-buffer buffer)
+            (with-current-buffer buffer
               (riece-send-string "PING riece-keepalive\r\n")))
           (current-buffer)))))