Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.


#209 When I /query someone, X-Chat should /whois them

Jason Spiro

When I /query someone, X-Chat should /whois them automatically. (Preferably in the extended-whois format which reveals idle time too: /whois nickname nickname.) This would be especially useful when using a BitlBee gateway to stay in touch with my instant-messaging buddies, but it would be useful in general too.

Khisanth has already written a script[1] to do the opposite -- to /whois someone when they /msg you -- but he doesn't know of any pre-existing script to do what I want.

^ [1].


  • Lian Wan Situ
    Lian Wan Situ

    actually the reason I gave you that is because the change to make it do what you want is very simple. :) will send a whois when ever you /query someone
    As you can see in the diff below it's only 4 lines of change and only 2 are really significant.

    --- 2008-07-28 18:48:06.000000000 -0400
    +++ 2009-12-02 04:10:13.000000000 -0500
    @@ -2,11 +2,14 @@
    use warnings;
    use Xchat qw(:all);

    -register( "Whois on PM", "1.0", "Whois whoever sends you a message and keep the result in the query window" );
    -hook_print( "Open Dialog",
    +register( "Whois Query", "1.0",
    + "Send a WHOIS whenever you open a dialog to querying someone" );
    +hook_print( "Open Context",
    sub {
    + return EAT_NONE unless context_info->{type} == 3; # dialog context
    my $from = get_info "channel";
    - command "WHOIS $from";
    + command "WHOIS $from $from";

    my @whois_events = (
    "WhoIs Authenticated", "WhoIs Away Line",