X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_delayjoin.cpp;h=1077e65a720e293d0915f5675c729b60a117fdfc;hb=f51d9ad5ab7015f78a29039ca7ed169b281ff6bb;hp=435148c61490d90ebaa09900bd1b2d44aea613d6;hpb=53afaa7cadcdf222dcf761441727305f79b4c557;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_delayjoin.cpp b/src/modules/m_delayjoin.cpp index 435148c61..1077e65a7 100644 --- a/src/modules/m_delayjoin.cpp +++ b/src/modules/m_delayjoin.cpp @@ -2,7 +2,7 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2007 InspIRCd Development Team + * InspIRCd: (C) 2002-2008 InspIRCd Development Team * See: http://www.inspircd.org/wiki/index.php/Credits * * This program is free but copyrighted software; see @@ -65,7 +65,7 @@ class ModuleDelayJoin : public Module : Module(Me) { djm = new DelayJoinMode(ServerInstance, this); - if (!ServerInstance->AddMode(djm)) + if (!ServerInstance->Modes->AddMode(djm)) throw ModuleException("Could not add new modes!"); Implementation eventlist[] = { I_OnUserJoin, I_OnUserPart, I_OnUserKick, I_OnUserQuit, I_OnUserList, I_OnText }; ServerInstance->Modules->Attach(eventlist, this, 6); @@ -118,7 +118,7 @@ class ModuleDelayJoin : public Module return 0; } - virtual void OnUserJoin(User* user, Channel* channel, bool &silent) + virtual void OnUserJoin(User* user, Channel* channel, bool sync, bool &silent) { if (channel->IsModeSet('D')) { @@ -191,6 +191,10 @@ class ModuleDelayJoin : public Module /* Display the join to everyone else (the user who joined got it earlier) */ this->WriteCommonFrom(user, channel, "JOIN %s", channel->name); + std::string n = this->ServerInstance->Modes->ModeString(user, channel); + if (n.length() > 0) + this->WriteCommonFrom(user, channel, "MODE %s +%s", channel->name, n.c_str()); + /* Shrink off the neccessary metadata for a specific channel */ user->Shrink(std::string("delayjoin_")+channel->name);