- /*
- * XXX: If the user is an oper here, we can just extend their user->chans vector by one
- * and put the channel in here. Same for remote users which are not bound by
- * the channel limits. Otherwise, nope, youre boned.
- */
- if (!IS_LOCAL(user)) /* was a check on fd < 0 */
- {
- ucrec* a = new ucrec();
- chanrec* c = chanrec::ForceChan(Instance, Ptr,a,user,created);
- user->chans.push_back(a);
- return c;
- }
- else if (*user->oper)
- {
- /* Oper allows extension up to the OPERMAXCHANS value */
- if (user->chans.size() < OPERMAXCHANS)
- {
- ucrec* a = new ucrec();
- chanrec* c = chanrec::ForceChan(Instance, Ptr,a,user,created);
- user->chans.push_back(a);
- return c;
- }
- }
+chanrec* chanrec::ForceChan(InspIRCd* Instance, chanrec* Ptr, userrec* user, const std::string &privs)
+{
+ std::string nick = user->nick;
+ bool silent = false;