- /* For local users, we send the JoinUser which may create a channel and set its TS.
- * For non-local users, we just return CMD_SUCCESS, knowing this will propogate it where it needs to be
- * and then that server will generate the users JOIN or FJOIN instead.
+ Channel* chan = ServerInstance->FindChan(channel);
+ if ((chan) && (chan->HasUser(dest)))
+ {
+ user->SendText(":" + user->server->GetName() + " NOTICE " + user->nick + " :*** " + dest->nick + " is already on " + channel);
+ return CMD_FAILURE;
+ }
+
+ /* For local users, we call Channel::JoinUser which may create a channel and set its TS.
+ * For non-local users, we just return CMD_SUCCESS, knowing this will propagate it where it needs to be
+ * and then that server will handle the command.