X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Fsvsjoin.cpp;h=552e08dd37fc53bfec859f353c4fdb413ccfa0a4;hb=3eb205218a321e454d873ae14e2e717ce9d64142;hp=a1796740df5da821c193059011e371320e7dc41c;hpb=551d687ec6d7ce44be35fae0dd7345fe73c4f63a;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/svsjoin.cpp b/src/modules/m_spanningtree/svsjoin.cpp index a1796740d..552e08dd3 100644 --- a/src/modules/m_spanningtree/svsjoin.cpp +++ b/src/modules/m_spanningtree/svsjoin.cpp @@ -22,10 +22,10 @@ #include "commands.h" -CmdResult CommandSVSJoin::Handle(const std::vector& parameters, User *user) +CmdResult CommandSVSJoin::Handle(User* user, std::vector& parameters) { // Check for valid channel name - if (!ServerInstance->IsChannel(parameters[1].c_str(), ServerInstance->Config->Limits.ChanMax)) + if (!ServerInstance->IsChannel(parameters[1])) return CMD_FAILURE; // Check target exists @@ -34,8 +34,9 @@ CmdResult CommandSVSJoin::Handle(const std::vector& parameters, Use return CMD_FAILURE; /* only join if it's local, otherwise just pass it on! */ - if (IS_LOCAL(u)) - Channel::JoinUser(u, parameters[1], false, "", false, ServerInstance->Time()); + LocalUser* localuser = IS_LOCAL(u); + if (localuser) + Channel::JoinUser(localuser, parameters[1]); return CMD_SUCCESS; }