[prev in list] [next in list] [prev in thread] [next in thread] 

List:       silc-devel
Subject:    silc-client cmode-a issues
From:       nh <nhwith () bonbon ! net>
Date:       2006-07-26 3:45:19
Message-ID: 44C6E54F.1010403 () bonbon ! net
[Download RAW message or body]

hello,

silc-client-1.0.3-autochanpw.patch
i had some problems with using of 'channel add -auto' for channel which 
got password (+a), password is saved in silc.conf, but after connect it 
just wrote incorrect pw

silc-client-1.0.3-reconchanpw.patch
same thing goes for state of reconnecting, but there it's more 
problematic. i'm not sure if client is able to get that +a password from 
channel (IRC-like way). when JOIN is send to server password gets kinda 
lost, so you cant get it later (reply_command, after then channel_rec is 
created). so second patch makes changes in function 
silc_server_get_channels which is called when server state is being 
saved (in sig_server_reconnect_save_status). it uses channel setup data, 
so when user got defined channel on same chatnet with defined password 
it's added there.

just fast 'fixes', there is space for more code (keys options etc).

regards

["silc-client-1.0.3-reconchanpw.patch" (text/plain)]

--- silc-client-1.0.3_old/apps/irssi/src/silc/core/silc-servers.c	2006-07-26 04:25:42.000000000 +0200
+++ silc-client-1.0.3_new/apps/irssi/src/silc/core/silc-servers.c	2006-07-26 05:31:08.000000000 +0200
@@ -33,6 +33,7 @@
 #include "settings.h"
 
 #include "servers-setup.h"
+#include "channels-setup.h"
 
 #include "client_ops.h"
 #include "silc-servers.h"
@@ -399,8 +400,14 @@
   chans = g_string_new(NULL);
   for (tmp = server->channels; tmp != NULL; tmp = tmp->next) {
     CHANNEL_REC *channel = tmp->data;
-
-    g_string_sprintfa(chans, "%s,", channel->name);
+    CHANNEL_SETUP_REC *setup_rec;
+    
+    if ((setup_rec = channel_setup_find(channel->name, server->tag)) &&
+        setup_rec->password) 
+      g_string_sprintfa(chans, "%s %s,", channel->name, 
+                        setup_rec->password);
+    else
+      g_string_sprintfa(chans, "%s,", channel->name);
   }
 
   if (chans->len > 0)

["silc-client-1.0.3-autochanpw.patch" (text/plain)]

--- silc-client-1.0.3_old/apps/irssi/src/core/channels.c	2006-07-26 04:25:42.000000000 +0200
+++ silc-client-1.0.3_new/apps/irssi/src/core/channels.c	2006-07-26 04:40:43.000000000 +0200
@@ -204,8 +204,12 @@
 
 		/* check that we haven't already joined this channel in
 		   same chat network connection.. */
-                if (channel_find_servers(chatnet_servers, rec->name) == NULL)
-			g_string_sprintfa(chans, "%s,", rec->name);
+                if (channel_find_servers(chatnet_servers, rec->name) == NULL) 
+			if (rec->password)
+				g_string_sprintfa(chans, "%s %s,", rec->name, 
+						  rec->password);
+			else
+				g_string_sprintfa(chans, "%s,", rec->name);
 	}
         g_slist_free(chatnet_servers);
 


_______________________________________________________________________
Info:    https://lists.silcnet.org/mailman/listinfo/silc-announce
Archive: https://lists.silcnet.org/pipermail/silc-announce
FAQ:     http://silcnet.org/support/faq/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic