]> jfr.im git - irc/unrealircd/unrealircd.git/commitdiff
SJ3 fixes
authorluke <redacted>
Fri, 2 Aug 2002 22:34:50 +0000 (22:34 +0000)
committerluke <redacted>
Fri, 2 Aug 2002 22:34:50 +0000 (22:34 +0000)
Changes
src/channel.c

diff --git a/Changes b/Changes
index dd0ad8fd3c7ac3e1d20a0f4c0f05950be80e3470..bd5e7fa26385eb8f9b1206e5250b402b674d8207 100644 (file)
--- a/Changes
+++ b/Changes
@@ -578,3 +578,7 @@ Fixed lowercase host errors with cloaking (sts' patch)
 do_mode_char fixes (mostly from sts)
 --Luke
 ===================================
+
+SJ3 fixes from codemastr for possible desynch
+--Luke
+===================================
index 59271d9a2a1b7e78635c830f6c45c4a2c1609d6f..c38425e83af53d6bafa2470ec44900f1362ad6b0 100644 (file)
@@ -5144,11 +5144,8 @@ int m_sjoin(aClient *cptr, aClient *sptr, int parc, char *parv[])
                 if (oldmode.key[0] && chptr->mode.key[0]
                     && strcmp(oldmode.key, chptr->mode.key))
                 {
-                        x = strlen(oldmode.key);
-                        y = strlen(chptr->mode.key);
-                        z = MAX(x, y);
-                        if (z == x)
-                        {
+                        if (strcmp(oldmode.key, chptr->mode.key) > 0)
+                       {
                                 strcpy(chptr->mode.key, oldmode.key);
                         }
                         else
@@ -5156,15 +5153,12 @@ int m_sjoin(aClient *cptr, aClient *sptr, int parc, char *parv[])
                                 Addit('k', chptr->mode.key);
                         }
                 }
-                /* same as above .. */
+                /* same as above (except case insensitive #test == #TEST -- codemastr) */
                 if (oldmode.link[0] && chptr->mode.link[0]
-                    && strcmp(oldmode.link, chptr->mode.link))
+                    && stricmp(oldmode.link, chptr->mode.link))
                 {
-                        x = strlen(oldmode.link);
-                        y = strlen(chptr->mode.link);
-                        z = MAX(x, y);
-                        if (z == x)
-                        {
+                        if (strcmp(oldmode.link, chptr->mode.link) > 0)
+                       {
                                 strcpy(chptr->mode.link, oldmode.link);
                         }
                         else