+static MODCMD_FUNC(cmd_svspart)
+{
+ struct userNode *target;
+
+ if(!IsChannelName(argv[2])) {
+ reply("MSG_NOT_CHANNEL_NAME");
+ return 0;
+ }
+ target = GetUserH(argv[1]);
+ if (!target) {
+ reply("MSG_NICK_UNKNOWN", argv[1]);
+ return 0;
+ }
+
+ if (!(channel = GetChannel(argv[2]))) {
+ reply("OSMSG_NOT_ON_CHANNEL", cmd->parent->bot->nick, channel->name);
+ return 0;
+ }
+
+ if (!GetUserMode(channel, target)) {
+ reply("OSMSG_NOT_ON_CHANNEL", cmd->parent->bot->nick, channel->name);
+ return 0;
+ }
+
+ irc_svspart(opserv, target, channel);
+ reply("OSMSG_SVSPART_SENT");
+ return 1;
+}
+