* @param user The user joining the channel
* @param chan If the channel is a new channel, this will be NULL, otherwise it will be a pointer to the channel being joined
* @param cname The channel name being joined. For new channels this is valid where chan is not.
- * @param privs A string containing the users privilages when joining the channel. For new channels this will contain "@".
+ * @param privs A string containing the users privilages when joining the channel. For new channels this will contain "o".
* You may alter this string to alter the user's modes on the channel.
* @param keygiven The key given to join the channel, or an empty string if none was provided
* @return 1 To prevent the join, 0 to allow it.
}
else
{
- privs = "@";
+ privs = "o";
created_by_local = true;
}
for (std::string::const_iterator x = privs.begin(); x != privs.end(); x++)
{
const char status = *x;
- ModeHandler* mh = Instance->Modes->FindPrefix(status);
+ ModeHandler* mh = Instance->Modes->FindMode(status, MODETYPE_CHANNEL);
if (mh)
{
/* Set, and make sure that the mode handler knows this mode was now set */
// the config option for it is set
if (FirstInGetsFounder && !chan)
- privs += std::string(1, QPrefix);
+ privs += 'q';
return MOD_RES_PASSTHRU;
}
{
ServerInstance->SNO->WriteGlobalSno('a', std::string(user->nick)+" used OJOIN to join "+channel->name);
- if (!NPrefix)
- {
- std::vector<std::string> modes;
- modes.push_back(parameters[0]);
- modes.push_back("+Y");
- modes.push_back(user->nick);
- ServerInstance->SendMode(modes, ServerInstance->FakeClient);
- ServerInstance->PI->SendMode(channel->name, ServerInstance->Modes->GetLastParseParams(), ServerInstance->Modes->GetLastParseTranslate());
- }
-
if (notice)
{
channel = ServerInstance->FindChan(parameters[0]);