Tip of the day: UnrealIRCd 6 uses GeoIP by default. It is shown in WHOIS but also available as country in mask items,for example it can be used in the TLD Block to serve a Spanish MOTD to people in Spanish speaking countries. |
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:
SVSMODE #chan -[b|e|I]
This will remove all bans/exempts/invex in the channel.SVSMODE #chan -[b|e|I] nickname
This will remove all bans/exempts/invex that affect the given nickname.
Eg:-b nick
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.SVSMODE #chan -[v|h|o|a|q]
This will remove the specified mode(s) from all users in the channel.
Eg:-o
will result in aMODE -o
for every channel operator.
When your target is a user:
- The only special difference from
MODE
that is present is for usermode d.
When you're setting+d
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 theSVSLOGIN
command for logging users in, instead of this prehistoric method, to avoid confusion.
Note: While you can oper a user using SVS2MODE nick +o
, it's a much better idea to use the 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.