]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/users.cpp
Skip certificate generation if we're running non-interactive
[user/henk/code/inspircd.git] / src / users.cpp
index 53d46ceb8be94978056543655dcb039892858727..8c6711d64e6807ecca69a5597c24b551cd9a9236 100644 (file)
@@ -973,7 +973,7 @@ void userrec::AddClient(InspIRCd* Instance, int socket, int port, bool iscached,
                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);
@@ -1068,13 +1068,11 @@ void userrec::FullConnect(CullList* Goners)
                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)
                {
@@ -1084,7 +1082,7 @@ void userrec::FullConnect(CullList* Goners)
                        return;
                }
                
-               r = ServerInstance->XLines->matches_kline(match_against);
+               r = ServerInstance->XLines->matches_kline(this);
                
                if (r)
                {
@@ -1756,10 +1754,10 @@ bool userrec::ChangeDisplayedHost(const char* host)
                {
                        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());
                        }
                }
        }
@@ -1786,10 +1784,10 @@ bool userrec::ChangeIdent(const char* newident)
                {
                        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());
                        }
                }
        }