aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olson2007-11-29 22:36:38 +0000
committerMichael Olson2007-11-29 22:36:38 +0000
commit2131c501dd40482c6c30b538eecfc7e9ab4e58d2 (patch)
tree861f8992c4737997bd3470d7c7748fe369798d15
parentb510360c6bf66da86512b837c9533cbd24b776fe (diff)
downloademacs-2131c501dd40482c6c30b538eecfc7e9ab4e58d2.tar.gz
emacs-2131c501dd40482c6c30b538eecfc7e9ab4e58d2.zip
Sync from upstream ERC
- Parse 307 (nick has identified) responses. - Only activate some things if the connection has been established.
-rw-r--r--lisp/erc/ChangeLog16
-rw-r--r--lisp/erc/erc-autoaway.el3
-rw-r--r--lisp/erc/erc-backend.el10
-rw-r--r--lisp/erc/erc-netsplit.el15
-rw-r--r--lisp/erc/erc-notify.el3
-rw-r--r--lisp/erc/erc-track.el5
-rw-r--r--lisp/erc/erc.el1
7 files changed, 42 insertions, 11 deletions
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index b7f40c39411..232e004602f 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -1,3 +1,8 @@
12007-11-29 Giorgos Keramidas <keramida@ceid.upatras.gr>
2
3 * erc-backend.el, erc.el:
4 Parse 307 (nick has identified) responses.
5
12007-11-15 Juanma Barranquero <lekktu@gmail.com> 62007-11-15 Juanma Barranquero <lekktu@gmail.com>
2 7
3 * erc.el (erc-open): 8 * erc.el (erc-open):
@@ -5,6 +10,17 @@
5 * erc-log.el (log): 10 * erc-log.el (log):
6 * erc-match.el (erc-log-matches): Fix typos in docstrings. 11 * erc-match.el (erc-log-matches): Fix typos in docstrings.
7 12
132007-11-11 Michael Olson <mwolson@gnu.org>
14
15 * erc-autoaway.el (erc-autoaway-possibly-set-away):
16 * erc-netsplit.el (erc-netsplit-timer):
17 * erc-notify.el (erc-notify-timer):
18 * erc-track.el (erc-user-is-active): Only run if we have
19 successfully established a connection to the server and have
20 logged in. I suspect that sending messages too soon may make some
21 IRC servers not respond well, particularly when the network
22 connection is iffy or subject to traffic-shaping.
23
82007-11-01 Michael Olson <mwolson@gnu.org> 242007-11-01 Michael Olson <mwolson@gnu.org>
9 25
10 * erc-compat.el (erc-set-write-file-functions): New compatibility 26 * erc-compat.el (erc-set-write-file-functions): New compatibility
diff --git a/lisp/erc/erc-autoaway.el b/lisp/erc/erc-autoaway.el
index c70beb112e2..4c841387d7f 100644
--- a/lisp/erc/erc-autoaway.el
+++ b/lisp/erc/erc-autoaway.el
@@ -248,7 +248,8 @@ exceeds `erc-autoaway-idle-seconds'."
248 ;; A test for (erc-server-process-alive) is not necessary, because 248 ;; A test for (erc-server-process-alive) is not necessary, because
249 ;; this function is called from `erc-timer-hook', which is called 249 ;; this function is called from `erc-timer-hook', which is called
250 ;; whenever the server sends something to the client. 250 ;; whenever the server sends something to the client.
251 (when (and erc-auto-set-away 251 (when (and erc-server-connected
252 erc-auto-set-away
252 (not erc-autoaway-caused-away) 253 (not erc-autoaway-caused-away)
253 (erc-autoaway-some-open-server-buffer)) 254 (erc-autoaway-some-open-server-buffer))
254 (let ((idle-time (erc-time-diff erc-autoaway-last-sent-time 255 (let ((idle-time (erc-time-diff erc-autoaway-last-sent-time
diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el
index 5b4e79fda32..338696f37d6 100644
--- a/lisp/erc/erc-backend.el
+++ b/lisp/erc/erc-backend.el
@@ -1564,6 +1564,16 @@ See `erc-display-server-message'." nil
1564 (erc-display-message parsed 'notice 'active 1564 (erc-display-message parsed 'notice 'active
1565 's306 ?m (erc-response.contents parsed))) 1565 's306 ?m (erc-response.contents parsed)))
1566 1566
1567(define-erc-response-handler (307)
1568 "Display nick-identified message." nil
1569 (multiple-value-bind (nick user message)
1570 (cdr (erc-response.command-args parsed))
1571 (erc-display-message
1572 parsed 'notice 'active 's307
1573 ?n nick
1574 ?m (mapconcat 'identity (cddr (erc-response.command-args parsed))
1575 " "))))
1576
1567(define-erc-response-handler (311 314) 1577(define-erc-response-handler (311 314)
1568 "WHOIS/WHOWAS notices." nil 1578 "WHOIS/WHOWAS notices." nil
1569 (let ((fname (erc-response.contents parsed)) 1579 (let ((fname (erc-response.contents parsed))
diff --git a/lisp/erc/erc-netsplit.el b/lisp/erc/erc-netsplit.el
index 83bc0dffc0c..b20b7ad738b 100644
--- a/lisp/erc/erc-netsplit.el
+++ b/lisp/erc/erc-netsplit.el
@@ -173,13 +173,14 @@ join from that split has been detected or not.")
173 173
174(defun erc-netsplit-timer (now) 174(defun erc-netsplit-timer (now)
175 "Clean cruft from `erc-netsplit-list' older than 10 minutes." 175 "Clean cruft from `erc-netsplit-list' older than 10 minutes."
176 (dolist (elt erc-netsplit-list) 176 (when erc-server-connected
177 (when (> (erc-time-diff (cadr elt) now) 600) 177 (dolist (elt erc-netsplit-list)
178 (when erc-netsplit-debug 178 (when (> (erc-time-diff (cadr elt) now) 600)
179 (erc-display-message 179 (when erc-netsplit-debug
180 nil 'notice (current-buffer) 180 (erc-display-message
181 (concat "Netsplit: Removing " (car elt)))) 181 nil 'notice (current-buffer)
182 (setq erc-netsplit-list (delq elt erc-netsplit-list))))) 182 (concat "Netsplit: Removing " (car elt))))
183 (setq erc-netsplit-list (delq elt erc-netsplit-list))))))
183 184
184;;;###autoload 185;;;###autoload
185(defun erc-cmd-WHOLEFT () 186(defun erc-cmd-WHOLEFT ()
diff --git a/lisp/erc/erc-notify.el b/lisp/erc/erc-notify.el
index 9216631a9b4..34556a00d6c 100644
--- a/lisp/erc/erc-notify.el
+++ b/lisp/erc/erc-notify.el
@@ -111,7 +111,8 @@ changes."
111;;;; Timer handler 111;;;; Timer handler
112 112
113(defun erc-notify-timer (now) 113(defun erc-notify-timer (now)
114 (when (and erc-notify-list 114 (when (and erc-server-connected
115 erc-notify-list
115 (> (erc-time-diff 116 (> (erc-time-diff
116 erc-last-ison-time now) 117 erc-last-ison-time now)
117 erc-notify-interval)) 118 erc-notify-interval))
diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el
index ad3eaf73a4b..15de2094214 100644
--- a/lisp/erc/erc-track.el
+++ b/lisp/erc/erc-track.el
@@ -665,8 +665,9 @@ only consider active buffers visible.")
665 665
666(defun erc-user-is-active (&rest ignore) 666(defun erc-user-is-active (&rest ignore)
667 "Set `erc-buffer-activity'." 667 "Set `erc-buffer-activity'."
668 (setq erc-buffer-activity (erc-current-time)) 668 (when erc-server-connected
669 (erc-track-modified-channels)) 669 (setq erc-buffer-activity (erc-current-time))
670 (erc-track-modified-channels)))
670 671
671(defun erc-track-get-buffer-window (buffer frame-param) 672(defun erc-track-get-buffer-window (buffer frame-param)
672 (if (eq frame-param 'selected-visible) 673 (if (eq frame-param 'selected-visible)
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 497b6ffd396..ac9c3f6df9b 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -6205,6 +6205,7 @@ All windows are opened in the current frame."
6205 (s303 . "Is online: %n") 6205 (s303 . "Is online: %n")
6206 (s305 . "%m") 6206 (s305 . "%m")
6207 (s306 . "%m") 6207 (s306 . "%m")
6208 (s307 . "%n %m")
6208 (s311 . "%n is %f (%u@%h)") 6209 (s311 . "%n is %f (%u@%h)")
6209 (s312 . "%n is/was on server %s (%c)") 6210 (s312 . "%n is/was on server %s (%c)")
6210 (s313 . "%n is an IRC operator") 6211 (s313 . "%n is an IRC operator")