[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ayttm-commits] CVS: ayttm/modules/yahoo2 yahoo.c,1.41,1.42
From: |
Philip S Tellis <address@hidden> |
Subject: |
[Ayttm-commits] CVS: ayttm/modules/yahoo2 yahoo.c,1.41,1.42 |
Date: |
Tue, 11 Feb 2003 01:22:04 -0500 |
Update of /cvsroot/ayttm/ayttm/modules/yahoo2
In directory subversions:/tmp/cvs-serv15508/modules/yahoo2
Modified Files:
yahoo.c
Log Message:
added add_dummy_contact to chat with buddies not on your contact list
Index: yahoo.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/yahoo2/yahoo.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- yahoo.c 7 Feb 2003 05:24:03 -0000 1.41
+++ yahoo.c 11 Feb 2003 06:21:59 -0000 1.42
@@ -446,7 +446,7 @@
return NULL;
}
-static void eb_yahoo_decode_yahoo_colors(char *buffer, char *msg)
+static void eb_yahoo_decode_yahoo_colors(char *buffer, const char *msg)
{
char *yahoo_colors[] =
{
@@ -521,7 +521,7 @@
yahoo_colors[color_index]) -
1);
if ( ! color_index ) {
char *tbuf = buffer + strlen(buffer);
- char *tmsg = msg + string_index;
+ const char *tmsg = msg + string_index;
for( ; *tmsg != 'm' ; string_index ++ ) {
* tbuf++ = * tmsg++;
@@ -758,42 +758,32 @@
if(utf8)
umsg = y_utf8_to_str(msg);
+ sender = find_account_by_handle(who, SERVICE_INFO.protocol_id);
+ if (sender == NULL) {
+ sender = eb_yahoo_new_account(who);
+ add_dummy_contact(who, sender);
+ }
+ receiver = yahoo_find_local_account_by_id(id);
+
if(tm) {
char newmessage[2048];
- char timestr[2048];
+ char timestr[256];
strncpy(timestr, ctime(&tm), sizeof(timestr));
timestr[strlen(timestr) - 1] = '\0';
- sprintf(newmessage, _("<FONT COLOR=\"#0000FF\">[Offline
message at %s]</FONT><BR>%s"), timestr, umsg);
+ snprintf(newmessage, sizeof(newmessage), _("<FONT
COLOR=\"#0000FF\">[Offline message at %s]</FONT><BR>%s"), timestr, umsg);
- sender = find_account_by_handle(who,
SERVICE_INFO.protocol_id);
- if (sender == NULL) {
- sender = eb_yahoo_new_account(who);
- add_unknown(sender);
- update_contact_list();
- }
- receiver = yahoo_find_local_account_by_id(id);
- eb_yahoo_decode_yahoo_colors(buff, newmessage);
- eb_parse_incoming_message(receiver, sender, buff);
LOG(("<incoming offline message: %s: %s>", who, umsg));
+ eb_yahoo_decode_yahoo_colors(buff, newmessage);
} else {
- sender = find_account_by_handle(who,
SERVICE_INFO.protocol_id);
-
- if (sender == NULL) {
- sender = eb_yahoo_new_account(who);
- add_unknown(sender);
- yahoo_refresh(id);
- update_contact_list();
- }
- receiver = yahoo_find_local_account_by_id(id);
LOG(("<incoming message: %s: %s>", who, umsg));
eb_yahoo_decode_yahoo_colors(buff, umsg);
- eb_parse_incoming_message(receiver, sender, buff);
}
+ eb_parse_incoming_message(receiver, sender, buff);
if(utf8)
FREE(umsg);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Ayttm-commits] CVS: ayttm/modules/yahoo2 yahoo.c,1.41,1.42,
Philip S Tellis <address@hidden> <=
- Prev by Date:
[Ayttm-commits] CVS: ayttm ChangeLog,1.288,1.289 configure.in,1.284,1.285
- Next by Date:
[Ayttm-commits] CVS: ayttm/src chat_window.c,1.48,1.49 main.c,1.21,1.22 util.c,1.45,1.46 util.h,1.24,1.25
- Previous by thread:
[Ayttm-commits] CVS: ayttm ChangeLog,1.288,1.289 configure.in,1.284,1.285
- Next by thread:
[Ayttm-commits] CVS: ayttm/src chat_window.c,1.48,1.49 main.c,1.21,1.22 util.c,1.45,1.46 util.h,1.24,1.25
- Index(es):