Changeset 7320610


Ignore:
Timestamp:
2015-03-10T07:33:54Z (10 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
afbad28
Parents:
8b91a1f
git-author:
dequis <dx@…> (07-03-15 04:10:59)
git-committer:
dequis <dx@…> (10-03-15 07:33:54)
Message:

Various user experience/error reporting improvements

  • Show version as part of the initial message of &bitlbee
  • Use g_strerror() to show actual errors when saving xml configs
  • Only show "The nick is (probably) not registered" for ENOENT, use g_strerror() for the rest of OS errors when loading xml configs
  • Show "Protocol not found: <name>" when find_protocol() returns null, useful when the user uninstalls a plugin accidentally.
  • Suggest the user to check the system clock when getting error 401 from the twitter stream (other REST endpoints show a better error message)
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • irc.c

    r8b91a1f r7320610  
    764764                        irc_rootmsg(irc,
    765765                                    "Welcome to the BitlBee gateway!\n\n"
     766                                    "Running %s %s\n\n"
    766767                                    "If you've never used BitlBee before, please do read the help "
    767768                                    "information using the \x02help\x02 command. Lots of FAQs are "
    768769                                    "answered there.\n"
    769770                                    "If you already have an account on this server, just use the "
    770                                     "\x02identify\x02 command to identify yourself.");
     771                                    "\x02identify\x02 command to identify yourself.",
     772                                    PACKAGE, BITLBEE_VERSION);
    771773
    772774                        /* This is for bug #209 (use PASS to identify to NickServ). */
  • protocols/twitter/twitter_lib.c

    r8b91a1f r7320610  
    862862
    863863                imcb_error(ic, "Stream closed (%s)", req->status_string);
     864                if (req->status_code == 401) {
     865                        imcb_error(ic, "Check your system clock.");
     866                }
    864867                imc_logout(ic, TRUE);
    865868                return;
  • storage_xml.c

    r8b91a1f r7320610  
    103103        if (protocol) {
    104104                prpl = find_protocol(protocol);
     105                if (!prpl) {
     106                        irc_rootmsg(xd->irc, "Error loading user config: Protocol not found: `%s'", protocol);
     107                        return XT_ABORT;
     108                }
    105109                local = protocol_account_islocal(protocol);
    106110        }
     
    197201        fn = g_strconcat(global.conf->configdir, xd->given_nick, ".xml", NULL);
    198202        if ((fd = open(fn, O_RDONLY)) < 0) {
    199                 ret = STORAGE_NO_SUCH_USER;
     203                if (errno == ENOENT) {
     204                        ret = STORAGE_NO_SUCH_USER;
     205                } else {
     206                        irc_rootmsg(irc, "Error loading user config: %s", g_strerror(errno));
     207                }
    200208                goto error;
    201209        }
     
    377385        strcat(path, ".XXXXXX");
    378386        if ((fd = mkstemp(path)) < 0) {
    379                 irc_rootmsg(irc, "Error while opening configuration file.");
    380                 return STORAGE_OTHER_ERROR;
     387                goto error;
    381388        }
    382389
     
    400407
    401408error:
    402         irc_rootmsg(irc, "Write error. Disk full?");
     409        irc_rootmsg(irc, "Write error: %s", g_strerror(errno));
    403410        ret = STORAGE_OTHER_ERROR;
    404411
Note: See TracChangeset for help on using the changeset viewer.