changeset 118:1e8f646e2c5b

[/trunk] Changeset 131 by mikael * Clean up * Fix /status offline * Change (slightly) history log line format
author mikael
date Mon, 25 Apr 2005 19:02:07 +0000
parents e0168cdd9f59
children d7fbd5293385
files mcabber/src/TODO.txt mcabber/src/commands.c mcabber/src/histolog.c mcabber/src/hooks.c mcabber/src/jabglue.c
diffstat 5 files changed, 11 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/mcabber/src/TODO.txt	Mon Apr 25 15:26:17 2005 +0000
+++ b/mcabber/src/TODO.txt	Mon Apr 25 19:02:07 2005 +0000
@@ -3,12 +3,14 @@
 
 * Should not stay on buddy buffer when one moves to a group
 * Pending message not displayed if buddy outside Contact window
+* Current buddy should not be removed from the buddylist
 
 
 TODO:
 
 * Display status
 * show (how?) we can scroll in roster if not all buddies are displayed
+* Get timestamp for offline messages
 
 * Commands! :-)
   - /roster <hide_offline|show_offline|top|bottom>
@@ -33,7 +35,7 @@
 * External commands for events
 * Multi-lines
 * Handle window resize
-* Save history
+* Read history
 * Shortcut to jump to next message received (shift-tab?)
 * File transfer? :)
 * Conferences :))
--- a/mcabber/src/commands.c	Mon Apr 25 15:26:17 2005 +0000
+++ b/mcabber/src/commands.c	Mon Apr 25 19:02:07 2005 +0000
@@ -246,7 +246,6 @@
   else if (!strcmp(arg, "notavail"))  st = notavail;
   else if (!strcmp(arg, "free"))      st = freeforchat;
   else {
-    // XXX TODO no parameter == status request
     scr_LogPrint("Unrecognized parameter!");
     return;
   }
--- a/mcabber/src/histolog.c	Mon Apr 25 15:26:17 2005 +0000
+++ b/mcabber/src/histolog.c	Mon Apr 25 19:02:07 2005 +0000
@@ -77,8 +77,8 @@
   for (p=data ; *p ; p++)
     if (*p == '\n') len++;
 
-  /* Line format: "T I DDDDDDDDDD LLL [data]"
-   * T=Type, I=Info, D=date, LLL=0-padded-len
+  /* Line format: "TI DDDDDDDDDD LLL [data]"
+   * T=Type, I=Info, DDDDDDDDDD=date, LLL=0-padded-len
    *
    * Types:
    * - M message    Info: S (send) R (receive)
@@ -89,7 +89,7 @@
   fp = fopen(filename, "a");
   if (!fp)
     return;
-  fprintf(fp, "%c %c %10u %03d %s\n", type, info, (unsigned int)ts, len, data);
+  fprintf(fp, "%c%c %10u %03d %s\n", type, info, (unsigned int)ts, len, data);
   fclose(fp);
 }
 
--- a/mcabber/src/hooks.c	Mon Apr 25 15:26:17 2005 +0000
+++ b/mcabber/src/hooks.c	Mon Apr 25 19:02:07 2005 +0000
@@ -51,18 +51,14 @@
   hlog_write_status(jid, 0, status);
 }
 
-// XXX Maybe we should get the old status as a parameter and request the
-// current status to jabglue?  Or get both statuses?
 inline void hk_mystatuschange(time_t timestamp,
         enum imstatus old_status, enum imstatus new_status)
 {
   if (old_status == new_status)
     return;
 
-  scr_LogPrint("Your status has changed: [%c>%c]",
+  scr_LogPrint("Your status has changed:  [%c>%c]",
           imstatus2char[old_status], imstatus2char[new_status]);
-  //roster_setstatus(jid, status);
   //hlog_write_status(NULL, 0, status);
-
 }
 
--- a/mcabber/src/jabglue.c	Mon Apr 25 15:26:17 2005 +0000
+++ b/mcabber/src/jabglue.c	Mon Apr 25 19:02:07 2005 +0000
@@ -244,6 +244,10 @@
         xmlnode_put_attrib(x, "type", "invisible");
         break;
 
+    case offline:
+        xmlnode_put_attrib(x, "type", "unavailable");
+        break;
+
     default:
         break;
   }