作者 Anonymous [scheme] 2012-01-13 20:17 (点击下载)

  1. (defun erc-cmd-HOWMANY (&rest ignore)
  2. "Display how many users (and ops) the current channel has."
  3. (erc-display-message nil 'notice (current-buffer)
  4. (let ((hash-table (with-current-buffer
  5. (erc-server-buffer)
  6. erc-server-users))
  7. (users 0)
  8. (ops 0))
  9. (maphash (lambda (k v)
  10. (when (member (current-buffer)
  11. (erc-server-user-buffers v))
  12. (incf users))
  13. (when (erc-channel-user-op-p k)
  14. (incf ops)))
  15. hash-table)
  16. (format
  17. "There are %s users (%s ops) on the current channel"
  18. users ops))))
  19.  
  20. (defun erc-cmd-SHOW (&rest form)
  21. "Eval FORM and send the result and the original form as:
  22. FORM => (eval FORM)."
  23. (let* ((form-string (mapconcat 'identity form " "))
  24. (result
  25. (condition-case err
  26. (eval (read-from-whole-string form-string))
  27. (error
  28. (format "Error: %s" error)))))
  29. (erc-send-message (format "%s => %S" form-string result))))

提交下面的校正或者修改. (点击这里开始一个新的帖子)
姓名: 在 cookie 中记住我的名字

屏幕抓图:(jpeg 或 png)