s/Log(LOG_DEBUG/LogDebug(/ , translated comments, etc.
This commit is contained in:
parent
0eccdbc137
commit
e2aacff7d4
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
#include "portab.h"
|
#include "portab.h"
|
||||||
|
|
||||||
static char UNUSED id[] = "$Id: channel.c,v 1.56 2006/07/24 22:54:09 alex Exp $";
|
static char UNUSED id[] = "$Id: channel.c,v 1.57 2006/08/12 11:58:21 fw Exp $";
|
||||||
|
|
||||||
#include "imp.h"
|
#include "imp.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
@ -214,7 +214,6 @@ Channel_Kick( CLIENT *Client, CLIENT *Origin, char *Name, char *Reason )
|
||||||
assert( Name != NULL );
|
assert( Name != NULL );
|
||||||
assert( Reason != NULL );
|
assert( Reason != NULL );
|
||||||
|
|
||||||
/* Channel suchen */
|
|
||||||
chan = Channel_Search( Name );
|
chan = Channel_Search( Name );
|
||||||
if( ! chan )
|
if( ! chan )
|
||||||
{
|
{
|
||||||
|
@ -661,12 +660,9 @@ Channel_SetTopic(CHANNEL *Chan, CLIENT *Client, char *Topic)
|
||||||
if (len < array_bytes(&Chan->topic))
|
if (len < array_bytes(&Chan->topic))
|
||||||
array_free(&Chan->topic);
|
array_free(&Chan->topic);
|
||||||
|
|
||||||
if (!array_copyb(&Chan->topic, Topic, len))
|
if (len >= COMMAND_LEN || !array_copyb(&Chan->topic, Topic, len+1))
|
||||||
Log(LOG_WARNING, "could not set new Topic \"%s\" on %s: %s",
|
Log(LOG_WARNING, "could not set new Topic \"%s\" on %s: %s",
|
||||||
Topic, Chan->name, strerror(errno));
|
Topic, Chan->name, strerror(errno));
|
||||||
|
|
||||||
array_cat0(&Chan->topic);
|
|
||||||
|
|
||||||
#ifndef STRICT_RFC
|
#ifndef STRICT_RFC
|
||||||
Chan->topic_time = time(NULL);
|
Chan->topic_time = time(NULL);
|
||||||
if (Client != NULL && Client_Type(Client) != CLIENT_SERVER)
|
if (Client != NULL && Client_Type(Client) != CLIENT_SERVER)
|
||||||
|
@ -698,7 +694,7 @@ Channel_SetKey( CHANNEL *Chan, char *Key )
|
||||||
assert( Key != NULL );
|
assert( Key != NULL );
|
||||||
|
|
||||||
strlcpy( Chan->key, Key, sizeof( Chan->key ));
|
strlcpy( Chan->key, Key, sizeof( Chan->key ));
|
||||||
Log( LOG_DEBUG, "Channel %s: Key is now \"%s\".", Chan->name, Chan->key );
|
LogDebug("Channel %s: Key is now \"%s\".", Chan->name, Chan->key );
|
||||||
} /* Channel_SetKey */
|
} /* Channel_SetKey */
|
||||||
|
|
||||||
|
|
||||||
|
@ -708,7 +704,7 @@ Channel_SetMaxUsers( CHANNEL *Chan, long Count )
|
||||||
assert( Chan != NULL );
|
assert( Chan != NULL );
|
||||||
|
|
||||||
Chan->maxusers = Count;
|
Chan->maxusers = Count;
|
||||||
Log( LOG_DEBUG, "Channel %s: Member limit is now %ld.", Chan->name, Chan->maxusers );
|
LogDebug("Channel %s: Member limit is now %lu.", Chan->name, Chan->maxusers );
|
||||||
} /* Channel_SetMaxUsers */
|
} /* Channel_SetMaxUsers */
|
||||||
|
|
||||||
|
|
||||||
|
@ -765,9 +761,7 @@ Channel_Create( char *Name )
|
||||||
c->hash = Hash( c->name );
|
c->hash = Hash( c->name );
|
||||||
c->next = My_Channels;
|
c->next = My_Channels;
|
||||||
My_Channels = c;
|
My_Channels = c;
|
||||||
#ifdef DEBUG
|
LogDebug("Created new channel structure for \"%s\".", Name);
|
||||||
Log( LOG_DEBUG, "Created new channel structure for \"%s\".", Name );
|
|
||||||
#endif
|
|
||||||
return c;
|
return c;
|
||||||
} /* Channel_Create */
|
} /* Channel_Create */
|
||||||
|
|
||||||
|
@ -851,25 +845,42 @@ Remove_Client( int Type, CHANNEL *Chan, CLIENT *Client, CLIENT *Origin, char *Re
|
||||||
switch( Type )
|
switch( Type )
|
||||||
{
|
{
|
||||||
case REMOVE_QUIT:
|
case REMOVE_QUIT:
|
||||||
/* QUIT: andere Server wurden bereits informiert, vgl. Client_Destroy();
|
/* QUIT: other servers have already been notified, see Client_Destroy();
|
||||||
* hier also "nur" noch alle User in betroffenen Channeln infomieren */
|
* so only inform other clients in same channel. */
|
||||||
assert( InformServer == false );
|
assert( InformServer == false );
|
||||||
Log( LOG_DEBUG, "User \"%s\" left channel \"%s\" (%s).", Client_Mask( Client ), c->name, Reason );
|
LogDebug("User \"%s\" left channel \"%s\" (%s).",
|
||||||
|
Client_Mask( Client ), c->name, Reason );
|
||||||
break;
|
break;
|
||||||
case REMOVE_KICK:
|
case REMOVE_KICK:
|
||||||
/* User wurde geKICKed: ggf. andere Server sowie alle betroffenen User
|
/* User was KICKed: inform other servers and all users in channel */
|
||||||
* im entsprechenden Channel informieren */
|
if( InformServer )
|
||||||
if( InformServer ) IRC_WriteStrServersPrefix( Client_NextHop( Origin ), Origin, "KICK %s %s :%s", c->name, Client_ID( Client ), Reason );
|
IRC_WriteStrServersPrefix( Client_NextHop( Origin ),
|
||||||
IRC_WriteStrChannelPrefix( Client, c, Origin, false, "KICK %s %s :%s", c->name, Client_ID( Client ), Reason );
|
Origin, "KICK %s %s :%s", c->name, Client_ID( Client ), Reason);
|
||||||
if(( Client_Conn( Client ) > NONE ) && ( Client_Type( Client ) == CLIENT_USER )) IRC_WriteStrClientPrefix( Client, Origin, "KICK %s %s :%s", c->name, Client_ID( Client ), Reason );
|
IRC_WriteStrChannelPrefix(Client, c, Origin, false, "KICK %s %s :%s",
|
||||||
Log( LOG_DEBUG, "User \"%s\" has been kicked of \"%s\" by \"%s\": %s.", Client_Mask( Client ), c->name, Client_ID( Origin ), Reason );
|
c->name, Client_ID( Client ), Reason );
|
||||||
|
if ((Client_Conn(Client) > NONE) &&
|
||||||
|
(Client_Type(Client) == CLIENT_USER))
|
||||||
|
{
|
||||||
|
IRC_WriteStrClientPrefix(Client, Origin, "KICK %s %s :%s",
|
||||||
|
c->name, Client_ID( Client ), Reason);
|
||||||
|
}
|
||||||
|
LogDebug("User \"%s\" has been kicked of \"%s\" by \"%s\": %s.",
|
||||||
|
Client_Mask( Client ), c->name, Client_ID(Origin), Reason);
|
||||||
break;
|
break;
|
||||||
default:
|
default: /* PART */
|
||||||
/* PART */
|
if (InformServer)
|
||||||
if( InformServer ) IRC_WriteStrServersPrefix( Origin, Client, "PART %s :%s", c->name, Reason );
|
IRC_WriteStrServersPrefix(Origin, Client, "PART %s :%s", c->name, Reason);
|
||||||
IRC_WriteStrChannelPrefix( Origin, c, Client, false, "PART %s :%s", c->name, Reason );
|
|
||||||
if(( Client_Conn( Origin ) > NONE ) && ( Client_Type( Origin ) == CLIENT_USER )) IRC_WriteStrClientPrefix( Origin, Client, "PART %s :%s", c->name, Reason );
|
IRC_WriteStrChannelPrefix(Origin, c, Client, false, "PART %s :%s",
|
||||||
Log( LOG_DEBUG, "User \"%s\" left channel \"%s\" (%s).", Client_Mask( Client ), c->name, Reason );
|
c->name, Reason);
|
||||||
|
|
||||||
|
if ((Client_Conn(Origin) > NONE) &&
|
||||||
|
(Client_Type(Origin) == CLIENT_USER))
|
||||||
|
{
|
||||||
|
IRC_WriteStrClientPrefix( Origin, Client, "PART %s :%s", c->name, Reason);
|
||||||
|
LogDebug("User \"%s\" left channel \"%s\" (%s).",
|
||||||
|
Client_Mask(Client), c->name, Reason);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Wenn Channel nun leer und nicht pre-defined: loeschen */
|
/* Wenn Channel nun leer und nicht pre-defined: loeschen */
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
#include "portab.h"
|
#include "portab.h"
|
||||||
|
|
||||||
static char UNUSED id[] = "$Id: irc-op.c,v 1.15 2005/04/27 07:39:18 alex Exp $";
|
static char UNUSED id[] = "$Id: irc-op.c,v 1.16 2006/08/12 11:58:21 fw Exp $";
|
||||||
|
|
||||||
#include "imp.h"
|
#include "imp.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
@ -101,14 +101,13 @@ IRC_INVITE( CLIENT *Client, REQUEST *Req )
|
||||||
/* If the target user is banned on that channel: remember invite */
|
/* If the target user is banned on that channel: remember invite */
|
||||||
if( Lists_CheckBanned( target, chan )) remember = true;
|
if( Lists_CheckBanned( target, chan )) remember = true;
|
||||||
|
|
||||||
if( remember )
|
if (remember) {
|
||||||
{
|
/* We must remember this invite */
|
||||||
/* We must memember this invite */
|
|
||||||
if( ! Lists_AddInvited( Client_Mask( target ), chan, true)) return CONNECTED;
|
if( ! Lists_AddInvited( Client_Mask( target ), chan, true)) return CONNECTED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Log( LOG_DEBUG, "User \"%s\" invites \"%s\" to \"%s\" ...", Client_Mask( from ), Req->argv[0], Req->argv[1] );
|
LogDebug("User \"%s\" invites \"%s\" to \"%s\" ...", Client_Mask(from), Req->argv[0], Req->argv[1]);
|
||||||
|
|
||||||
/* Inform target client */
|
/* Inform target client */
|
||||||
IRC_WriteStrClientPrefix( target, from, "INVITE %s %s", Req->argv[0], Req->argv[1] );
|
IRC_WriteStrClientPrefix( target, from, "INVITE %s %s", Req->argv[0], Req->argv[1] );
|
||||||
|
|
Loading…
Reference in New Issue