* ---------------------------------------------------
*/
+/* $Core: libIRCDchannels */
+
#include "inspircd.h"
#include <stdarg.h>
#include "wildcard.h"
* add a channel to a user, creating the record for it if needed and linking
* it to the user record
*/
-Channel* Channel::JoinUser(InspIRCd* Instance, User *user, const char* cn, bool override, const char* key, time_t TS)
+Channel* Channel::JoinUser(InspIRCd* Instance, User *user, const char* cn, bool override, const char* key, bool bursting, time_t TS)
{
if (!user || !cn)
return NULL;
}
}
- return Channel::ForceChan(Instance, Ptr, user, privs);
+ return Channel::ForceChan(Instance, Ptr, user, privs, bursting);
}
-Channel* Channel::ForceChan(InspIRCd* Instance, Channel* Ptr, User* user, const std::string &privs)
+Channel* Channel::ForceChan(InspIRCd* Instance, Channel* Ptr, User* user, const std::string &privs, bool bursting)
{
std::string nick = user->nick;
bool silent = false;
}
}
- FOREACH_MOD_I(Instance,I_OnUserJoin,OnUserJoin(user, Ptr, silent));
+ FOREACH_MOD_I(Instance,I_OnUserJoin,OnUserJoin(user, Ptr, bursting, silent));
if (!silent)
Ptr->WriteChannel(user,"JOIN :%s",Ptr->name);
FOREACH_RESULT(I_OnUserList,OnUserList(user, this, ulist));
if (MOD_RESULT == 1)
return;
+ if (MOD_RESULT != -1)
+ {
+ if ((this->IsModeSet('s')) && (!this->HasUser(user)))
+ {
+ user->WriteServ("401 %s %s :No such nick/channel",user->nick, this->name);
+ return;
+ }
+ }
dlen = curlen = snprintf(list,MAXBUF,"353 %s %c %s :", user->nick, this->IsModeSet('s') ? '@' : this->IsModeSet('p') ? '*' : '=', this->name);