]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fixed some channel pointer stuff (eeeky)
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 26 Apr 2004 14:59:00 +0000 (14:59 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 26 Apr 2004 14:59:00 +0000 (14:59 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@737 e03df62e-2008-0410-955e-edbf42e46eb7

src/InspIRCd.layout
src/message.cpp
src/xline.cpp

index 0fe70ebfa85b21c1a95404c41e11965180cd07e3..3b4af22035f8aa7a944ee4b369f048ea10fb4cd5 100644 (file)
@@ -1,5 +1,5 @@
 [Editors]
-Focused=43
+Focused=39
 Order=2,4,6,3,7,25,5,24,39,42,43,-1,1,46,0
 
 [Editor_0]
@@ -13,9 +13,9 @@ LeftChar=1
 [Editor_1]
 Open=1
 Top=0
-CursorCol=1
-CursorRow=1
-TopLine=1
+CursorCol=22
+CursorRow=185
+TopLine=158
 LeftChar=1
 
 [Editor_2]
@@ -301,16 +301,16 @@ TopLine=10
 LeftChar=1
 [Editor_39]
 Open=1
-Top=0
-CursorCol=1
-CursorRow=237
-TopLine=220
+Top=1
+CursorCol=75
+CursorRow=61
+TopLine=428
 LeftChar=1
 [Editor_40]
-Open=0
+Open=1
 Top=0
-CursorCol=14
-CursorRow=10
+CursorCol=1
+CursorRow=31
 TopLine=1
 LeftChar=1
 [Editor_41]
@@ -329,10 +329,10 @@ TopLine=618
 LeftChar=1
 [Editor_43]
 Open=1
-Top=1
-CursorCol=27
-CursorRow=2482
-TopLine=2441
+Top=0
+CursorCol=3
+CursorRow=176
+TopLine=142
 LeftChar=1
 [Editor_44]
 Open=1
@@ -351,7 +351,7 @@ LeftChar=1
 [Editor_46]
 Open=1
 Top=0
-CursorCol=5
-CursorRow=553
-TopLine=549
+CursorCol=13
+CursorRow=154
+TopLine=128
 LeftChar=1
index 41f919be9a609fcb5fa3fadc650b8cdade144a40..a86f84ea2f99e21237f66669a820952e4844f31a 100644 (file)
@@ -58,7 +58,7 @@ int common_channels(userrec *u, userrec *u2)
                {
                        if ((u->chans[i].channel != NULL) && (u2->chans[z].channel != NULL))
                        {
-                               if ((u->chans[i].channel == u2->chans[z].channel) && (u->chans[i].channel) && (u2->chans[z].channel) && (u->registered == 7) && (u2->registered == 7))
+                               if ((!strcasecmp(u->chans[i].channel->name,u2->chans[z].channel->name)) && (u->chans[i].channel) && (u2->chans[z].channel) && (u->registered == 7) && (u2->registered == 7))
                                {
                                        if ((c_count(u)) && (c_count(u2)))
                                        {
@@ -328,21 +328,24 @@ char* cmode(userrec *user, chanrec *chan)
        int i;
        for (int i = 0; i != MAXCHANS; i++)
        {
-               if ((user->chans[i].channel == chan) && (chan != NULL))
+               if (u->chans[i].channel)
                {
-                       if ((user->chans[i].uc_modes & UCMODE_OP) > 0)
+                       if ((!strcasecmp(u->chans[i].channel->name,chan->name)) && (chan != NULL))
                        {
-                               return "@";
-                       }
-                       if ((user->chans[i].uc_modes & UCMODE_HOP) > 0)
-                       {
-                               return "%";
-                       }
-                       if ((user->chans[i].uc_modes & UCMODE_VOICE) > 0)
-                       {
-                               return "+";
+                               if ((user->chans[i].uc_modes & UCMODE_OP) > 0)
+                               {
+                                       return "@";
+                               }
+                               if ((user->chans[i].uc_modes & UCMODE_HOP) > 0)
+                               {
+                                       return "%";
+                               }
+                               if ((user->chans[i].uc_modes & UCMODE_VOICE) > 0)
+                               {
+                                       return "+";
+                               }
+                               return "";
                        }
-                       return "";
                }
        }
 }
@@ -361,21 +364,24 @@ int cstatus(userrec *user, chanrec *chan)
 
        for (int i = 0; i != MAXCHANS; i++)
        {
-               if ((user->chans[i].channel == chan) && (chan != NULL))
+               if (u->chans[i].channel)
                {
-                       if ((user->chans[i].uc_modes & UCMODE_OP) > 0)
-                       {
-                               return STATUS_OP;
-                       }
-                       if ((user->chans[i].uc_modes & UCMODE_HOP) > 0)
-                       {
-                               return STATUS_HOP;
-                       }
-                       if ((user->chans[i].uc_modes & UCMODE_VOICE) > 0)
+                       if ((!strcasecmp(u->chans[i].channel->name,chan->name)) && (chan != NULL))
                        {
-                               return STATUS_VOICE;
+                               if ((user->chans[i].uc_modes & UCMODE_OP) > 0)
+                               {
+                                       return STATUS_OP;
+                               }
+                               if ((user->chans[i].uc_modes & UCMODE_HOP) > 0)
+                               {
+                                       return STATUS_HOP;
+                               }
+                               if ((user->chans[i].uc_modes & UCMODE_VOICE) > 0)
+                               {
+                                       return STATUS_VOICE;
+                               }
+                               return STATUS_NORMAL;
                        }
-                       return STATUS_NORMAL;
                }
        }
 }
@@ -391,9 +397,12 @@ int has_channel(userrec *u, chanrec *c)
        }
        for (int i =0; i != MAXCHANS; i++)
        {
-               if (u->chans[i].channel == c)
+               if (u->chans[i].channel)
                {
-                       return 1;
+                       if (!strcasecmp(u->chans[i].channel->name,c->name))
+                       {
+                               return 1;
+                       }
                }
        }
        return 0;
index bb254d22a3809aff824e817e531c045b5a744f58..9e756abe58cbcfa53d9f985033562b98323ab5ba 100644 (file)
@@ -583,7 +583,6 @@ void apply_lines()
                                        {
                                                snprintf(reason,MAXBUF,"Matched Q-Lined nick: %s",check);
                                                WriteOpers("*** Q-Lined nickname %s from %s: %s",u->second->nick,u->second->host,check);
-                                               WriteServ(u->second->fd,"432 %s %s :Invalid nickname: %s",u->second->nick,u->second->nick,check);
                                                kill_link(u->second,reason);
                                                go_again = true;
                                                break;