+/**
+ * Handler for the IRC "SVSNICK" command.
+ *
+ * @param Client The client from which this command has been received.
+ * @param Req Request structure with prefix and all parameters.
+ * @return CONNECTED or DISCONNECTED.
+ */
+GLOBAL bool
+IRC_SVSNICK(CLIENT *Client, REQUEST *Req)
+{
+ CLIENT *from, *target;
+
+ assert(Client != NULL);
+ assert(Req != NULL);
+
+ /* Search the originator */
+ from = Client_Search(Req->prefix);
+ if (!from)
+ from = Client;
+
+ /* Search the target */
+ target = Client_Search(Req->argv[0]);
+ if (!target || Client_Type(target) != CLIENT_USER)
+ return IRC_WriteErrClient(Client, ERR_NOSUCHNICK_MSG,
+ Client_ID(Client), Req->argv[0]);
+
+ if (Client_Conn(target) <= NONE) {
+ /* We have to forward the message to the server handling
+ * this user; this is required to make sure all servers
+ * in the network do follow the nick name change! */
+ return IRC_WriteStrClientPrefix(Client_NextHop(target), from,
+ "SVSNICK %s %s",
+ Req->argv[0], Req->argv[1]);
+ }
+
+ /* Make sure that the new nickname is valid */
+ if (!Client_CheckNick(from, Req->argv[1]))
+ return CONNECTED;
+
+ Change_Nick(from, target, Req->argv[1], true);
+ return CONNECTED;
+}