}
active = true;
- Channel* channel = Channel::JoinUser(ServerInstance, user, parameters[0].c_str(), false, "", false);
+ Channel* channel = Channel::JoinUser(user, parameters[0].c_str(), false, "", false);
active = false;
if (channel)
if (notice)
{
channel = ServerInstance->FindChan(parameters[0]);
- channel->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s joined on official network business.",
+ channel->WriteChannelWithServ(ServerInstance->Config->ServerName.c_str(), "NOTICE %s :%s joined on official network business.",
parameters[0].c_str(), user->nick.c_str());
ServerInstance->PI->SendChannelNotice(channel, 0, std::string(user->nick) + " joined on official network business.");
}
class NetworkPrefix : public ModeHandler
{
public:
- NetworkPrefix(Module* parent) : ModeHandler(parent, 'Y', PARAM_ALWAYS, MODETYPE_CHANNEL)
+ NetworkPrefix(Module* parent) : ModeHandler(parent, "official-join", 'Y', PARAM_ALWAYS, MODETYPE_CHANNEL)
{
list = true;
prefix = NPrefix;
const UserMembList* cl = channel->GetUsers();
std::vector<std::string> mode_junk;
mode_junk.push_back(channel->name);
- irc::modestacker modestack(ServerInstance, false);
+ irc::modestacker modestack(false);
std::deque<std::string> stackresult;
for (UserMembCIter i = cl->begin(); i != cl->end(); i++)
((source == theuser) && (!adding)) ||
(ServerInstance->ULine(source->nick.c_str())) ||
(ServerInstance->ULine(source->server)) ||
- (!*source->server) ||
(!IS_LOCAL(source))
)
{
public:
- ModuleOjoin(InspIRCd* Me)
- : Module(Me), np(NULL), mycommand(this)
+ ModuleOjoin()
+ : np(NULL), mycommand(this)
{
/* Load config stuff */
OnRehash(NULL);
void OnRehash(User* user)
{
- ConfigReader Conf(ServerInstance);
+ ConfigReader Conf;
if (!np)
{
ModResult OnUserPreKick(User* source, Membership* memb, const std::string &reason)
{
- if ((ServerInstance->ULine(source->nick.c_str())) || (ServerInstance->ULine(source->server)) || (!*source->server))
+ if ((ServerInstance->ULine(source->nick.c_str())) || ServerInstance->ULine(source->server))
return MOD_RES_PASSTHRU;
// Don't do anything if they're not +Y
~ModuleOjoin()
{
- ServerInstance->Modes->DelMode(np);
delete np;
}