diff options
author | Miklos Vajna <vmiklos@vmiklos.hu> | 2013-01-01 16:44:31 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@vmiklos.hu> | 2013-01-01 16:44:31 +0100 |
commit | 7764fb1ce63f1339f005e698ddfeba96186e9925 (patch) | |
tree | 325e942ea97e228f8276e96f4ab51cccd4620c76 /protocols/skype | |
parent | eab8e52503885305ea652bf99a48f7a584ddc1cd (diff) |
skype: support setting mood text
Requested by martinc on IRC.
Diffstat (limited to 'protocols/skype')
-rw-r--r-- | protocols/skype/README | 5 | ||||
-rw-r--r-- | protocols/skype/skype.c | 14 |
2 files changed, 16 insertions, 3 deletions
diff --git a/protocols/skype/README b/protocols/skype/README index 95ac0475..a881b8aa 100644 --- a/protocols/skype/README +++ b/protocols/skype/README @@ -346,9 +346,10 @@ $ skyped -n -d * `account skype set test_join true` -- Mood texts are not shown by default. If you want to see it: +- Mood texts are not shown by default. - * `account skype set show_moods true` + * If you want to see them: `account skype set show_moods true` + * If you want to change your mood text: `account skype set mood_text 'foo bar'` - Group support: diff --git a/protocols/skype/skype.c b/protocols/skype/skype.c index 60471d01..1caa8b15 100644 --- a/protocols/skype/skype.c +++ b/protocols/skype/skype.c @@ -1,7 +1,7 @@ /* * skype.c - Skype plugin for BitlBee * - * Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012 by Miklos Vajna <vmiklos@frugalware.org> + * Copyright (c) 2007-2013 by Miklos Vajna <vmiklos@frugalware.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1321,6 +1321,15 @@ static char *skype_set_display_name(set_t *set, char *value) return value; } +static char *skype_set_mood_text(set_t *set, char *value) +{ + account_t *acc = set->data; + struct im_connection *ic = acc->ic; + + skype_printf(ic, "SET PROFILE MOOD_TEXT %s", value); + return value; +} + static char *skype_set_balance(set_t *set, char *value) { account_t *acc = set->data; @@ -1513,6 +1522,9 @@ static void skype_init(account_t *acc) acc); s->flags |= ACC_SET_NOSAVE | ACC_SET_ONLINE_ONLY; + s = set_add(&acc->set, "mood_text", NULL, skype_set_mood_text, acc); + s->flags |= ACC_SET_NOSAVE | ACC_SET_ONLINE_ONLY; + s = set_add(&acc->set, "call", NULL, skype_set_call, acc); s->flags |= ACC_SET_NOSAVE | ACC_SET_ONLINE_ONLY; |