my application is growing
First Question is to help me understanding how it works. As shown in help file the ICommand interface provides me these methods:
CODE
Properties
LONG Id [get, set]
This command queries/sets a command ID.
LONG Timeout [get, set]
This command queries/sets the wait timeout in milliseconds.
VARIANT_BOOL Blocking [get, set]
This command queries/sets if blocking is set.
BSTR Command [get, set]
This command queries/sets the command text.
BSTR Reply [get, set]
This command queries/sets the reply text.
BSTR Expected [get, set]
This command queries/sets the expected reply text.
So I made this in my code:
CODE
private Command sCommand;
next a Command EventHandler (but I don't know if I need it???)
CODE
skype.Command += new _ISkypeEvents_CommandEventHandler(skype_Command);
What I want to do:
set chatroles and privileges in a public chat via my application!
from the api-doc:
CODE
ALTER CHATMEMBER SETROLETO
This command enables chat administrators (chat CREATORS AND MASTERS) to set privilege levels (roles) for other chat members.
Syntax:
*
-> ALTER CHATMEMBER <id> SETROLETO CREATOR|MASTER|HELPER|USER|LISTENER
Refer to
*
Chat roles section for more information on different roles. Note that you cannot demote a user to LISTENER role when the chat is already in ready-only mode (USERS_ARE_LISTENERS chat option).
*
ALTER CHATMEMBER CANSETROLETO command for how to determine if it is possible to change the role of any given chat member.
Example:
-> GET CHAT #anappo/$anappo3;5f7cdbdd32dc731c MEMBEROBJECTS
<- CHAT #anappo/$anappo3;5f7cdbdd32dc731c MEMBEROBJECTS 1846, 2227, 2495
-> GET CHATMEMBER 2495 IDENTITY
<- CHATMEMBER 2495 IDENTITY anappo2
-> GET CHATMEMBER 2495 ROLE
<- CHATMEMBER 2495 ROLE HELPER
-> ALTER CHATMEMBER 2495 SETROLETO USER
<- ALTER CHATMEMBER SETROLETO
<- MESSAGE 2620 STATUS SENDING
<- CHATMEMBER 2495 ROLE USER
Version
* Protocol 7 (API version 3.0)
This command enables chat administrators (chat CREATORS AND MASTERS) to set privilege levels (roles) for other chat members.
Syntax:
*
-> ALTER CHATMEMBER <id> SETROLETO CREATOR|MASTER|HELPER|USER|LISTENER
Refer to
*
Chat roles section for more information on different roles. Note that you cannot demote a user to LISTENER role when the chat is already in ready-only mode (USERS_ARE_LISTENERS chat option).
*
ALTER CHATMEMBER CANSETROLETO command for how to determine if it is possible to change the role of any given chat member.
Example:
-> GET CHAT #anappo/$anappo3;5f7cdbdd32dc731c MEMBEROBJECTS
<- CHAT #anappo/$anappo3;5f7cdbdd32dc731c MEMBEROBJECTS 1846, 2227, 2495
-> GET CHATMEMBER 2495 IDENTITY
<- CHATMEMBER 2495 IDENTITY anappo2
-> GET CHATMEMBER 2495 ROLE
<- CHATMEMBER 2495 ROLE HELPER
-> ALTER CHATMEMBER 2495 SETROLETO USER
<- ALTER CHATMEMBER SETROLETO
<- MESSAGE 2620 STATUS SENDING
<- CHATMEMBER 2495 ROLE USER
Version
* Protocol 7 (API version 3.0)
Now, please can someone give me an example how to build a valid command. Maybe lets start with setting a user's privileg to "listener"