X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_sajoin.cpp;h=7c3d3512ad639eab79cbb56fdfd82952769ae428;hb=e9e75e50bc25e67af22dd88b39b12217a553d5cb;hp=932b564fa5e27e31c1ff9b609637b38a6ed10c1b;hpb=d00914ed6f5de67ab69c69e1cd1efa0797b5f62d;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_sajoin.cpp b/src/modules/m_sajoin.cpp index 932b564fa..7c3d3512a 100644 --- a/src/modules/m_sajoin.cpp +++ b/src/modules/m_sajoin.cpp @@ -52,15 +52,14 @@ class CommandSajoin : public Command return CMD_FAILURE; } - /* For local users, we send the JoinUser which may create a channel and set its TS. + /* 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 generate the users JOIN or FJOIN instead. + * and then that server will handle the command. */ - if (IS_LOCAL(dest)) + LocalUser* localuser = IS_LOCAL(dest); + if (localuser) { - Channel::JoinUser(dest, parameters[1].c_str(), true, "", false, ServerInstance->Time()); - /* Fix for dotslasher and w00t - if the join didnt succeed, return CMD_FAILURE so that it doesnt propagate */ - Channel* n = ServerInstance->FindChan(parameters[1]); + Channel* n = Channel::JoinUser(localuser, parameters[1], true); if (n) { if (n->HasUser(dest)) @@ -116,15 +115,10 @@ class ModuleSajoin : public Module ServerInstance->Modules->AddService(cmd); } - virtual ~ModuleSajoin() - { - } - virtual Version GetVersion() { return Version("Provides command SAJOIN to allow opers to force-join users to channels", VF_OPTCOMMON | VF_VENDOR); } - }; MODULE_INIT(ModuleSajoin)