ayttm-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ayttm-commits] CVS: ayttm/src chat_room.c,1.24,1.25


From: Colin Leroy <address@hidden>
Subject: [Ayttm-commits] CVS: ayttm/src chat_room.c,1.24,1.25
Date: Mon, 13 Jan 2003 07:02:26 -0500

Update of /cvsroot/ayttm/ayttm/src
In directory subversions:/tmp/cvs-serv835/src

Modified Files:
        chat_room.c 
Log Message:
convo_timestamps, service color


Index: chat_room.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/chat_room.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- chat_room.c 13 Jan 2003 11:33:27 -0000      1.24
+++ chat_room.c 13 Jan 2003 12:02:21 -0000      1.25
@@ -637,15 +637,41 @@
 
        if(!strcmp(chat_room->chat_room_account->handle, user))
        {
-               g_snprintf(buff, 2048, "<FONT COLOR=\"#0000FF\"><B>%s: 
</B></FONT>",
-                                  chat_room->chat_room_account->alias);
+               time_t t;
+               struct tm * cur_time;
+               
+               time(&t);
+               cur_time = localtime(&t);
+               if (iGetLocalPref("do_convo_timestamp")) {
+                       g_snprintf(buff, 2048, "<B><FONT 
COLOR=\"#0000FF\">%d:%.2d:%.2d</FONT> <FONT COLOR=\"#0000FF\">%s: </FONT></B>",
+                        cur_time->tm_hour, cur_time->tm_min,
+                        cur_time->tm_sec, chat_room->chat_room_account->alias);
+               } else {
+                       g_snprintf(buff, 2048, "<FONT COLOR=\"#FF0000\"><B>%s: 
</B></FONT>", chat_room->chat_room_account->alias);
+               }
        }
        else
        {
                GList *walk;
                eb_account *acc = NULL;
-               g_snprintf(buff, 2048, "<FONT COLOR=\"#FF0000\"><B>%s: 
</B></FONT>",
-                                  user);
+               gchar * color;
+               time_t t;
+               struct tm * cur_time;
+               
+               if (RUN_SERVICE(chat_room->chat_room_account)->get_color)
+                       color = 
RUN_SERVICE(chat_room->chat_room_account)->get_color();
+               else 
+                       color = "#ff0000";
+
+               time(&t);
+               cur_time = localtime(&t);
+               if (iGetLocalPref("do_convo_timestamp")) {
+                       g_snprintf(buff, 2048, "<B><FONT 
COLOR=\"#ff0000\">%d:%.2d:%.2d</FONT> <FONT COLOR=\"%s\">%s: </FONT></B>",
+                        cur_time->tm_hour, cur_time->tm_min,
+                        cur_time->tm_sec, color, user);
+               } else {
+                       g_snprintf(buff, 2048, "<FONT COLOR=\"#FF0000\"><B>%s: 
</B></FONT>", user);
+               }
                for (walk = chat_room->typing_fellows; walk && walk->data; walk 
= walk->next) {
                        acc = walk->data;
                        if (!strcmp(acc->handle, user)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]