Server protocol:SVS2MODE command

The SVS2MODE/SVSMODE commands are used by services to add or remove usermodes to or from a user.

SVS2MODE and SVSMODE differ slightly, in that SVS2MODE will display the mode change to the user, whereas SVSMODE will not.

For server writers
Below is technical documentation for server/services coders:

Syntax
SVS2MODE :server SVS2MODE target mode params SVSMODE :server SVSMODE target mode params

Where:
 * target: The nick or UID of the target user, or the target channel name.
 * mode: The modes to add/remove to/from the user.
 * params: Optional, for modes that require a parameter.

How to use
There are a number of powerful things you can do with this command. The following was taken from the module where this command is implemented:

When your target is a channel:
 * This will remove all bans/exempts/invex in the channel.
 * This will remove all bans/exempts/invex that affect the given nickname. Eg:  may remove bans places on IP, host, cloaked host, vhost, basically anything that matches this nickname. Note that the user with the specified nickname needs to be online for this to work.
 * This will remove the specified mode(s) from all users in the channel. Eg:  will result in a   for every channel operator.

When your target is a user:
 * The only special difference from  that is present is for usermode d. When you're setting   on a user with SVS(2)MODE, it means you are logging in the user with the provided parameter. Note: It's recommended to use   for logging users in, instead of this prehistoric method, to avoid confusion.

Note: While you can oper a user using, it's a much better idea to use   SVSO Command as you can specify an operclass, vhost, snomask and other things.

Examples
De-oper the user called Valware: SVS2MODE Valware -o

Force a user to be marked as a bot: SVS2MODE Valware +B

Login the user called Valware to account Valware: SVS2MODE Valware +d Valware

Remove all bans for user Valware in the channel #PossumsOnly: SVS2MODE #PossumsOnly -b Valware

Remove all exceptions in the channel #Services: SVS2MODE #Services -e

De-op everyone in the channel #BadChannel: SVS2MODE #BadChannel -o

Purpose
The purpose of this command is for services packages to be able to change modes of users and channels with security in mind with a powerful syntax.