]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/users.cpp
ConfigReader fixes to cope with tab characters (why didnt we notice this before?)
[user/henk/code/inspircd.git] / src / users.cpp
index 857e2f1d61db42e14eb23d300a9562c276e8db29..48295eddda30ffb49df925080fccbffc9b830e7a 100644 (file)
@@ -13,6 +13,7 @@ userrec::userrec()
        // the PROPER way to do it, AVOID bzero at *ALL* costs
        strcpy(nick,"");
        ip = 0;
+       timeout = 0;
        strcpy(ident,"");
        strcpy(host,"");
        strcpy(dhost,"");
@@ -22,16 +23,18 @@ userrec::userrec()
        strcpy(server,"");
        strcpy(awaymsg,"");
        fd = lastping = signon = idle_lastmsg = nping = registered = 0;
-       port = bytes_in = bytes_out = cmds_in = cmds_out = 0;
+       flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0;
        haspassed = false;
        strcpy(result,"");
        for (int i = 0; i < MAXCHANS; i++)
        {
-               chans[i].channel = NULL;
+               this->chans[i].channel = NULL;
+               this->chans[i].uc_modes = 0;
        }
        invites.clear();
 }
 
+
  
 char* userrec::GetFullHost()
 {
@@ -70,17 +73,21 @@ void userrec::InviteTo(char* channel)
 void userrec::RemoveInvite(char* channel)
 {
        log(DEBUG,"Removing invites");
-       if (invites.size())
+       if (channel)
        {
-               for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
-               {
-                       if (i->channel) {
-                               if (!strcasecmp(i->channel,channel))
+               if (invites.size())
+               {
+                       for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
+                       {
+                               if (i->channel)
                                {
-                                               invites.erase(i);
-                                       return;
-                               }
-                       }
+                                       if (!strcasecmp(i->channel,channel))
+                                       {
+                                               invites.erase(i);
+                                               return;
+                                       }
+                               }
+                       }
                }
         }
 }