commit - 6e9ec92974d7f142e31c139c779e6cfe00a7d33f
commit + f53914b17a97e09266025a0d54900ea3e6b0dd58
blob - 028aecb1fdc61e5f899ccdb55c324b535547b1ee
blob + 6b9fb69b4d50bc1d04b7cad47384a67b9e05bc16
--- src/ngircd/channel.c
+++ src/ngircd/channel.c
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
* der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
*
- * $Id: channel.c,v 1.11 2002/01/29 00:11:10 alex Exp $
+ * $Id: channel.c,v 1.12 2002/02/06 16:48:48 alex Exp $
*
* channel.c: Management der Channels
*
* $Log: channel.c,v $
+ * Revision 1.12 2002/02/06 16:48:48 alex
+ * - neue Funktion Channel_Modes() und Channel_IsValidName().
+ * - Channel-Namen werden (besser) validiert.
+ *
* Revision 1.11 2002/01/29 00:11:10 alex
* - neue Funktionen Channel_FirstChannelOf() und Channel_NextChannelOf().
*
assert( Name != NULL );
/* Valider Channel-Name? */
- if(( Name[0] != '#' ) || ( strlen( Name ) >= CHANNEL_NAME_LEN ))
+ if( ! Channel_IsValidName( Name ))
{
IRC_WriteStrClient( Client, ERR_NOSUCHCHANNEL_MSG, Client_ID( Client ), Name );
return FALSE;
assert( Chan != NULL );
return Chan->name;
} /* Channel_Name */
+
+
+GLOBAL CHAR *Channel_Modes( CHANNEL *Chan )
+{
+ assert( Chan != NULL );
+ return Chan->modes;
+} /* Channel_Modes */
GLOBAL CHANNEL *Channel_First( VOID )
} /* Channel_GetChannel */
+GLOBAL BOOLEAN Channel_IsValidName( CHAR *Name )
+{
+ /* PrŸfen, ob Name als Channelname gueltig */
+
+ assert( Name != NULL );
+
+ if(( Name[0] != '#' ) || ( strlen( Name ) >= CHANNEL_NAME_LEN )) return FALSE;
+ return TRUE;
+} /* Channel_IsValidName */
+
+
LOCAL CHANNEL *New_Chan( CHAR *Name )
{
/* Neue Channel-Struktur anlegen */