diff options
author | Xavier Claessens <xclaesse@gmail.com> | 2009-11-16 17:15:07 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2009-11-16 17:15:07 +0800 |
commit | 95fb98c0a53a1f69f9ef97c21fc890e61b74544b (patch) | |
tree | 84295350b28b01da032b3801cbc5541d9c7d7d05 | |
parent | 1da83a90e90795c1e3b04813d6645c0c40e7b51d (diff) | |
parent | 8523d53b5c5a88c2581ca15d92e253c9d3bc38bf (diff) | |
download | gsoc2013-empathy-95fb98c0a53a1f69f9ef97c21fc890e61b74544b.tar gsoc2013-empathy-95fb98c0a53a1f69f9ef97c21fc890e61b74544b.tar.gz gsoc2013-empathy-95fb98c0a53a1f69f9ef97c21fc890e61b74544b.tar.bz2 gsoc2013-empathy-95fb98c0a53a1f69f9ef97c21fc890e61b74544b.tar.lz gsoc2013-empathy-95fb98c0a53a1f69f9ef97c21fc890e61b74544b.tar.xz gsoc2013-empathy-95fb98c0a53a1f69f9ef97c21fc890e61b74544b.tar.zst gsoc2013-empathy-95fb98c0a53a1f69f9ef97c21fc890e61b74544b.zip |
Merge branch 'nick'
-rw-r--r-- | libempathy-gtk/empathy-chat.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c index 62b3d437b..67c8426cb 100644 --- a/libempathy-gtk/empathy-chat.c +++ b/libempathy-gtk/empathy-chat.c @@ -712,6 +712,26 @@ chat_command_msg (EmpathyChat *chat, } static void +chat_command_nick (EmpathyChat *chat, + GStrv strv) +{ + EmpathyChatPriv *priv = GET_PRIV (chat); + TpConnection *connection; + GHashTable *new_alias; + TpHandle handle; + + connection = tp_account_get_connection (priv->account); + handle = tp_connection_get_self_handle (connection); + new_alias = g_hash_table_new (g_direct_hash, g_direct_equal); + g_hash_table_insert (new_alias, GUINT_TO_POINTER (handle), strv[1]); + + tp_cli_connection_interface_aliasing_call_set_aliases (connection, -1, + new_alias, NULL, NULL, NULL, NULL); + + g_hash_table_destroy (new_alias); +} + +static void chat_command_me (EmpathyChat *chat, GStrv strv) { @@ -767,6 +787,9 @@ static ChatCommandItem commands[] = { {"msg", 3, 3, chat_command_msg, N_("/msg <contact id> <message>, open a private chat")}, + {"nick", 2, 2, chat_command_nick, + N_("/nick <nickname>, change your nickname on current server")}, + {"me", 2, 2, chat_command_me, N_("/me <message>, send an ACTION message to the current conversation")}, |