Mercurial > pidgin
comparison libpurple/protocols/jabber/jabber.c @ 19920:0ed8a2a86a1b
explicit merge of 'fc49baf44017a8fd511c607b435668baf2a0f518'
and 'b50640e3caa45410064cc403c759c1b427800a1e'
to branch 'org.maemo.garage.pidgin.pidgin.dialog-transience'
author | Gabriel Schulhof <nix@go-nix.ca> |
---|---|
date | Fri, 17 Aug 2007 22:10:43 +0000 |
parents | 25517a27771d 28a7c9dbbc2b |
children | 6a0d9fa477d4 |
comparison
equal
deleted
inserted
replaced
19918:dd5e6f06be8f | 19920:0ed8a2a86a1b |
---|---|
1716 } | 1716 } |
1717 | 1717 |
1718 static PurpleCmdRet jabber_cmd_chat_role(PurpleConversation *conv, | 1718 static PurpleCmdRet jabber_cmd_chat_role(PurpleConversation *conv, |
1719 const char *cmd, char **args, char **error, void *data) | 1719 const char *cmd, char **args, char **error, void *data) |
1720 { | 1720 { |
1721 JabberChat *chat; | 1721 JabberChat *chat = jabber_chat_find_by_conv(conv); |
1722 | 1722 |
1723 if (!chat || !args || !args[0] || !args[1]) | 1723 if (!chat || !args || !args[0] || !args[1]) |
1724 return PURPLE_CMD_RET_FAILED; | 1724 return PURPLE_CMD_RET_FAILED; |
1725 | 1725 |
1726 if (strcmp(args[1], "moderator") != 0 && | 1726 if (strcmp(args[1], "moderator") != 0 && |
1728 strcmp(args[1], "visitor") != 0 && | 1728 strcmp(args[1], "visitor") != 0 && |
1729 strcmp(args[1], "none") != 0) { | 1729 strcmp(args[1], "none") != 0) { |
1730 *error = g_strdup_printf(_("Unknown role: \"%s\""), args[1]); | 1730 *error = g_strdup_printf(_("Unknown role: \"%s\""), args[1]); |
1731 return PURPLE_CMD_RET_FAILED; | 1731 return PURPLE_CMD_RET_FAILED; |
1732 } | 1732 } |
1733 | |
1734 chat = jabber_chat_find_by_conv(conv); | |
1735 | 1733 |
1736 if (!jabber_chat_role_user(chat, args[0], args[1])) { | 1734 if (!jabber_chat_role_user(chat, args[0], args[1])) { |
1737 *error = g_strdup_printf(_("Unable to set role \"%s\" for user: %s"), | 1735 *error = g_strdup_printf(_("Unable to set role \"%s\" for user: %s"), |
1738 args[1], args[0]); | 1736 args[1], args[0]); |
1739 return PURPLE_CMD_RET_FAILED; | 1737 return PURPLE_CMD_RET_FAILED; |