~ubuntu-branches/ubuntu/oneiric/irssi/oneiric

« back to all changes in this revision

Viewing changes to src/core/session.c

  • Committer: Bazaar Package Importer
  • Author(s): Andres Rodriguez
  • Date: 2009-05-05 15:50:50 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090505155050-aoqlnpes7che9rtd
Tags: 0.8.13-1ubuntu1
* Merge from debian unstable (LP: #372411), remaining changes:
  - debian/patches: 03firsttimer_text
    + Adapt it so it tells you about connecting to irc.ubuntu.com and
      joining #ubuntu instead of irc.debian.org and #debian.
  - debian/patches: 90irc-ubuntu-com
* Fixed debian/patches/90irc-ubuntu-com for new irssi.conf.

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
static void session_save_nick(CHANNEL_REC *channel, NICK_REC *nick,
92
92
                              CONFIG_REC *config, CONFIG_NODE *node)
93
93
{
94
 
        static char other[2];
95
94
        node = config_node_section(node, NULL, NODE_TYPE_BLOCK);
96
95
 
97
96
        config_node_set_str(config, node, "nick", nick->nick);
98
97
        config_node_set_bool(config, node, "op", nick->op);
99
98
        config_node_set_bool(config, node, "halfop", nick->halfop);
100
99
        config_node_set_bool(config, node, "voice", nick->voice);
101
 
        
102
 
        other[0] = nick->other;
103
 
        other[1] = '\0';
104
 
        config_node_set_str(config, node, "other", other);
 
100
 
 
101
        config_node_set_str(config, node, "prefixes", nick->prefixes);
105
102
 
106
103
        signal_emit("session save nick", 4, channel, nick, config, node);
107
104
}
265
262
                conn->connect_handle = g_io_channel_unix_new(handle);
266
263
 
267
264
                server = proto->server_init_connect(conn);
268
 
                server->version = g_strdup(config_node_get_str(node, "version", NULL));         
 
265
                server->version = g_strdup(config_node_get_str(node, "version", NULL));
269
266
                server->session_reconnect = TRUE;
270
267
                signal_emit("session restore server", 2, server, node);
271
268
 
287
284
        /* save pids */
288
285
        str = g_string_new(NULL);
289
286
        for (tmp = pidwait_get_pids(); tmp != NULL; tmp = tmp->next)
290
 
                g_string_sprintfa(str, "%d ", GPOINTER_TO_INT(tmp->data));
 
287
                g_string_append_printf(str, "%d ", GPOINTER_TO_INT(tmp->data));
291
288
        config_node_set_str(config, config->mainnode, "pids", str->str);
292
289
        g_string_free(str, TRUE);
293
290
}
329
326
        config_close(session);
330
327
 
331
328
        unlink(session_file);
332
 
        session_file = NULL;
333
329
}
334
330
 
335
331
void session_register_options(void)
336
332
{
337
 
        static struct poptOption options[] = {
338
 
                { "session", 0, POPT_ARG_STRING | POPT_ARGFLAG_DOC_HIDDEN, &session_file, 0, "Used by /UPGRADE command", "PATH" },
339
 
                { NULL, '\0', 0, NULL }
 
333
        static GOptionEntry options[] = {
 
334
                { "session", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_STRING, &session_file, "Used by /UPGRADE command", "PATH" },
 
335
                { NULL }
340
336
        };
341
337
 
342
338
        session_file = NULL;