Added to riece-modules.
authorueno <ueno>
Sun, 1 Jun 2003 07:42:49 +0000 (07:42 +0000)
committerueno <ueno>
Sun, 1 Jun 2003 07:42:49 +0000 (07:42 +0000)
lisp/COMPILE
lisp/riece-rdcc.el

index 153f1fa..4cf3e31 100644 (file)
@@ -42,6 +42,7 @@
                ;; add-ons
                riece-ctcp
                riece-highlight
+               riece-rdcc
                riece-url
                riece-unread))))
 
index e1ed72c..d5217f0 100644 (file)
@@ -56,6 +56,8 @@ Only used for sending files."
       (delete-region (point-min) (point)))))
 
 (defun riece-rdcc-server-sentinel (process status)
+  (with-current-buffer (process-buffer process)
+    (message "Sending %s...done" riece-rdcc-request-file))
   (kill-buffer (process-buffer process))
   (delete-process process))
 
@@ -77,10 +79,11 @@ session = server.accept
 if session
   total = 0
   File.open('" file "') {|file|
-    bytes = file.read(1024)
-    total += bytes.length
-    puts(\"#{total}\")
-    session.write(bytes)
+    while (bytes = file.read(1024))
+      total += bytes.length
+      puts(\"#{total}\")
+      session.write(bytes)
+    end
   }
   session.close
 end