regchan *rcp;
reguser *rup;
regchanuser *rcup=NULL;
+ chanindex *cip;
int iscreate;
int dowelcome=0;
if (!(rcp=cp->index->exts[chanservext]) || CIsSuspended(rcp))
return;
+ cip=cp->index;
+
rcp->tripjoins++;
rcp->totaljoins++;
if (cp->users->totalusers > rcp->maxusers)
/* Check for +b chanlev flag */
if (!IsService(np) && rcup && CUIsBanned(rcup)) {
- cs_banuser(NULL, cp->index, np, NULL);
- cs_timerfunc(cp->index);
+ cs_banuser(NULL, cip, np, NULL);
+ cs_timerfunc(cip);
return;
}
if (IsInviteOnly(cp) || (IsRegOnly(cp) && !IsAccount(np))) {
localkickuser(chanservnick,cp,np,"Authorised users only.");
} else {
- cs_banuser(NULL, cp->index, np, "Authorised users only.");
- cs_timerfunc(cp->index);
+ cs_banuser(NULL, cip, np, "Authorised users only.");
+ cs_timerfunc(cip);
}
return;
}
switch(dowelcome) {
case 1: if (rcp->welcome)
- chanservsendmessage(np,"[%s] %s",cp->index->name->content, rcp->welcome->content);
+ chanservsendmessage(np,"[%s] %s",cip->name->content, rcp->welcome->content);
break;
case 2: if (chanservnick) {
/* Channel x is protected by y */
- chanservstdmessage(np,QM_PROTECTED,cp->index->name->content,chanservnick->nick);
+ chanservstdmessage(np,QM_PROTECTED,cip->name->content,chanservnick->nick);
}
break;
}