# HG changeset patch # User Mikael Berthe # Date 1163861329 -3600 # Node ID 94d9a3cbb211a84eaf101f9b31499e035045356a # Parent 4c8d7b558e8309beedb550ab0d19985e015477d7 Remove useless message Doing /info was noisy with a server without private storage support. diff -r 4c8d7b558e83 -r 94d9a3cbb211 mcabber/src/commands.c --- a/mcabber/src/commands.c Sat Nov 18 10:44:58 2006 +0100 +++ b/mcabber/src/commands.c Sat Nov 18 15:48:49 2006 +0100 @@ -563,7 +563,7 @@ jb_set_storage_rosternotes(jid, notetxt); g_free(msg); } else { // Display a note - struct annotation *note = jb_get_storage_rosternotes(jid); + struct annotation *note = jb_get_storage_rosternotes(jid, FALSE); if (note) { display_and_free_note(note, jid); } else { @@ -1331,7 +1331,7 @@ if (type == ROSTER_TYPE_USER || type == ROSTER_TYPE_ROOM || type == ROSTER_TYPE_AGENT) { - struct annotation *note = jb_get_storage_rosternotes(jid); + struct annotation *note = jb_get_storage_rosternotes(jid, TRUE); if (note) { // We do not display the note, we just tell the user. g_free(note->text); diff -r 4c8d7b558e83 -r 94d9a3cbb211 mcabber/src/jabglue.c --- a/mcabber/src/jabglue.c Sat Nov 18 10:44:58 2006 +0100 +++ b/mcabber/src/jabglue.c Sat Nov 18 15:48:49 2006 +0100 @@ -1285,10 +1285,11 @@ return sl_notes; } -// jb_get_storage_rosternotes(barejid) +// jb_get_storage_rosternotes(barejid, silent) // Return the annotation associated with this jid. +// If silent is TRUE, no warning is displayed when rosternotes is disabled // The caller should g_free the string and structure after use. -struct annotation *jb_get_storage_rosternotes(const char *barejid) +struct annotation *jb_get_storage_rosternotes(const char *barejid, int silent) { xmlnode x; @@ -1297,8 +1298,9 @@ // If we have no rosternotes, probably the server doesn't support them. if (!rosternotes) { - scr_LogPrint(LPRINT_LOGNORM, - "Sorry, your server doesn't seem to support private storage."); + if (!silent) + scr_LogPrint(LPRINT_LOGNORM, "Sorry, " + "your server doesn't seem to support private storage."); return NULL; } diff -r 4c8d7b558e83 -r 94d9a3cbb211 mcabber/src/jabglue.h --- a/mcabber/src/jabglue.h Sat Nov 18 10:44:58 2006 +0100 +++ b/mcabber/src/jabglue.h Sat Nov 18 15:48:49 2006 +0100 @@ -78,7 +78,7 @@ void jb_set_storage_bookmark(const char *roomid, const char *name, const char *nick, const char *passwd, int autojoin); -struct annotation *jb_get_storage_rosternotes(const char *barejid); +struct annotation *jb_get_storage_rosternotes(const char *barejid, int silent); GSList *jb_get_all_storage_rosternotes(void); void jb_set_storage_rosternotes(const char *barejid, const char *note);