+ 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;
+ }
+
+ chanrec::JoinUser(ServerInstance, dest, parameters[1], 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)
+ {
+ if (n->HasUser(dest))