aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/erc
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/erc')
-rw-r--r--lisp/erc/ChangeLog8
-rw-r--r--lisp/erc/ChangeLog.0212
-rw-r--r--lisp/erc/erc-dcc.el21
-rw-r--r--lisp/erc/erc.el2
4 files changed, 31 insertions, 12 deletions
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index 3fd2c87d59c..1b67835cb07 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -1,3 +1,11 @@
12011-11-28 Mike Kazantsev <mk.fraggod@gmail.com> (tiny change)
2
3 * erc-dcc.el (erc-dcc-ctcp-query-send-regexp): Updated regexp to
4 match quoted filenames with spaces inside.
5 (erc-dcc-handle-ctcp-send): Updated regexp match group numbers,
6 added processing of escaped quotes and backslashes if filename
7 itself was in quotes.
8
12011-11-20 Juanma Barranquero <lekktu@gmail.com> 92011-11-20 Juanma Barranquero <lekktu@gmail.com>
2 10
3 * erc-log.el (erc-logging-enabled): Fix typo. 11 * erc-log.el (erc-logging-enabled): Fix typo.
diff --git a/lisp/erc/ChangeLog.02 b/lisp/erc/ChangeLog.02
index 279a336f15f..3364af531f5 100644
--- a/lisp/erc/ChangeLog.02
+++ b/lisp/erc/ChangeLog.02
@@ -979,7 +979,7 @@
979 979
9802002-11-16 Alex Schroeder <alex@gnu.org> 9802002-11-16 Alex Schroeder <alex@gnu.org>
981 981
982 * erc-autoaway.el, erc-button.el, erc-fill.el, erc-match.el, 982 * erc-autoaway.el, erc-button.el, erc-fill.el, erc-match.el,
983 erc-menu.el, erc-ring.el, erc-track.el: 983 erc-menu.el, erc-ring.el, erc-track.el:
984 Cleanup of file headers: copyright years, GPL mumbo-jumbo, commentaries. 984 Cleanup of file headers: copyright years, GPL mumbo-jumbo, commentaries.
985 985
@@ -1447,7 +1447,7 @@
1447 * erc-match.el: fixed spelling error 1447 * erc-match.el: fixed spelling error
1448 1448
1449 * erc-track.el, erc-match.el: * erc-match.el: 1449 * erc-track.el, erc-match.el: * erc-match.el:
1450 highlight current nickname in its own face (deactivated by default): 1450 highlight current nickname in its own face (inactive by default):
1451 - added erc-current-nick-highlight-type, erc-current-nick-face, 1451 - added erc-current-nick-highlight-type, erc-current-nick-face,
1452 erc-current-nick-p 1452 erc-current-nick-p
1453 1453
@@ -1564,7 +1564,7 @@
1564 (require 'erc-nickserv) is now necessary for this to work 1564 (require 'erc-nickserv) is now necessary for this to work
1565 1565
1566 * erc.el: 1566 * erc.el:
1567 * results of /COUNTRY now formatted as notice; errors are ignored, 1567 * results of /COUNTRY now formatted as notice; errors are ignored,
1568 fixing 1568 fixing
1569 bug which made prompt disappear 1569 bug which made prompt disappear
1570 1570
@@ -1959,9 +1959,9 @@
1959 1959
1960 * erc.el: remove trailing \n from any sent text 1960 * erc.el: remove trailing \n from any sent text
1961 1961
1962 * servers.pl, erc-bbdb.el, erc-button.el, erc-chess.el, 1962 * servers.pl, erc-bbdb.el, erc-button.el, erc-chess.el,
1963 erc-complete.el, erc-fill.el, erc-ibuffer.el, erc-list.el, 1963 erc-complete.el, erc-fill.el, erc-ibuffer.el, erc-list.el,
1964 erc-match.el, erc-menu.el, erc-nets.el, erc-replace.el, 1964 erc-match.el, erc-menu.el, erc-nets.el, erc-replace.el,
1965 erc-speak.el, erc-speedbar.el, erc-track.el, erc.el: 1965 erc-speak.el, erc-speedbar.el, erc-track.el, erc.el:
1966 clean whitespace 1966 clean whitespace
1967 1967
diff --git a/lisp/erc/erc-dcc.el b/lisp/erc/erc-dcc.el
index 19e1801e03c..fce22aadcc4 100644
--- a/lisp/erc/erc-dcc.el
+++ b/lisp/erc/erc-dcc.el
@@ -649,7 +649,16 @@ that subcommand."
649 ?q query ?n nick ?u login ?h host)))) 649 ?q query ?n nick ?u login ?h host))))
650 650
651(defconst erc-dcc-ctcp-query-send-regexp 651(defconst erc-dcc-ctcp-query-send-regexp
652 "^DCC SEND \\([^ ]+\\) \\([0-9]+\\) \\([0-9]+\\) *\\([0-9]*\\)") 652 (concat "^DCC SEND \\("
653 ;; Following part matches either filename without spaces
654 ;; or filename enclosed in double quotes with any number
655 ;; of escaped double quotes inside.
656 "\"\\(\\(.*?\\(\\\\\"\\)?\\)+?\\)\"\\|\\([^ ]+\\)"
657 "\\) \\([0-9]+\\) \\([0-9]+\\) *\\([0-9]*\\)"))
658
659(defsubst erc-dcc-unquote-filename (filename)
660 (erc-replace-regexp-in-string "\\\\\\\\" "\\"
661 (erc-replace-regexp-in-string "\\\\\"" "\"" filename t t) t t))
653 662
654(defun erc-dcc-handle-ctcp-send (proc query nick login host to) 663(defun erc-dcc-handle-ctcp-send (proc query nick login host to)
655 "This is called if a CTCP DCC SEND subcommand is sent to the client. 664 "This is called if a CTCP DCC SEND subcommand is sent to the client.
@@ -664,10 +673,12 @@ It extracts the information about the dcc request and adds it to
664 'dcc-request-bogus 673 'dcc-request-bogus
665 ?r "SEND" ?n nick ?u login ?h host)) 674 ?r "SEND" ?n nick ?u login ?h host))
666 ((string-match erc-dcc-ctcp-query-send-regexp query) 675 ((string-match erc-dcc-ctcp-query-send-regexp query)
667 (let ((filename (match-string 1 query)) 676 (let ((filename
668 (ip (erc-decimal-to-ip (match-string 2 query))) 677 (or (match-string 3 query)
669 (port (match-string 3 query)) 678 (erc-dcc-unquote-filename (match-string 2 query))))
670 (size (match-string 4 query))) 679 (ip (erc-decimal-to-ip (match-string 6 query)))
680 (port (match-string 7 query))
681 (size (match-string 8 query)))
671 ;; FIXME: a warning really should also be sent 682 ;; FIXME: a warning really should also be sent
672 ;; if the ip address != the host the dcc sender is on. 683 ;; if the ip address != the host the dcc sender is on.
673 (erc-display-message 684 (erc-display-message
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index a218dd12555..0eff33f1e75 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -2626,7 +2626,7 @@ VALUE is computed by evaluating the rest of LINE in Lisp."
2626(defun erc-cmd-default (line) 2626(defun erc-cmd-default (line)
2627 "Fallback command. 2627 "Fallback command.
2628 2628
2629Commands for which no erc-cmd-xxx exists, are tunnelled through 2629Commands for which no erc-cmd-xxx exists, are tunneled through
2630this function. LINE is sent to the server verbatim, and 2630this function. LINE is sent to the server verbatim, and
2631therefore has to contain the command itself as well." 2631therefore has to contain the command itself as well."
2632 (erc-log (format "cmd: DEFAULT: %s" line)) 2632 (erc-log (format "cmd: DEFAULT: %s" line))