+ if (ServerInstance->ULine(dest->server))
+ {
+ user->WriteServ("990 %s :Cannot use an SA command on a u-lined client",user->nick);
+ return CMD_FAILURE;
+ }
+ if (!ServerInstance->IsChannel(parameters[1]))
+ {
+ /* we didn't need to check this for each character ;) */
+ user->WriteServ("NOTICE "+std::string(user->nick)+" :*** Invalid characters in channel name");
+ return CMD_FAILURE;
+ }
+
+ /* 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.
+ */
+ if (IS_LOCAL(dest))
+ {
+ chanrec::JoinUser(ServerInstance, dest, parameters[1], true, "", ServerInstance->Time(true));
+ /* Fix for dotslasher and w00t - if the join didnt succeed, return CMD_FAILURE so that it doesnt propogate */
+ chanrec* n = ServerInstance->FindChan(parameters[1]);
+ if (n)