src/conversation.c

changeset 2138
e829e961b154
parent 2124
7b91bd0ce3ef
child 2139
6e5f9b77a190
equal deleted inserted replaced
2137:b0c18ea1dee8 2138:e829e961b154
161 } 161 }
162 162
163 163
164 struct conversation *find_conversation(char *name) 164 struct conversation *find_conversation(char *name)
165 { 165 {
166 char *cuser = g_malloc(64); 166 char *cuser = g_malloc(1024);
167 struct conversation *c; 167 struct conversation *c;
168 GList *cnv = conversations; 168 GList *cnv = conversations;
169 169
170 strcpy(cuser, normalize(name)); 170 strcpy(cuser, normalize(name));
171 171
205 } 205 }
206 } 206 }
207 207
208 struct log_conversation *find_log_info(char *name) 208 struct log_conversation *find_log_info(char *name)
209 { 209 {
210 char *pname = g_malloc(64); 210 char *pname = g_malloc(1024);
211 GList *lc = log_conversations; 211 GList *lc = log_conversations;
212 struct log_conversation *l; 212 struct log_conversation *l;
213 213
214 214
215 strcpy(pname, normalize(name)); 215 strcpy(pname, normalize(name));
1393 1393
1394 } else { 1394 } else {
1395 if (flags & WFLAG_WHISPER) { 1395 if (flags & WFLAG_WHISPER) {
1396 /* if we're whispering, it's not an autoresponse */ 1396 /* if we're whispering, it's not an autoresponse */
1397 if (meify(what)) { 1397 if (meify(what)) {
1398 str = g_malloc(64); 1398 str = g_malloc(1024);
1399 g_snprintf(str, 62, "***%s", who); 1399 g_snprintf(str, 1024, "***%s", who);
1400 strcpy(colour, "#6C2585\0"); 1400 strcpy(colour, "#6C2585\0");
1401 } else { 1401 } else {
1402 str = g_malloc(64); 1402 str = g_malloc(1024);
1403 g_snprintf(str, 62, "*%s*:", who); 1403 g_snprintf(str, 1024, "*%s*:", who);
1404 strcpy(colour, "#00ff00\0"); 1404 strcpy(colour, "#00ff00\0");
1405 } 1405 }
1406 } else { 1406 } else {
1407 if (meify(what)) { 1407 if (meify(what)) {
1408 str = g_malloc(64); 1408 str = g_malloc(1024);
1409 if (flags & WFLAG_AUTO) 1409 if (flags & WFLAG_AUTO)
1410 g_snprintf(str, 62, "%s ***%s", AUTO_RESPONSE, who); 1410 g_snprintf(str, 1024, "%s ***%s", AUTO_RESPONSE, who);
1411 else 1411 else
1412 g_snprintf(str, 62, "***%s", who); 1412 g_snprintf(str, 1024, "***%s", who);
1413 strcpy(colour, "#062585\0"); 1413 strcpy(colour, "#062585\0");
1414 } else { 1414 } else {
1415 str = g_malloc(64); 1415 str = g_malloc(1024);
1416 if (flags & WFLAG_AUTO) 1416 if (flags & WFLAG_AUTO)
1417 g_snprintf(str, 62, "%s %s", who, AUTO_RESPONSE); 1417 g_snprintf(str, 1024, "%s %s", who, AUTO_RESPONSE);
1418 else 1418 else
1419 g_snprintf(str, 62, "%s:", who); 1419 g_snprintf(str, 1024, "%s:", who);
1420 if (flags & WFLAG_RECV) 1420 if (flags & WFLAG_RECV)
1421 strcpy(colour, "#ff0000"); 1421 strcpy(colour, "#ff0000");
1422 else if (flags & WFLAG_SEND) 1422 else if (flags & WFLAG_SEND)
1423 strcpy(colour, "#0000ff"); 1423 strcpy(colour, "#0000ff");
1424 } 1424 }

mercurial