Meiner auch, aber er ist sogar schon getestet, mit Abfangroutinen und höchst flexibel.
Anbei mal ein Beispielplugin, mit dem man ein Messageex auslöst. Geht gut.
Code:
/* Black Knight's automatischer Zeilenumbruch */
#include <core> 
#include <console> 
#include <string> 
#include <admin> 
#include <adminlib>
/* Splits string at a specific position */
strnsplit(str[],first[],second[],n) {
	new i;
	new maxlen=strlen(str);
	new m=n+1;
	for(i=0; i<=n; i++){
		first[i]=str[i];
	}
	first[n+1]=NULL_CHAR;
	for(i=m;i<=maxlen;i++){ 
		second[i-m]=str[i];
	}
	second[maxlen+1]=NULL_CHAR;
	return 1;
}
/* Looks for the first occurence of "search" and splits string there */
strbreak2(str[], first[], second[], maxlen, search[], number) {
	new i = 0;
	new NullPos = CHAR_INVALID;
	new Quote = FALSE;
	new SpacePos = CHAR_INVALID;
	new merk=0;
	if (maxlen == 0){
		maxlen = strlen(str);
	}
			
	for(i=0; i<maxlen; i++) {
		if (str[i] == QUOTE_CHAR) {
			if (Quote==FALSE) {
				Quote = TRUE;
			}
			else {
				Quote = FALSE;
			}
		}
		else if (str[i] == search[0] && Quote == FALSE) {
			merk++;
			if (merk==number) {
				SpacePos = i;
			}
		}
		else if (str[i] == NULL_CHAR) {
			NullPos = i;
			break;
		}	
	}
	
	if (SpacePos == CHAR_INVALID) {
		strcpy(first, str, maxlen);
		strinit(second);
	}
	else {
		if (NullPos == CHAR_INVALID) {
			NullPos = maxlen + 1;
		}
		for(i=0; i<SpacePos; i++) { 
			first[i] = str[i];
		}
		first[SpacePos] = NULL_CHAR;
		for(i=SpacePos+1; i<NullPos;i++) {
			second[i - SpacePos - 1] = str[i];
		}
		second[NullPos - SpacePos - 1] = NULL_CHAR;
	}
	
	/* Strip out the quotes of the return values. */
	return 1;
}
umbrechen(sString[],Result[],Laenge){
	new Umbruch[3]="^n";
	new PruefString[MAX_DATA_LENGTH];
	new RestString[MAX_DATA_LENGTH];
	new Found[MAX_DATA_LENGTH];
	new NrUmbruch=0;
	new Nummer;
	strinit(Result);
	while(strlen(sString) > Laenge){ 
		strnsplit(sString,PruefString,RestString,Laenge);
		Nummer=strcount(PruefString,' ');
		if(Nummer==0){
			strcpy(Found,PruefString,MAX_DATA_LENGTH);
			strcpy(sString,RestString,MAX_DATA_LENGTH);
		}
		else{
			strbreak2(sString,Found,sString,MAX_DATA_LENGTH," ",Nummer);
		}
		strcat(Result,Found,MAX_DATA_LENGTH);
		strcat(Result,Umbruch,MAX_DATA_LENGTH);
		NrUmbruch++; 
	} 
	strcat(Result,sString,MAX_DATA_LENGTH);
	return NrUmbruch;
}
public messageme(HLCommand,HLData,HLUserName,UserIndex){
	new Msg[MAX_DATA_LENGTH];
	new Msg2[MAX_DATA_LENGTH];
	new Name[MAX_NAME_LENGTH];
	convert_string(HLData,Msg,MAX_DATA_LENGTH);
	convert_string(HLUserName,Name,MAX_NAME_LENGTH);
	umbrechen(Msg,Msg2,78);
	messageex(Name,Msg2,print_tty);
	return PLUGIN_HANDLED;
}
public plugin_init(){
	new STRING_VERSION[MAX_DATA_LENGTH] = "1.0";
	plugin_registerinfo("Umbrechen Testplugin","Testplugin fuer Umbruch",STRING_VERSION);
	plugin_registercmd("admin_msg","messageme",ACCESS_ALL,"Prints message");
	return PLUGIN_CONTINUE; 
}
Rinde, bist Du Dir sicher, dass "^n" nur 1 Zeichen ist? Ich sehe es in den Logs immer ausgeschrieben (z.B. bei Csay). Daher habe ich vermutet, dass erst die HL-Ausgabe daraus ein Steuerzeichen macht. Wenn dem nicht so ist, kann ich meine Routine natürlich massiv vereinfachen. Den ganzen Splitkram habe ich nur wegen der 2 Zeichen gemacht. Letzlich käme ich dann auf eine ähnliche integrierte Funktion wie Du.
Kannst du mal Deine Funktion testen?
 
					
																_________________
Der schwarze Ritter triumphiert immer...
WING-Clan