userrec::QuitUser(Instance, _new,"Server is full");
return;
}
- char* e = Instance->XLines->matches_exception(ipaddr);
+ char* e = Instance->XLines->matches_exception(_new);
if (!e)
{
char* r = Instance->XLines->matches_zline(ipaddr);
long userrec::GlobalCloneCount()
{
- char u1[1024];
- char u2[1024];
+ char u1[1024] = {0};
+ char u2[1024] = {0};
long x = 0;
for (user_hash::const_iterator a = ServerInstance->clientlist.begin(); a != ServerInstance->clientlist.end(); a++)
{
return;
}
- char match_against[MAXBUF];
- snprintf(match_against,MAXBUF,"%s@%s", this->ident, this->host);
- char* e = ServerInstance->XLines->matches_exception(match_against);
+ char* e = ServerInstance->XLines->matches_exception(this);
if (!e)
{
- char* r = ServerInstance->XLines->matches_gline(match_against);
+ char* r = ServerInstance->XLines->matches_gline(this);
if (r)
{
return;
}
- r = ServerInstance->XLines->matches_kline(match_against);
+ r = ServerInstance->XLines->matches_kline(this);
if (r)
{
bool userrec::ChangeName(const char* gecos)
{
+ if (!strcmp(gecos, this->fullname))
+ return true;
+
if (IS_LOCAL(this))
{
int MOD_RESULT = 0;
bool userrec::ChangeDisplayedHost(const char* host)
{
+ if (!strcmp(host, this->dhost))
+ return true;
+
if (IS_LOCAL(this))
{
int MOD_RESULT = 0;
{
if ((*i)->channel)
{
- (*i)->channel->WriteAllExceptSender(this, 0, "JOIN %s", (*i)->channel->name);
+ (*i)->channel->WriteAllExceptSender(this, false, 0, "JOIN %s", (*i)->channel->name);
std::string n = this->ServerInstance->Modes->ModeString(this, (*i)->channel);
- if (n.length())
- (*i)->channel->WriteChannelWithServ(this->ServerInstance->Config->ServerName, "MODE %s +%s", (*i)->channel->name, n.c_str());
+ if (n.length() > 0)
+ (*i)->channel->WriteAllExceptSender(this, true, 0, "MODE %s +%s", (*i)->channel->name, n.c_str());
}
}
}
bool userrec::ChangeIdent(const char* newident)
{
+ if (!strcmp(newident, this->ident))
+ return true;
+
if (this->ServerInstance->Config->CycleHosts)
this->WriteCommonExcept("%s","QUIT :Changing ident");
{
if ((*i)->channel)
{
- (*i)->channel->WriteAllExceptSender(this, 0, "JOIN %s", (*i)->channel->name);
+ (*i)->channel->WriteAllExceptSender(this, false, 0, "JOIN %s", (*i)->channel->name);
std::string n = this->ServerInstance->Modes->ModeString(this, (*i)->channel);
- if (n.length())
- (*i)->channel->WriteChannelWithServ(this->ServerInstance->Config->ServerName, "MODE %s +%s", (*i)->channel->name, n.c_str());
+ if (n.length() > 0)
+ (*i)->channel->WriteAllExceptSender(this, true, 0, "MODE %s +%s", (*i)->channel->name, n.c_str());
}
}
}