]> jfr.im git - solanum.git/blobdiff - ircd/hash.c
whowas.c: store account name in whowas (#323)
[solanum.git] / ircd / hash.c
index 0d3fb1287935e0b7a5fa66eb9784a9de4efa3a77..9601f244f03c6158790a67725e7f827890ee2579 100644 (file)
@@ -405,7 +405,7 @@ find_channel(const char *name)
  *  block, if it didn't exist before).
  */
 struct Channel *
-get_or_create_channel(struct Client *client_p, const char *chname, int *isnew)
+get_or_create_channel(struct Client *client_p, const char *chname, bool *isnew)
 {
        struct Channel *chptr;
        int len;
@@ -420,13 +420,13 @@ get_or_create_channel(struct Client *client_p, const char *chname, int *isnew)
                char *t;
                if(IsServer(client_p))
                {
-                       sendto_realops_snomask(SNO_DEBUG, L_ALL,
+                       sendto_realops_snomask(SNO_DEBUG, L_NETWIDE,
                                             "*** Long channel name from %s (%d > %d): %s",
                                             client_p->name, len, CHANNELLEN, s);
                }
                len = CHANNELLEN;
                t = LOCAL_COPY(s);
-               *(t + CHANNELLEN) = '\0';
+               t[len] = '\0';
                s = t;
        }
 
@@ -434,12 +434,12 @@ get_or_create_channel(struct Client *client_p, const char *chname, int *isnew)
        if (chptr != NULL)
        {
                if (isnew != NULL)
-                       *isnew = 0;
+                       *isnew = false;
                return chptr;
        }
 
        if(isnew != NULL)
-               *isnew = 1;
+               *isnew = true;
 
        chptr = allocate_channel(s);
        chptr->channelts = rb_current_time();   /* doesn't hurt to set it here */