comparison mcabber/src/screen.c @ 276:627925d885de

Limit the number of lines in multi-line messages
author Mikael Berthe <mikael@lilotux.net>
date Mon, 04 Jul 2005 12:55:54 +0100
parents 3c07026f1b47
children f5dd437c057b
comparison
equal deleted inserted replaced
275:0770da258c05 276:627925d885de
1165 scr_LogPrint("Your multi-line message is too big, this line has " 1165 scr_LogPrint("Your multi-line message is too big, this line has "
1166 "not been added."); 1166 "not been added.");
1167 scr_LogPrint("Please send this part now..."); 1167 scr_LogPrint("Please send this part now...");
1168 return; 1168 return;
1169 } 1169 }
1170 if (num >= MULTILINE_MAX_LINE_NUMBER) {
1171 // We don't allow too many lines; however the maximum is arbitrary
1172 // (It should be < 1000 yet)
1173 scr_LogPrint("Your message has too many lines, this one has "
1174 "not been added.");
1175 scr_LogPrint("Please send this part now...");
1176 return;
1177 }
1170 multiline = g_renew(char, multiline, len); 1178 multiline = g_renew(char, multiline, len);
1171 strcat(multiline, "\n"); 1179 strcat(multiline, "\n");
1172 strcat(multiline, line); 1180 strcat(multiline, line);
1173 num++; 1181 num++;
1174 } else { 1182 } else {