]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/users.cpp
Fix for parameters which contain a colon (which is not the first char in the string)
[user/henk/code/inspircd.git] / src / users.cpp
index 7be073bd69a9b169ec1c20b8bb84b3e95bd0ac32..46f5d512bde6acc69365ccfaf11155f4c4a03a15 100644 (file)
  * ---------------------------------------------------
  */
 
-#include "inspircd_config.h"
 #include "configreader.h"
 #include "channels.h"
-#include "connection.h"
 #include "users.h"
 #include "inspircd.h"
 #include <stdarg.h>
-#include "inspstring.h"
-#include "commands.h"
-
-#include "typedefs.h"
 #include "socketengine.h"
-#include "hashcomp.h"
 #include "wildcard.h"
 #include "xline.h"
 #include "cull_list.h"
@@ -117,7 +110,7 @@ std::string userrec::ProcessNoticeMasks(const char *sm)
                                {
                                        if ((!IsNoticeMaskSet(*c) && adding) || (IsNoticeMaskSet(*c) && !adding))
                                        {
-                                               if ((oldadding != adding) || (sm == c))
+                                               if ((oldadding != adding) || (!output.length()))
                                                        output += (adding ? '+' : '-');
 
                                                this->SetNoticeMask(*c, adding);
@@ -713,17 +706,15 @@ void userrec::QuitUser(InspIRCd* Instance, userrec *user,const std::string &quit
        }
 
        /*
-        * this must come before the ServerInstance->WriteOpers so that it doesnt try to fill their buffer with anything
-        * if they were an oper with +s.
-        *
-        * XXX -
-        * In the current implementation, we only show local quits, as we only show local connects. With 
-        * the proposed implmentation of snomasks however, this will likely change in the (near?) future.
+        * this must come before the ServerInstance->SNO->WriteToSnoMaskso that it doesnt try to fill their buffer with anything
+        * if they were an oper with +sn +qQ.
         */
        if (user->registered == REG_ALL)
        {
                if (IS_LOCAL(user))
-                       Instance->WriteOpers("*** Client exiting: %s!%s@%s [%s]",user->nick,user->ident,user->host,reason.c_str());
+                       Instance->SNO->WriteToSnoMask('q',"Client exiting: %s!%s@%s [%s]",user->nick,user->ident,user->host,reason.c_str());
+               else
+                       Instance->SNO->WriteToSnoMask('Q',"Client exiting on server %s: %s!%s@%s [%s]",user->server,user->nick,user->ident,user->host,reason.c_str());
                user->AddToWhoWas();
        }
 
@@ -1079,7 +1070,7 @@ void userrec::FullConnect(CullList* Goners)
        FOREACH_MOD(I_OnUserConnect,OnUserConnect(this));
        FOREACH_MOD(I_OnPostConnect,OnPostConnect(this));
        this->registered = REG_ALL;
-       ServerInstance->WriteOpers("*** Client connecting on port %d: %s!%s@%s [%s]", this->GetPort(), this->nick, this->ident, this->host, this->GetIPString());
+       ServerInstance->SNO->WriteToSnoMask('c',"Client connecting on port %d: %s!%s@%s [%s]", this->GetPort(), this->nick, this->ident, this->host, this->GetIPString());
 }
 
 /** userrec::UpdateNick()