Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2005:
[Freeciv-Dev] (PR#10902) 'Topic' is not shown at the metaserver list in
Home

[Freeciv-Dev] (PR#10902) 'Topic' is not shown at the metaserver list in

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: chrisk@xxxxxxxxx
Subject: [Freeciv-Dev] (PR#10902) 'Topic' is not shown at the metaserver list in the client.
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 15 Sep 2005 10:52:01 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=10902 >

> [chrisk - Fri Nov 05 21:46:34 2004]:
> 
> 
> CVS 05 NOV 2004 S2 GTK2
> 
> The 'Topic' is not shown in the metaserver window (connect to network
game).
> 
> So you miss such comments as "Largepox Settings."

My solution is to remove the metatopic.  Unless anyone has a better idea
I will do this.

-jason

Index: server/commands.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/commands.c,v
retrieving revision 1.13
diff -p -u -r1.13 commands.c
--- server/commands.c   6 Aug 2005 16:46:38 -0000       1.13
+++ server/commands.c   15 Sep 2005 17:50:28 -0000
@@ -148,11 +148,6 @@ const struct command commands[] = {
    N_("metainfo <meta-line>"),
    N_("Set metaserver info line."), NULL
   },
-  {"metatopic", ALLOW_CTRL,
-   /* TRANS: translate text between <> only */
-   N_("metatopic <meta-line>"),
-   N_("Set metaserver topic line."), NULL
-  },
   {"metapatches", ALLOW_HACK,
    /* TRANS: translate text between <> only */
    N_("metapatch <meta-line>"),
Index: server/commands.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/commands.h,v
retrieving revision 1.7
diff -p -u -r1.7 commands.h
--- server/commands.h   5 May 2005 20:26:14 -0000       1.7
+++ server/commands.h   15 Sep 2005 17:50:28 -0000
@@ -53,7 +53,6 @@ enum command_id {
   CMD_TEAM,
   CMD_RULESETDIR,
   CMD_METAMESSAGE,
-  CMD_METATOPIC,
   CMD_METAPATCHES,
   CMD_METACONN,
   CMD_METASERVER,
Index: server/meta.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/meta.c,v
retrieving revision 1.69
diff -p -u -r1.69 meta.c
--- server/meta.c       14 Jun 2005 18:49:09 -0000      1.69
+++ server/meta.c       15 Sep 2005 17:50:28 -0000
@@ -64,7 +64,6 @@ static int   metaport;
 static char *metaserver_path;
 
 static char meta_patches[256] = "";
-static char meta_topic[256] = "";
 static char meta_message[256] = "";
 
 /*************************************************************************
@@ -76,14 +75,6 @@ const char *default_meta_patches_string(
 }
 
 /*************************************************************************
- the default metaserver topic
-*************************************************************************/
-const char *default_meta_topic_string(void)
-{
-  return "";
-}
-
-/*************************************************************************
   Return static string with default info line to send to metaserver.
   This is a function (instead of a define) to keep meta.h clean of
   including config.h and version.h
@@ -110,14 +101,6 @@ const char *get_meta_patches_string(void
 }
 
 /*************************************************************************
- the metaserver topic
-*************************************************************************/
-const char *get_meta_topic_string(void)
-{
-  return meta_topic;
-}
-
-/*************************************************************************
  the metaserver message
 *************************************************************************/
 const char *get_meta_message_string(void)
@@ -134,14 +117,6 @@ void set_meta_patches_string(const char 
 }
 
 /*************************************************************************
- set the metaserver topic string
-*************************************************************************/
-void set_meta_topic_string(const char *string)
-{
-  sz_strlcpy(meta_topic, string);
-}
-
-/*************************************************************************
  set the metaserver message string
 *************************************************************************/
 void set_meta_message_string(const char *string)
@@ -237,10 +212,6 @@ static bool send_to_metaserver(enum meta
     my_snprintf(s, rest, "capability=%s&", my_url_encode(our_capability));
     s = end_of_strn(s, &rest);
 
-    my_snprintf(s, rest, "topic=%s&",
-                my_url_encode(get_meta_topic_string()));
-    s = end_of_strn(s, &rest);
-
     my_snprintf(s, rest, "serverid=%s&",
                 my_url_encode(srvarg.serverid));
     s = end_of_strn(s, &rest);
@@ -415,9 +386,6 @@ void server_open_meta(void)
   if (meta_patches[0] == '\0') {
     set_meta_patches_string(default_meta_patches_string());
   }
-  if (meta_topic[0] == '\0') {
-    set_meta_topic_string(default_meta_topic_string());
-  }
   if (meta_message[0] == '\0') {
     set_meta_message_string(default_meta_message_string());
   }
Index: server/meta.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/meta.h,v
retrieving revision 1.25
diff -p -u -r1.25 meta.h
--- server/meta.h       4 Oct 2004 04:37:33 -0000       1.25
+++ server/meta.h       15 Sep 2005 17:50:28 -0000
@@ -27,15 +27,12 @@ enum meta_flag {
 };
 
 const char *default_meta_patches_string(void);
-const char *default_meta_topic_string(void);
 const char *default_meta_message_string(void);
 
 const char *get_meta_patches_string(void);
-const char *get_meta_topic_string(void);
 const char *get_meta_message_string(void);
 
 void set_meta_patches_string(const char *string);
-void set_meta_topic_string(const char *string);
 void set_meta_message_string(const char *string);
 
 char *meta_addr_port(void);
Index: server/savegame.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/savegame.c,v
retrieving revision 1.276
diff -p -u -r1.276 savegame.c
--- server/savegame.c   3 Sep 2005 09:58:59 -0000       1.276
+++ server/savegame.c   15 Sep 2005 17:50:29 -0000
@@ -3188,9 +3188,6 @@ void game_load(struct section_file *file
     set_meta_patches_string(secfile_lookup_str_default(file, 
                                                 default_meta_patches_string(),
                                                 "game.metapatches"));
-    set_meta_topic_string(secfile_lookup_str_default(file, 
-                                                default_meta_topic_string(),
-                                                "game.metatopic"));
     set_meta_message_string(secfile_lookup_str_default(file, 
                                                 default_meta_message_string(),
                                                 "game.metamessage"));
@@ -3743,7 +3740,6 @@ void game_save(struct section_file *file
                                  RUN_GAME_STATE), "game.server_state");
   
   secfile_insert_str(file, get_meta_patches_string(), "game.metapatches");
-  secfile_insert_str(file, get_meta_topic_string(), "game.metatopic");
   secfile_insert_str(file, get_meta_message_string(), "game.metamessage");
   secfile_insert_str(file, meta_addr_port(), "game.metaserver");
   
Index: server/stdinhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/stdinhand.c,v
retrieving revision 1.436
diff -p -u -r1.436 stdinhand.c
--- server/stdinhand.c  5 Sep 2005 15:55:47 -0000       1.436
+++ server/stdinhand.c  15 Sep 2005 17:50:29 -0000
@@ -599,29 +599,6 @@ static bool metapatches_command(struct c
 /**************************************************************************
 ...
 **************************************************************************/
-static bool metatopic_command(struct connection *caller, char *arg, bool check)
-{
-  if (check) {
-    return TRUE;
-  }
-
-  set_meta_topic_string(arg);
-  if (is_metaserver_open()) {
-    send_server_info_to_metaserver(META_INFO);
-    notify_conn(NULL, NULL, E_SETTING,
-               _("Metaserver topic string set to '%s'."), arg);
-  } else {
-    notify_conn(NULL, NULL, E_SETTING,
-               _("Metaserver topic string set to '%s', "
-                 "not reporting to metaserver."), arg);
-  }
-
-  return TRUE;
-}
-
-/**************************************************************************
-...
-**************************************************************************/
 static bool metamessage_command(struct connection *caller, 
                                 char *arg, bool check)
 {
@@ -1068,9 +1045,6 @@ static void write_init_script(char *scri
     if (0 != strcmp(get_meta_patches_string(), default_meta_patches_string())) 
{
       fprintf(script_file, "metapatches %s\n", get_meta_patches_string());
     }
-    if (0 != strcmp(get_meta_topic_string(), default_meta_topic_string())) {
-      fprintf(script_file, "metatopic %s\n", get_meta_topic_string());
-    }
     if (0 != strcmp(get_meta_message_string(), default_meta_message_string())) 
{
       fprintf(script_file, "metamessage %s\n", get_meta_message_string());
     }
@@ -3412,8 +3386,6 @@ bool handle_stdin_input(struct connectio
     return load_command(caller, arg, check);
   case CMD_METAPATCHES:
     return metapatches_command(caller, arg, check);
-  case CMD_METATOPIC:
-    return metatopic_command(caller, arg, check);
   case CMD_METAMESSAGE:
     return metamessage_command(caller, arg, check);
   case CMD_METACONN:

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#10902) 'Topic' is not shown at the metaserver list in the client., Jason Short <=