]> arthur.barton.de Git - ngircd.git/blobdiff - src/ngircd/channel.c
s/sprintf/snprintf
[ngircd.git] / src / ngircd / channel.c
index 2642392c31886827f1072c1ad44c3f8b9619f485..1b7963a2b48c9501c7f199173322c773f9b58ae7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
+ * Copyright (c)2001-2005 by Alexander Barton (alex@barton.de)
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: channel.c,v 1.46 2005/03/19 18:43:48 fw Exp $";
+static char UNUSED id[] = "$Id: channel.c,v 1.49 2005/06/17 19:16:53 fw Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -25,6 +25,7 @@ static char UNUSED id[] = "$Id: channel.c,v 1.46 2005/03/19 18:43:48 fw Exp $";
 #include <string.h>
 #include <strings.h>
 
+#include "defines.h"
 #include "conn-func.h"
 #include "client.h"
 
@@ -247,6 +248,8 @@ Channel_Quit( CLIENT *Client, char *Reason )
        assert( Client != NULL );
        assert( Reason != NULL );
 
+       IRC_WriteStrRelatedPrefix( Client, Client, false, "QUIT :%s", Reason );
+
        c = My_Channels;
        while( c )
        {
@@ -465,7 +468,7 @@ Channel_IsValidName( char *Name )
        if(( Name[0] != '#' ) || ( strlen( Name ) >= CHANNEL_NAME_LEN )) return false;
 
        ptr = Name;
-       strcpy( badchars, " ,:\007" );
+       badchars[0] = '\0';
        while( *ptr )
        {
                if( strchr( badchars, *ptr )) return false;
@@ -806,7 +809,6 @@ Remove_Client( int Type, CHANNEL *Chan, CLIENT *Client, CLIENT *Origin, char *Re
                        /* QUIT: andere Server wurden bereits informiert, vgl. Client_Destroy();
                         * hier also "nur" noch alle User in betroffenen Channeln infomieren */
                        assert( InformServer == false );
-                       IRC_WriteStrChannelPrefix( Origin, c, Origin, false, "QUIT :%s", Reason );
                        Log( LOG_DEBUG, "User \"%s\" left channel \"%s\" (%s).", Client_Mask( Client ), c->name, Reason );
                        break;
                case REMOVE_KICK: