updates.
[silc.git] / apps / silc / client_ops.c
index e71e8ac9bc90506aa5777ad1a96b0012a1d7629a..5be53ad958435f60b9e8498cf2d7db084ad25de6 100644 (file)
@@ -102,10 +102,11 @@ void silc_notify(SilcClient client, SilcClientConnection conn,
     break;
 
   case SILC_NOTIFY_TYPE_INVITE:
+    (void)va_arg(vp, SilcChannelEntry);
+    tmp = va_arg(vp, char *);
     client_entry = va_arg(vp, SilcClientEntry);
-    channel_entry = va_arg(vp, SilcChannelEntry);
     snprintf(message, sizeof(message), "%s invites you to channel %s", 
-            client_entry->nickname, channel_entry->channel_name);
+            client_entry->nickname, tmp);
     break;
 
   case SILC_NOTIFY_TYPE_JOIN:
@@ -182,10 +183,15 @@ void silc_notify(SilcClient client, SilcClientConnection conn,
 
   case SILC_NOTIFY_TYPE_CMODE_CHANGE:
     client_entry = va_arg(vp, SilcClientEntry);
-    tmp = silc_client_chmode(va_arg(vp, unsigned int));
+    tmp_int = va_arg(vp, unsigned int);
+    (void)va_arg(vp, char *);
+    (void)va_arg(vp, char *);
     channel_entry = va_arg(vp, SilcChannelEntry);
+    
+    tmp = silc_client_chmode(tmp_int, channel_entry);
+    
     if (tmp)
-      snprintf(message, sizeof(message), "%s changed channel mode to +%s", 
+      snprintf(message, sizeof(message), "%s changed channel mode to +%s",
               client_entry->nickname, tmp);
     else
       snprintf(message, sizeof(message), "%s removed all channel modes", 
@@ -548,6 +554,26 @@ void silc_command_reply(SilcClient client, SilcClientConnection conn,
       }
       break;
 
+    case SILC_COMMAND_INVITE:
+      {
+       SilcChannelEntry channel;
+       char *invite_list;
+
+       if (!success)
+         return;
+       
+       channel = va_arg(vp, SilcChannelEntry);
+       invite_list = va_arg(vp, char *);
+
+       if (invite_list)
+         silc_say(client, conn, "%s invite list: %s", channel->channel_name,
+                  invite_list);
+       else
+         silc_say(client, conn, "%s invite list not set", 
+                  channel->channel_name);
+      }
+      break;
+
     case SILC_COMMAND_JOIN:
       {
        unsigned int mode;
@@ -575,7 +601,8 @@ void silc_command_reply(SilcClient client, SilcClientConnection conn,
          client->ops->say(client, conn, "Topic for %s: %s", 
                           app->screen->bottom_line->channel, topic);
        
-       app->screen->bottom_line->channel_mode = silc_client_chmode(mode);
+       app->screen->bottom_line->channel_mode = 
+         silc_client_chmode(mode, channel);
        silc_screen_print_bottom_line(app->screen, 0);
 
        /* Resolve the client information */
@@ -988,7 +1015,11 @@ int silc_get_auth_method(SilcClient client, SilcClientConnection conn,
     }
   }
 
-  return FALSE;
+  *auth_meth = SILC_AUTH_NONE;
+  *auth_data = NULL;
+  *auth_data_len = 0;
+
+  return TRUE;
 }
 
 /* Notifies application that failure packet was received.  This is called