commit - 258e39e89f494600cf142ba1fd768f2faa285dbf
commit + 71562ebe572d70c9b8e5fd5990001e9e2b149a51
blob - 5caf7d0ce267fa68598cbca60c67414b29b15f03
blob + 937abecc1eb056bd5c32189f2a41312b125f5553
--- src/ngircd/channel.c
+++ src/ngircd/channel.c
GLOBAL CHANNEL *
Channel_Search( const char *Name )
{
- /* Channel-Struktur suchen */
+ /* Search channel structure */
CHANNEL *c;
UINT32 search_hash;
{
if( search_hash == c->hash )
{
- /* lt. Hash-Wert: Treffer! */
+ /* hash hit */
if( strcasecmp( Name, c->name ) == 0 ) return c;
}
c = c->next;
assert( Chan != NULL );
assert( Client != NULL );
- /* neue CL2CHAN-Struktur anlegen */
+ /* Create new CL2CHAN structure */
cl2chan = (CL2CHAN *)malloc( sizeof( CL2CHAN ));
if( ! cl2chan )
{
cl2chan->client = Client;
strcpy( cl2chan->modes, "" );
- /* Verketten */
+ /* concatenate */
cl2chan->next = My_Cl2Chan;
My_Cl2Chan = cl2chan;
c = cl2chan->channel;
assert( c != NULL );
- /* Aus Verkettung loesen und freigeben */
+ /* maintain cl2chan list */
if( last_cl2chan ) last_cl2chan->next = cl2chan->next;
else My_Cl2Chan = cl2chan->next;
free( cl2chan );
}
}
- /* Wenn Channel nun leer und nicht pre-defined: loeschen */
+ /* When channel is empty and is not pre-defined, delete */
if( ! strchr( Channel_Modes( Chan ), 'P' ))
{
if( ! Get_First_Cl2Chan( NULL, Chan )) Delete_Channel( Chan );
static bool
Delete_Channel( CHANNEL *Chan )
{
- /* Channel-Struktur loeschen */
+ /* delete channel structure */
CHANNEL *chan, *last_chan;
Log( LOG_DEBUG, "Freed channel structure for \"%s\".", Chan->name );
- /* Invite- und Ban-Lists aufraeumen */
+ /* free invite and ban lists */
Lists_Free( &chan->list_bans );
Lists_Free( &chan->list_invites );
- /* Neu verketten und freigeben */
+ /* maintain channel list */
if( last_chan ) last_chan->next = chan->next;
else My_Channels = chan->next;
free( chan );