Skip to content

Commit

Permalink
handle doing /names on join sync
Browse files Browse the repository at this point in the history
  • Loading branch information
nicferrier committed Nov 18, 2012
1 parent 2868293 commit 896c024
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions shoes-off.el
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,14 @@ Unsuccessful auth makes no changes and returns `nil'."
data)))
(process-send-string process cmd-str)))

(defun shoes-off/send-to-channel (process channel data)
"Send DATA to CHANNEL which belongs to IRC session PROCESS."
(let ((channel-name (concat channel "@" (process-name process))))
(with-current-buffer (get-buffer channel-name)
(goto-char (point-max))
(insert data)
(rcirc-send-input))))

(defun shoes-off/get-auth-details (process)
"Get the auth details from the process."
(process-get process :shoes-off-authenticated))
Expand Down Expand Up @@ -335,10 +343,10 @@ What's cached is the full text response of the command.")
(maphash
(lambda (channel response)
;; Have to send these directly
(message "shoes-off sending JOIN |%s| to [%s]" response channel)
(message "shoes-off sending JOIN |%s| to [%s]" response channel)
(process-send-string process (concat response "\n"))
;; FIXME send the /names as well
) hash)))))
(shoes-off/send-to-channel session channel "/names"))
hash)))))

(defun shoes-off/authenticate (process auth-details)
"Mark the PROCESS authenticated."
Expand Down

0 comments on commit 896c024

Please sign in to comment.