Re: [SLE] XChat under KDE

From: Lenz Grimmer (lenz_at_grimmer.com)
Date: 02/24/04

  • Next message: Matthew Johnson: "Re: [SLE] Next version of Pro..."
    Date: Tue, 24 Feb 2004 00:25:07 +0100 (CET)
    To: suse-linux-e@suse.com
    
    

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Hi,

    On Thu, 5 Feb 2004, Alex Khroustalev wrote:

    > Hi. I use XChat in KDE environment as an IRC client. Is it possible to make
    > XChat use sound card instead of pc-speaker for notifications?
    > SuSE 9 Pro
    > XChat 2.0.4
    > KDE 3.1.4

    I use the following small perl plugin for that (ugly hack, I know) - it
    beeps whenever my nick has been mentioned in a channel. There are several
    other Perl plugins for that available via xchat.org, IIRC.

    [SNIP]
    #!/usr/bin/perl -w

    my $VERSION= "0.1";
    my $DEBUG=0;
    #
    my $SOUNDDIR= $ENV{HOME} . "/.kde/share/sounds";
    # The application to play sounds
    my $PLAY= "/opt/kde3/bin/artsplay";
    # The sound to play
    my $SOUND= "$SOUNDDIR/Submarine.aiff";
    # The default name
    my $NICK= "lenz";

    IRC::register("Beeper", "$VERSION", "", "");
    IRC::print "\0034 -- Loading Beeper v$VERSION --\003\n";
    IRC::add_message_handler("PRIVMSG", "privmsg_handler");

    sub privmsg_handler
    {
            my $myNick= IRC::get_info(1);
            my $line= shift(@_);
            $line=~ m/\:(.*?)\!(.*?)\sPRIVMSG\s(.*?)\s\:(.*)?/;
            my $msgNick= $1;
            my $hmSender= $2;
            my $msgType= $3;
            my $msgLine= $4;

            if ($DEBUG)
            {
                    IRC::print "$line\n";
                    IRC::print "msgNick:$msgNick, hmSender:$hmSender msgtype:$msgType, msgLine:$msgLine\n";
            }

            if ($msgLine=~ /.*($myNick|$NICK).*/i)
            {
                    IRC::print "NICK MATCH" if ($DEBUG);
                    system("$PLAY $SOUND");
            }
            
            return $line;
    }
    [SNIP]

    Bye,
            LenZ
    - --
    - ------------------------------------------------------------------
     Lenz Grimmer <lenz@grimmer.com> -o)
     [ICQ: 160767607 | Jabber: LenZGr@jabber.org] /\\
     http://www.lenzg.org/ V_V
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.3 (GNU/Linux)
    Comment: For info see http://quantumlab.net/pine_privacy_guard/

    iD8DBQFAOovUSVDhKrJykfIRAsP3AJ9Qc8gi0wfyfhdj24Ir/GeODqsvYgCeJhgZ
    tbysHnPdyIa6tYrr0vfOvrM=
    =X3zN
    -----END PGP SIGNATURE-----

    -- 
    Check the headers for your unsubscription address
    For additional commands send e-mail to suse-linux-e-help@suse.com
    Also check the archives at http://lists.suse.com
    Please read the FAQs: suse-linux-e-faq@suse.com
    

  • Next message: Matthew Johnson: "Re: [SLE] Next version of Pro..."

    Relevant Pages

    • Re: 2 minutes silence
      ... Did they sound the Death March ... Did the band play "The Last Post And Chorus?" ...
      (uk.rec.sheds)
    • Re: Shostakovichs 8th symphony?
      ... but the PSO simply doesn't have enough sound and impact ... They play very well, but they just don't have a very impactful ... playing style. ... the conductors who shape the sound of the orchestra. ...
      (rec.music.classical.recordings)
    • Re: Shostakovichs 8th symphony?
      ... but the PSO simply doesn't have enough sound and impact ... They play very well, but they just don't have a very impactful ... Francisco sounds to me compared to my favorite orchestras (I think ... playing style. ...
      (rec.music.classical.recordings)
    • Re: Shostakovichs 8th symphony?
      ... but the PSO simply doesn't have enough sound and impact ... They play very well, but they just don't have a very impactful ... Francisco sounds to me compared to my favorite orchestras (I think ... playing style. ...
      (rec.music.classical.recordings)
    • Re: Chord connection
      ... could hear 20+ notes(he would listen to an orchestra play a chord and then ... sound a little bizarre) is to meditate. ... feels the same about practice and writing - did I do it right? ... This kinda goes back to thinking that there must be ...
      (rec.music.theory)