Re: [SLE] XChat under KDE
From: Lenz Grimmer (lenz_at_grimmer.com)
Date: 02/24/04
- Previous message: Ben Rosenberg: "Re: [SLE] Next version of Pro..."
- In reply to: Alex Khroustalev: "[SLE] XChat under KDE"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: Ben Rosenberg: "Re: [SLE] Next version of Pro..."
- In reply to: Alex Khroustalev: "[SLE] XChat under KDE"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|