+ 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 ), Req->argv[0] );
+
+ /* Text senden */