+2003-02-24 Dani Carbonell <bocata@panete.net>
+
+ * src/partyline.c (stop_list): list_issued is a integer, changed
+ accordingly.
+ (partyline_update_channel_list): if there is another channel list
+ update in progress, do nothing. This will prevent us from being
+ kicked from the server because of flood.
+
+ * src/tetrinet.c (tetrinet_inmessage): fixed the stupid bug that
+ prevented the channel list from working in tetrinet.org.
+
2003-02-22 ChipX86 <chipx86@chipx86.com>
* gtetrinet.schemas.in: Add schema info. for timestamp pref.
void stop_list (void)
{
- list_issued = FALSE;
+ list_issued = 0;
/* update the channel list widget, with some sort of "double buffering" */
gtk_tree_view_set_model (GTK_TREE_VIEW (channel_box), GTK_TREE_MODEL (work_model));
{
gchar cad[1024];
- list_issued++;
- gtk_list_store_clear (work_model);
- tetrinet_playerline ("/list");
+ /* if there is another update in progress, just go away silently */
+ if (list_issued == 0)
+ {
+ list_issued++;
+ gtk_list_store_clear (work_model);
+ tetrinet_playerline ("/list");
- /* send the mark */
- g_snprintf (cad, 1024, "/msg %d --- MARK ---", playernum);
- tetrinet_playerline (cad);
+ /* send the mark */
+ g_snprintf (cad, 1024, "/msg %d --- MARK ---", playernum);
+ tetrinet_playerline (cad);
+ }
return TRUE;
}
checkmoderatorstatus ();
partylineupdate_join (nick);
partylineupdate_team (nick, team);
- partyline_update_channel_list ();
}
}
/* show partyline on successful connect */
partylineupdate_join (playernames[pnum]);
/* check moderator status */
checkmoderatorstatus ();
+ /* update channel list */
+ partyline_update_channel_list ();
/* send out our field */
/* if (!spectating) tetrinet_resendfield (); */
}
else if (tetrix) {
gchar *line = nocolor (token);
- if (list_issued)
+ if (list_issued > 0)
{
if (*line == '(')
{
if (!strncmp ("You", line, 3))
{
/* we will use the error message as list stopper */
- stop_list();
+ list_issued--;
+ if (list_issued <= 0)
+ stop_list();
break;
}