|
From: Stephan S. <st...@gm...> - 2003-10-27 21:03:36
|
Hi. This patch is a proposal for /WHOIS. Most irc-servers have only limited information about users that are connected to an other server. So they do not know things like the away message oder the idle time. So far it is possible to use /WHOIS nick server to get the whois info about that nick from server but on most ircnets it should be possible to use /WHOIS nick nick to get the whois info from the server to which that user is connected. If erc-whois-from-other-server is set to non-nil /WHOIS nick will send /WHOIS nick nick instead of just /WHOIS nick. I have tested it on IRCnet (irc.uni-erlangen.de).. What do you think about it? (Now finaly in diff -u format :) diff -u erc.el.1.577 erc.el --- erc.el Mon Oct 27 20:28:55 2003 +++ erc.new Mon Oct 27 20:31:39 2003 @@ -2100,6 +2100,12 @@ :type '(repeat (cons (string :tag "Target") coding-system))) +(defcustom erc-whois-from-other-server nil + "If non-nil, \"/WHOIS <nick>\" should get the info from that user's +server." + :group 'erc + :type 'boolean) + (defun erc-coding-sytem-for-target (target) "Return the coding system or cons cell appropriate for TARGET. This is determined via `erc-encoding-coding-alist' or @@ -2692,9 +2698,10 @@ (defun erc-cmd-WHOIS (user &optional server) "Display whois information for USER." - (let ((send (if server - (format "WHOIS %s %s" user server) - (format "WHOIS %s" user)))) + (let ((send (cond (server (format "WHOIS %s %s" user server)) + (erc-whois-from-other-server + (format "WHOIS %s %s" user user)) + (t (format "WHOIS %s" user))))) (erc-log (format "cmd: %s" send)) (erc-send-command send) t)) -- Stephan Stahl |