This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Konversation - Automatic Actions

Tags: None
(comma "," separated)
User avatar
Moridin
Registered Member
Posts
2
Karma
0
OS

Konversation - Automatic Actions

Mon Aug 16, 2010 11:12 pm
So, I understand that Konversation has "an action system for automatic events". I was wondering how I could use this system, as I seem to be unable to figure it out. Is it just for away/back stuff?

Basically what I want to do is to run a certain command (a /msg) every time I join a particular channel (channel, not server). If that is not possible, I would like to run a set of two commands (one a /join to get to the desired channel, and one my /msg) every time I join up with that particular server.

Is this doable in Konversation? I can't seem to find a good guide to using this system. Any help in this matter is VERY much appreciated. Thanks!
hein
KDE Developer
Posts
69
Karma
1
OS
One way to do this is via the "You joined a channel" notification event and the D-Bus interface.

If you go to the "Configure Notifications" dialog, you will find a "You joined a channel" event in the list there, and that you can enable a "Run command" option for that event. This way you can call an external shell script (or whatever language you prefer, of course) whenever a channel is joined, and pass it the text payload of the notification event as command line argument by way of the %s expando in the "Run command" field (more info as that tooltip is sadly gone in KDE 4).

The text payload contains the name of the channel that has been joined. This way you can filter for the right channel in the shell script, and if it's the one you're interest in, you can at that point use Konversation's D-Bus interface to have it send a message to that channel (see the Scripting chapter in the handbook, or any of the scripts bundled with Konversation for reference and examples).


Plasma, apps hacker. KDE e.V. vice president.
User avatar
Moridin
Registered Member
Posts
2
Karma
0
OS

Re: Konversation - Automatic Actions

Thu Aug 19, 2010 10:26 pm
Alright, thanks. I'll try it out. I appreciate the help!


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], q.ignora, watchstar