diff options
author | Miklos Vajna <vmiklos@frugalware.org> | 2010-03-07 20:50:39 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@frugalware.org> | 2010-03-07 20:50:39 +0100 |
commit | f4d37c6ca3686e538d6615f966320b99353faec3 (patch) | |
tree | acd02d5b9d47d08bb4105eee062fd5518881a626 | |
parent | d9ce18c19ae539be26e5aa03c2bdc0842cb20642 (diff) |
make the edit_prefix configurable
-rw-r--r-- | skype/README | 5 | ||||
-rw-r--r-- | skype/skype.c | 12 |
2 files changed, 15 insertions, 2 deletions
diff --git a/skype/README b/skype/README index a02af715..3a09a7e1 100644 --- a/skype/README +++ b/skype/README @@ -362,6 +362,11 @@ $ skyped -n -d * `account set skype/auto_join true` +- Edited messages are shown with the `EDIT:` prefix. If you don't like + this, you can set your own prefix using: + + * `account set skype/edit_prefix "updated message:"` + == What needs to be done (aka. TODO) - Notice if foo invites bar. Currently you can see only that bar joined. diff --git a/skype/skype.c b/skype/skype.c index c2d0428e..a12fc115 100644 --- a/skype/skype.c +++ b/skype/skype.c @@ -557,8 +557,8 @@ static void skype_parse_chatmessage(struct im_connection *ic, char *line) g_snprintf(buf, IRC_LINE_SIZE, "%s", body); else { - g_snprintf(buf, IRC_LINE_SIZE, "EDIT: %s", - body); + g_snprintf(buf, IRC_LINE_SIZE, "%s %s", + set_getstr(&ic->acc->set, "edit_prefix"), body); sd->is_edit = 0; } } @@ -1042,6 +1042,11 @@ static char *skype_set_display_name(set_t *set, char *value) return value; } +static char *skype_set_edit_prefix(set_t *set, char *value) +{ + return value; +} + static char *skype_set_balance(set_t *set, char *value) { account_t *acc = set->data; @@ -1220,6 +1225,9 @@ static void skype_init(account_t *acc) s = set_add(&acc->set, "auto_join", "false", set_eval_bool, acc); s->flags |= ACC_SET_OFFLINE_ONLY; + + s = set_add(&acc->set, "edit_prefix", "EDIT:", + skype_set_edit_prefix, acc); } void init_plugin(void) |