ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/bin/cfplus
(Generate patch)

Comparing deliantra/Deliantra-Client/bin/cfplus (file contents):
Revision 1.140 by elmex, Sat Dec 16 16:01:09 2006 UTC vs.
Revision 1.141 by elmex, Sat Dec 16 17:33:26 2006 UTC

176sub destroy_query_dialog { 176sub destroy_query_dialog {
177 (delete $_[0]{query_dialog})->destroy 177 (delete $_[0]{query_dialog})->destroy
178 if $_[0]{query_dialog}; 178 if $_[0]{query_dialog};
179} 179}
180 180
181# FIXME: a very ugly hack to wait for stat update look below! #d#
182our $QUERY_TIMER; #d#
183
181# server query dialog 184# server query dialog
182sub server_query { 185sub server_query {
183 my ($conn, $flags, $prompt) = @_; 186 my ($conn, $flags, $prompt) = @_;
187
188 # FIXME: a very ugly hack to wait for stat update #d#
189 if ($prompt =~ /roll new stats/ and not $conn->{stat_change_with}) {
190 unless ($QUERY_TIMER) {
191 $QUERY_TIMER =
192 Event->timer (
193 after => 1,
194 cb => sub {
195 server_query ($conn, $flags, $prompt, 1);
196 $QUERY_TIMER = undef
197 }
198 );
199 return;
200 }
201 }
184 202
185 $conn->{query_dialog} = my $dialog = new CFPlus::UI::Toplevel 203 $conn->{query_dialog} = my $dialog = new CFPlus::UI::Toplevel
186 x => "center", 204 x => "center",
187 y => "center", 205 y => "center",
188 title => "Server Query", 206 title => "Server Query",

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines