Compilation warning fix.
authorPekka Riikonen <priikone@silcnet.org>
Sat, 16 Nov 2002 11:15:47 +0000 (11:15 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sat, 16 Nov 2002 11:15:47 +0000 (11:15 +0000)
apps/irssi/src/silc/core/client_ops.c
apps/irssi/src/silc/core/silc-queries.c

index e20179041af060a475325077a8b70d1509bfd4a2..db9718e85e0d30038ce9a72e504e78c229bf725a 100644 (file)
@@ -33,6 +33,7 @@
 #include "signals.h"
 #include "levels.h"
 #include "settings.h"
+#include "ignore.h"
 #include "fe-common/core/printtext.h"
 #include "fe-common/core/fe-channels.h"
 #include "fe-common/core/keyboard.h"
@@ -88,40 +89,39 @@ silc_print_nick_change_channel(SILC_SERVER_REC *server, const char *channel,
                              const char *newnick, const char *oldnick,
                              const char *address)
 {
-    if (ignore_check(server, oldnick, address,
-                    channel, newnick, MSGLEVEL_NICKS))
-       return;
-
-    printformat_module("fe-common/silc", server, channel, MSGLEVEL_NICKS,
-               SILCTXT_CHANNEL_APPEARS,
-               oldnick, newnick, channel, address);
+  if (ignore_check(SERVER(server), oldnick, address,
+                  channel, newnick, MSGLEVEL_NICKS))
+    return;
+  
+  printformat_module("fe-common/silc", server, channel, MSGLEVEL_NICKS,
+                    SILCTXT_CHANNEL_APPEARS,
+                    oldnick, newnick, channel, address);
 }
 
 static void
 silc_print_nick_change(SILC_SERVER_REC *server, const char *newnick,
                       const char *oldnick, const char *address)
 {
-    GSList *tmp, *windows;
+  GSList *tmp, *windows;
 
-    /* Print to each channel/query where the nick is.
-       Don't print more than once to the same window. */
-    windows = NULL;
+  /* Print to each channel/query where the nick is.
+     Don't print more than once to the same window. */
+  windows = NULL;
     
-    for (tmp = server->channels; tmp != NULL; tmp = tmp->next) {
-       CHANNEL_REC *channel = tmp->data;
-       WINDOW_REC *window = window_item_window((WI_ITEM_REC *) channel);
-
-       if (nicklist_find(channel, newnick) == NULL ||
-           g_slist_find(windows, window) != NULL)
-           continue;
+  for (tmp = server->channels; tmp != NULL; tmp = tmp->next) {
+    CHANNEL_REC *channel = tmp->data;
+    WINDOW_REC *window = window_item_window((WI_ITEM_REC *) channel);
 
-       windows = g_slist_append(windows, window);
-       silc_print_nick_change_channel(server, channel->visible_name,
-                                      newnick, oldnick, address);
-    }
+    if (nicklist_find(channel, newnick) == NULL ||
+       g_slist_find(windows, window) != NULL)
+      continue;
 
-    g_slist_free(windows);
+    windows = g_slist_append(windows, window);
+    silc_print_nick_change_channel(server, channel->visible_name,
+                                  newnick, oldnick, address);
+  }
 
+  g_slist_free(windows);
 }
 
 void silc_say(SilcClient client, SilcClientConnection conn,
@@ -1388,20 +1388,20 @@ silc_command_reply(SilcClient client, SilcClientConnection conn,
   case SILC_COMMAND_NICK: 
     {
       char *old;
-      SilcClientEntry client = va_arg(vp, SilcClientEntry);
+      SilcClientEntry client_entry = va_arg(vp, SilcClientEntry);
       GSList *nicks;
       
       if (!success)
        return;
 
-      nicks = nicklist_get_same(SERVER(server), client->nickname);
+      nicks = nicklist_get_same(SERVER(server), client_entry->nickname);
       if (nicks != NULL) {
        char buf[512];
        SilcClientEntry collider, old;
 
        old = ((SILC_NICK_REC *)(nicks->next->data))->silc_user->client;
        collider = silc_client_get_client_by_id(client, conn,
-                       old->id);
+                                               old->id);
        
         memset(buf, 0, sizeof(buf));
         snprintf(buf, sizeof(buf) - 1, "%s@%s",
@@ -1409,18 +1409,16 @@ silc_command_reply(SilcClient client, SilcClientConnection conn,
        nicklist_rename_unique(SERVER(server),
                               old, old->nickname,
                               collider, collider->nickname);
-       silc_print_nick_change(server, collider->nickname, client->nickname,
-                              buf);
-
+       silc_print_nick_change(server, collider->nickname,
+                              client_entry->nickname, buf);
        g_slist_free(nicks);
-
       }
 
       old = g_strdup(server->nick);
-      server_change_nick(SERVER(server), client->nickname);
+      server_change_nick(SERVER(server), client_entry->nickname);
       nicklist_rename_unique(SERVER(server),
                             server->conn->local_entry, server->nick,
-                            client, client->nickname);
+                            client_entry, client_entry->nickname);
       signal_emit("message own_nick", 4, server, server->nick, old, "");
       g_free(old);
       break;
index c946f56ddac8320926d1e35895fcd4811d694dc8..9daff3b01c4bbd21e41dc62acd101e1ba6ebac91 100644 (file)
@@ -613,7 +613,7 @@ void silc_query_attributes_print(SILC_SERVER_REC *server,
        snprintf(tmp, sizeof(tmp) - 1, "%s:%d (logged %s) idle %d seconds",
                 service.address, (unsigned int)service.port,
                 service.status ? "in" : "out",
-                service.idle);
+                (unsigned int)service.idle);
        printformat_module("fe-common/silc", server, NULL,
                           MSGLEVEL_CRAP, SILCTXT_ATTR_SERVICES, tmp);
       }