+2003-06-05 Dani Carbonell <bocata@panete.net>
+
+ * src/partyline.c (textentry): Show the /msgs commands in the partyline.
+
2003-06-05 Abel Cheung <maddog@linux.org.hk>
* configure.in: Added "zh_TW" to ALL_LINGUAS.
gtk_label_set_text (GTK_LABEL(infolabel), status);
}
-void partyline_text (char *text)
+void partyline_text (const gchar *text)
{
if (timestampsenable) {
time_t now;
if (strlen(text) == 0) return;
- if (!strncmp("/list", text, strlen("/list")))
+ if (g_str_has_prefix(text, "/list"))
stop_list(); /* Parsing can't be perfect,
so make sure they can do it by hand... */
iso_text = g_locale_from_utf8 (text, -1, NULL, NULL, NULL);
/* FIXME : if there is an error while converting from UTF8 to current locale, we ignore the message */
- if (iso_text == NULL) return;
+ if (iso_text == NULL)
+ return;
+ // Show the command if it's a /msg
+ if (g_str_has_prefix (text, "/msg"))
+ partyline_text (text);
+
tetrinet_playerline (iso_text);
GTET_O_STRCPY (plhistory[plh_end], iso_text);
gtk_entry_set_text (GTK_ENTRY(widget), "");
extern void partyline_connectstatus (int status);
extern void partyline_namelabel (char *nick, char *team);
extern void partyline_status (char *status);
-extern void partyline_text (char *text);
+extern void partyline_text (const gchar *text);
extern void partyline_fmt (const char *text, ...) G_GNUC_PRINTF (1, 2);
extern void partyline_playerlist (int *numbers, char **names, char **teams, int n, char **specs, int sn);
extern void partyline_entryfocus (void);