X-Git-Url: https://cgit.sxemacs.org/?p=riece;a=blobdiff_plain;f=lisp%2Friece-misc.el;h=0e218e6eb33594424c1e0645103422f384f7cbb0;hp=c4fa7bc8c8a6e0af4074dcc4eaa409a0934bba45;hb=7f49617682aff4897389a9a83f8b640033b65321;hpb=9174f38ace6e8cd879b41adc4d6aa4b5b727f7ea diff --git a/lisp/riece-misc.el b/lisp/riece-misc.el index c4fa7bc..0e218e6 100644 --- a/lisp/riece-misc.el +++ b/lisp/riece-misc.el @@ -181,7 +181,9 @@ user-at-host)) (defun riece-get-users-on-server () - (riece-with-server-buffer (riece-identity-server riece-current-channel) + (riece-with-server-buffer (if riece-current-channel + (riece-identity-server riece-current-channel) + "") (let (users) (mapatoms (lambda (atom) @@ -192,6 +194,15 @@ users (cons riece-real-nickname users))))) +(defun riece-check-channel-commands-are-usable (&optional channel) + (unless riece-current-channel + (error (substitute-command-keys + "Type \\[riece-command-join] to join a channel"))) + (if (and channel + (not (riece-channel-p (riece-identity-prefix + riece-current-channel)))) + (error "Not on a channel"))) + (provide 'riece-misc) ;;; riece-misc.el ends here