Changeset 5bf5edf


Ignore:
Timestamp:
2008-02-10T21:54:28Z (16 years ago)
Author:
Sven Moritz Hallberg <sm@…>
Branches:
master
Children:
2a2db6f
Parents:
5d62040
Message:

log out all accounts when going into keygen

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • otr.c

    r5d62040 r5bf5edf  
    124124/* show the list of fingerprints associated with a given context */
    125125void show_fingerprints(irc_t *irc, ConnContext *ctx);
     126
     127/* to log out accounts during keygen */
     128extern void cmd_account(irc_t *irc, char **cmd);
    126129
    127130
     
    11221125void otr_keygen(irc_t *irc, const char *handle, const char *protocol)
    11231126{
     1127        char *account_off[] = {"account", "off", NULL};
    11241128        GError *err;
    11251129        GThread *thr;
    11261130        struct kgdata *kg;
    11271131        gint ev;
    1128        
    1129         irc_usermsg(irc, "generating new otr privkey for %s/%s...",
    1130                 handle, protocol);
    11311132       
    11321133        kg = g_new0(struct kgdata, 1);
     
    11671168        }
    11681169
     1170        /* tell the user what's happening, go comatose, and start the keygen */
     1171        irc_usermsg(irc, "going comatose for otr key generation, this will take a moment");
     1172        irc_usermsg(irc, "all accounts logging out, user commands disabled");
     1173        cmd_account(irc, account_off);
     1174        irc_usermsg(irc, "generating new otr privkey for %s/%s...",
     1175                handle, protocol);
     1176       
    11691177        thr = g_thread_create(&otr_keygen_thread_func, kg, FALSE, &err);
    11701178        if(!thr) {
  • root_commands.c

    r5d62040 r5bf5edf  
    136136}
    137137
    138 static void cmd_account( irc_t *irc, char **cmd );
     138void cmd_account( irc_t *irc, char **cmd );
    139139
    140140static void cmd_identify( irc_t *irc, char **cmd )
     
    213213}
    214214
    215 static void cmd_account( irc_t *irc, char **cmd )
     215void cmd_account( irc_t *irc, char **cmd )
    216216{
    217217        account_t *a;
Note: See TracChangeset for help on using the changeset viewer.