void chanrec::SetModeParam(char mode,const char* parameter,bool mode_on)
{
- ServerInstance->Log(DEBUG,"SetModeParam called");
-
CustomModeList::iterator n = custom_mode_params.find(mode);
if (mode_on)
{
if (n == custom_mode_params.end())
- {
custom_mode_params[mode] = strdup(parameter);
- ServerInstance->Log(DEBUG,"Custom mode parameter %c %s added",mode,parameter);
- }
- else
- {
- ServerInstance->Log(DEBUG, "Tried to set custom mode parameter for %c '%s' when it was already '%s'", mode, parameter, n->second);
- }
}
else
{
*Ptr->topic = 0;
*Ptr->setby = 0;
Ptr->topicset = 0;
- Instance->Log(DEBUG,"chanrec::JoinUser(): created: %s",cname);
new_channel = true;
}
else
}
}
}
- else
- {
- Instance->Log(DEBUG,"chanrec::JoinUser(): Overridden checks");
- }
}
/* NOTE: If the user is an oper here, we can extend their user->chans by up to
- * OPERMAXCHANS. For remote users which are not bound by the channel limits,
- * we can extend infinitely. Otherwise, nope, youre restricted to MAXCHANS.
+ * OperMaxchans. For remote users which are not bound by the channel limits,
+ * we can extend infinitely. Otherwise, nope, youre restricted to MaxChans.
*/
- if (!IS_LOCAL(user) || override == true) /* was a check on fd < 0 */
+ if (!IS_LOCAL(user) || override == true)
{
return chanrec::ForceChan(Instance, Ptr, user, privs);
}
else if (*user->oper)
{
- /* Oper allows extension up to the OPERMAXCHANS value */
- if (user->chans.size() < OPERMAXCHANS)
+ /* Oper allows extension up to the OperMaxchans value */
+ if (user->chans.size() < Instance->Config->OperMaxChans)
{
return chanrec::ForceChan(Instance, Ptr, user, privs);
}
}
- else if (user->chans.size() < MAXCHANS)
+ else if (user->chans.size() < Instance->Config->MaxChans)
{
return chanrec::ForceChan(Instance, Ptr, user, privs);
}
if (new_channel)
{
- Instance->Log(DEBUG,"BLAMMO, Whacking channel.");
/* Things went seriously pear shaped, so take this away. bwahaha. */
chan_hash::iterator n = Instance->chanlist->find(cname);
if (n != Instance->chanlist->end())
/* kill the record */
if (iter != ServerInstance->chanlist->end())
{
- ServerInstance->Log(DEBUG,"del_channel: destroyed: %s", this->name);
FOREACH_MOD(I_OnChannelDelete,OnChannelDelete(this));
ServerInstance->chanlist->erase(iter);
}
return;
FOREACH_RESULT(I_OnUserList,OnUserList(user, this));
- ServerInstance->Log(DEBUG,"MOD_RESULT for UserList = %d",MOD_RESULT);
if (MOD_RESULT == 1)
return;
- ServerInstance->Log(DEBUG,"Using builtin NAMES list generation");
-
dlen = curlen = snprintf(list,MAXBUF,"353 %s = %s :", user->nick, this->name);
int numusers = 0;
void chanrec::SetPrefix(userrec* user, char prefix, unsigned int prefix_value, bool adding)
{
- ServerInstance->Log(DEBUG,"Setting prefix: %c on user %s in %s to %d", prefix, user->nick, this->name, adding);
prefixlist::iterator n = prefixes.find(user);
prefixtype pfx = std::make_pair(prefix,prefix_value);
if (adding)
n->second.erase(x);
}
}
- ServerInstance->Log(DEBUG,"Added prefix %c to %s for %s, prefixlist size is now %d", prefix, this->name, user->nick, prefixes.size());
}
void chanrec::RemoveAllPrefixes(userrec* user)
prefixlist::iterator n = prefixes.find(user);
if (n != prefixes.end())
{
- ServerInstance->Log(DEBUG,"Removed prefixes from %s for %s, prefixlist size is now %d", this->name, user->nick, prefixes.size());
prefixes.erase(n);
}
}