
kopete !action script
Source (link to git-repo or to original if based on someone elses unmodified work):
Based on Ryan Patterson's kopete pounce script.
Basically, given a user defined set of commands in a configuration file, a automatic response from either the output of a command or a specified text message will be responded to the client. For example, when somebody sends me the message '!fortune', they are automatically responded with the output of the program fortune, a random quote. !music tells them what i am listening to.
If that didn't make any sense, look at the screenshot.
I should warn you that if you incorrectly set up the safelist of commands to execute, then i suppose it would be possible to give someone access to 'rm -rf ~'. Very bad. Don't do it.
To install, extract the contents to a directory (i use ~/.kde/share/apps/kopete/), edit the script to your requirement, and modify the safelist as you will.
Features:
+ DoS prevention through use of a 'minimum delay' between calls of the script per user.
+ Permissions, including 'allowed' and 'forbidden' users.
+ Help outputs (must be defined).
+ WebCam support with camE -> this allows a user to upload a snapshot from the webcam to a directory and sends the url back to the user. (Thanks to Ian Eure for this).
v1.6
Thanks to Ian Eure who made major contributions to this script, including support for a webcam shot, which is uploaded to a webserver using camE. This version supports permissions, allowing for restrictions to be placed for certain commands (Ian Eure). Cleaning of reg exp's, and other small tidy ups. New file called `help`, provides a help file for a particular command. Call it by typing `!help music`, for example.
v1.52
Thanks to Ian Eure for providing me with an update to the Nickname retrieval.
v1.5
This release fixes the DOS bug. There is a default 5 seconds delay before any one person can call the script more than once. More configuration options.
v1.1
Fixes a bug which prevented the script from sending a message to contacts which have more than one consecutive space in their nickname.
v 1.0
- Initial Release
Ratings & Comments
16 Comments
Just so everyone is aware.. from what I can see of the functionality of this script, it is totally obsolete since around Kopete 0.8.. the Alias plugin provides the capability to alias these types of commands right in Kopete itself. For example, to alias /fortune, you simple add an alias from 'fortune' to '/exec -o fortune'.
IIRC That replaces the alias in outgoing messages, not replying to incoming messages, hence is entirely different. This is more like a chatbot script sort of dealie.
I do like the program and so do all the people that keep on sending !fortune to me at all hours. My problem is that quite often it brings up the message "XML document could not be parsed!". Is it something I've done wrong or does it happen to others out there?
Yes, i have same problem, it's a kopete problem, nothing todo with this script. Kopete has difficulty displaying many special characters. There is a bug filed for it, hopefully it will be fixed soon.
What theme are you using ?
I am using: + knifty win deco + plastik style + ballistik xmms skin + nuvola icon set + my own custom colour scheme
Ok, thanks, it's very nice.
You can use this script to knock people off IRC for excess flooding. Seb, can you put a large warning indicating this on the notes, or fix it?
v 1.50 should have settled this issue.
"if you use the now listening plugin, and it works, this is better" When doesn't it work? I'd like to know so I can fix it.
When you don't have xmmsctrl header before compiling the plugin. It's a real pain. I have tried recompiling the plugin after installing xmmsctrl.h, but still doesn't seem to work.
What iconset are you using?
nuvola
And what font is that in your windowtitle and clock? :)
Its it called Futura Lt BT
that's pretty cool but one needs to be careful cuz u don't wanna get caught watching your porn - hahaha.