diff options
author | Marius Halden <marius.h@lden.org> | 2016-08-01 12:44:47 +0200 |
---|---|---|
committer | Marius Halden <marius.h@lden.org> | 2016-08-01 12:44:47 +0200 |
commit | 94f613581320f660204bf967aafd74e6450b1389 (patch) | |
tree | e664d73139186eed94a406bed9eec2d6c59bb4b8 /protocols/twitter/twitter.c | |
parent | b506b948e3a37ccf334d1cb2367b7dd6f0879e61 (diff) |
Add dm command
Diffstat (limited to 'protocols/twitter/twitter.c')
-rw-r--r-- | protocols/twitter/twitter.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/protocols/twitter/twitter.c b/protocols/twitter/twitter.c index 0c075c77..0d635b21 100644 --- a/protocols/twitter/twitter.c +++ b/protocols/twitter/twitter.c @@ -1089,6 +1089,13 @@ static void twitter_handle_command(struct im_connection *ic, char *message) } else if (g_strcasecmp(cmd[0], "post") == 0) { message += 5; allow_post = TRUE; + } else if (g_strcasecmp(cmd[0], "dm") == 0 && cmd[1] && cmd[2]) { + if ((bu = bee_user_by_handle(ic->bee, ic, cmd[1]))) { + twitter_direct_messages_new(ic, bu->handle, cmd[2]); + } else { + twitter_direct_messages_new(ic, cmd[1], cmd[2]); + } + goto eof; } if (allow_post) { |