Merge Irssi 0.8.16-rc1
[silc.git] / apps / irssi / src / core / channels-setup.c
index ac9b1c23eb5c7ccd0b1695631cc126c9ef9f114a..9e2908a82be23678b9724049bf5eeb8ab3f3fe31 100644 (file)
@@ -13,9 +13,9 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.
 
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+    You should have received a copy of the GNU General Public License along
+    with this program; if not, write to the Free Software Foundation, Inc.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
 
 #include "module.h"
@@ -38,7 +38,7 @@ static void channel_setup_save(CHANNEL_SETUP_REC *channel)
        index = g_slist_index(setupchannels, channel);
 
        parentnode = iconfig_node_traverse("(channels", TRUE);
-       node = config_node_index(parentnode, index);
+       node = config_node_nth(parentnode, index);
        if (node == NULL)
                node = config_node_section(parentnode, NULL, NODE_TYPE_BLOCK);
 
@@ -54,6 +54,8 @@ static void channel_setup_save(CHANNEL_SETUP_REC *channel)
 
 void channel_setup_create(CHANNEL_SETUP_REC *channel)
 {
+       channel->type = module_get_uniq_id("CHANNEL SETUP", 0);
+
        if (g_slist_find(setupchannels, channel) == NULL)
                setupchannels = g_slist_append(setupchannels, channel);
        channel_setup_save(channel);