+ strlcpy( Chan->topic, Topic, sizeof( Chan->topic ));
+} /* Channel_SetTopic */
+
+
+GLOBAL VOID
+Channel_SetModes( CHANNEL *Chan, CHAR *Modes )
+{
+ assert( Chan != NULL );
+ assert( Modes != NULL );
+
+ strlcpy( Chan->modes, Modes, sizeof( Chan->modes ));
+} /* Channel_SetModes */
+
+
+GLOBAL VOID
+Channel_SetKey( CHANNEL *Chan, CHAR *Key )
+{
+ assert( Chan != NULL );
+ assert( Key != NULL );
+
+ strlcpy( Chan->key, Key, sizeof( Chan->key ));
+ Log( LOG_DEBUG, "Channel %s: Key is now \"%s\".", Chan->name, Chan->key );
+} /* Channel_SetKey */
+
+
+GLOBAL VOID
+Channel_SetMaxUsers( CHANNEL *Chan, LONG Count )
+{
+ assert( Chan != NULL );
+
+ Chan->maxusers = Count;
+ Log( LOG_DEBUG, "Channel %s: Member limit is now %ld.", Chan->name, Chan->maxusers );
+} /* Channel_SetMaxUsers */
+
+
+GLOBAL BOOLEAN
+Channel_Write( CHANNEL *Chan, CLIENT *From, CLIENT *Client, CHAR *Text )
+{
+ BOOLEAN is_member, has_voice, is_op, ok;
+
+ /* Okay, Ziel ist ein Channel */
+ is_member = has_voice = is_op = FALSE;
+ if( Channel_IsMemberOf( Chan, From ))
+ {
+ is_member = TRUE;
+ if( strchr( Channel_UserModes( Chan, From ), 'v' )) has_voice = TRUE;
+ if( strchr( Channel_UserModes( Chan, From ), 'o' )) is_op = TRUE;
+ }
+
+ /* pruefen, ob Client in Channel schreiben darf */
+ ok = TRUE;
+ if( strchr( Channel_Modes( Chan ), 'n' ) && ( ! is_member )) ok = FALSE;
+ if( strchr( Channel_Modes( Chan ), 'm' ) && ( ! is_op ) && ( ! has_voice )) ok = FALSE;
+
+ if( ! ok ) return IRC_WriteStrClient( From, ERR_CANNOTSENDTOCHAN_MSG, Client_ID( From ), Channel_Name( Chan ));
+
+ /* Text senden */
+ if( Client_Conn( From ) > NONE ) Conn_UpdateIdle( Client_Conn( From ));
+ return IRC_WriteStrChannelPrefix( Client, Chan, From, TRUE, "PRIVMSG %s :%s", Channel_Name( Chan ), Text );
+} /* Channel_Write */
+
+
+GLOBAL CHANNEL *
+Channel_Create( CHAR *Name )
+{
+ /* Neue Channel-Struktur anlegen */
+