diff options
author | Marius Halden <marius.h@lden.org> | 2016-05-29 20:01:43 +0200 |
---|---|---|
committer | Marius Halden <marius.h@lden.org> | 2016-05-29 20:01:43 +0200 |
commit | 4fb18bfbe442001849fc36ba496132a47c766730 (patch) | |
tree | efd3f445445197e64606824029be6b318c079550 /protocols/twitter/twitter.c | |
parent | 3448d86a3f329ec4d625bd72e64a96061e71e675 (diff) |
Add 'quote' command for twitter
Diffstat (limited to 'protocols/twitter/twitter.c')
-rw-r--r-- | protocols/twitter/twitter.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/protocols/twitter/twitter.c b/protocols/twitter/twitter.c index 5f6156a6..9017d3b3 100644 --- a/protocols/twitter/twitter.c +++ b/protocols/twitter/twitter.c @@ -1060,7 +1060,18 @@ static void twitter_handle_command(struct im_connection *ic, char *message) twitter_status_show_url(ic, id); } goto eof; + } else if (g_strcasecmp(cmd[0], "quote") == 0 && cmd[1]) { + id = twitter_message_id_from_command_arg(ic, cmd[1], NULL); + td->last_status_id = 0; + if (id) { + twitter_status_quote_post(ic, id, cmd[2]); + } else { + twitter_log(ic, "User '%s' does not exist or didn't " + "post any statuses recently", cmd[1]); + } + + goto eof; } else if (g_strcasecmp(cmd[0], "post") == 0) { message += 5; allow_post = TRUE; |