Changeset 60
- Timestamp:
- 08/13/07 11:21:21 (1 year ago)
- Files:
-
- trunk/op_server.pl (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/op_server.pl
r59 r60 1263 1263 $buttons{ uc("$tmphash{server}^$chan_trunk") } = $pos; 1264 1264 $textos{$indice_contexto} = $tmphash{label}; 1265 if(!defined($tmphash{no_label_counter})) { $tmphash{no_label_counter} = 0; }1265 if(!defined($tmphash{no_label_counter})) { $tmphash{no_label_counter} = 0; } 1266 1266 if ( $no_counter == 0 && $tmphash{no_label_counter}==0) { 1267 1267 $textos{$indice_contexto} .= " " . $count; … … 4172 4172 push @return, $valor; 4173 4173 } 4174 $evento = ""; 4174 4175 } 4175 4176 elsif ( $evento eq "leave" ) { … … 5892 5893 if ( defined( $group_count{$interno} ) ) { 5893 5894 if ( $group_count{$interno} == 1 ) { 5894 $buttontext = group_count($interno,$canal);5895 push @respuestas, $buttontext;5895 $buttontext = group_count($interno,$canal); 5896 push @respuestas, $buttontext; 5896 5897 } 5897 5898 } … … 6078 6079 if ( defined( $group_count{$interno} ) ) { 6079 6080 if ( $group_count{$interno} == 1 ) { 6080 $buttontext = group_count($interno,$canal);6081 $buttontext = group_count($interno,$canal); 6081 6082 push @respuestas, $buttontext; 6082 6083 } … … 6091 6092 if ( defined( $group_count{$interno} ) ) { 6092 6093 if ( $group_count{$interno} == 1 ) { 6093 $buttontext = group_count($interno,$canal);6094 push @respuestas, $buttontext;6094 $buttontext = group_count($interno,$canal); 6095 push @respuestas, $buttontext; 6095 6096 } 6096 6097 } … … 6196 6197 } 6197 6198 6198 if ( $tiempo eq "" ) { $tiempo = 0; }6199 if ( $tiempo eq "" ) { $tiempo = 0; } 6199 6200 6200 6201 if ( $timer_type ne "" ) { … … 6362 6363 6363 6364 sub group_count { 6364 my $interno = shift;6365 my $canal = shift;6365 my $interno = shift; 6366 my $canal = shift; 6366 6367 my $plural = ""; 6367 my $return = "";6368 my $return = ""; 6368 6369 if ( @{ $sesbot{$interno} } > 1 ) { 6369 6370 $plural = "s"; … … 6377 6378 $botonpermanenttext{$interno} = ""; 6378 6379 $return ="$interno|corto|"; 6379 }6380 return $return;6380 } 6381 return $return; 6381 6382 } 6382 6383 … … 8994 8995 sub recompute_queues_onjoin { 8995 8996 my ($hash_temporal,$server,$canalid) = @_; 8996 my @return = ();8997 my @corto = ();8998 my @ocupado = ();8997 my @return = (); 8998 my @corto = (); 8999 my @ocupado = (); 8999 9000 my $qclidnum = ""; 9000 9001 my $qclidname = ""; … … 9019 9020 9020 9021 # Verify if the position is already taken (by means of QUEUE_PRIO) 9021 my $tengo = 0;9022 my $tengo = 0; 9022 9023 foreach my $id ( keys %{$cola} ) { 9023 9024 unless ( $cola->{$id}{QUEUE} ) { … … 9027 9028 9028 9029 if ( $canal eq $cola->{$id}{QUEUE} ) { 9029 if ( $position eq $cola->{$id}{POSITION} ) {9030 $tengo = 1;9031 }9032 }9033 } 9034 if($tengo==1) {9030 if ( $position eq $cola->{$id}{POSITION} ) { 9031 $tengo = 1; 9032 } 9033 } 9034 } 9035 if($tengo==1) { 9035 9036 # Queue prio! 9036 my $time = time();9037 my $time = time(); 9037 9038 foreach my $id ( keys %{$cola} ) { 9038 9039 unless ( $cola->{$id}{QUEUE} ) { … … 9042 9043 9043 9044 if ( $canal eq $cola->{$id}{QUEUE} ) { 9044 if($cola->{$id}{POSITION} >= $position) {9045 my $diftime = $time - $cola->{$id}{TIME};9046 if ( $queue_hide == 1 ) {9047 push @corto, construct_cmd( $cola, $id, "setalpha", "000" );9048 }9049 push @corto, construct_cmd( $cola, $id, "corto", "" );9050 9051 $cola->{$id}{POSITION}++;9052 my $clidtext = $cola->{$id}{CLIDNAME} . " " . $cola->{$id}{CLID};9053 push @ocupado, construct_cmd( $cola, $id, "settimer", $diftime );9054 push @ocupado, construct_cmd( $cola, $id, "ocupado", "[$clidtext]" );9055 }9056 } 9057 } 9058 @ocupado = unique(@ocupado);9059 @corto = unique(@corto);9060 }9061 # Normal, add new call at the end of the queue9045 if($cola->{$id}{POSITION} >= $position) { 9046 my $diftime = $time - $cola->{$id}{TIME}; 9047 if ( $queue_hide == 1 ) { 9048 push @corto, construct_cmd( $cola, $id, "setalpha", "000" ); 9049 } 9050 push @corto, construct_cmd( $cola, $id, "corto", "" ); 9051 9052 $cola->{$id}{POSITION}++; 9053 my $clidtext = $cola->{$id}{CLIDNAME} . " " . $cola->{$id}{CLID}; 9054 push @ocupado, construct_cmd( $cola, $id, "settimer", $diftime ); 9055 push @ocupado, construct_cmd( $cola, $id, "ocupado", "[$clidtext]" ); 9056 } 9057 } 9058 } 9059 @ocupado = unique(@ocupado); 9060 @corto = unique(@corto); 9061 } 9062 # Normal, add new call at the end of the queue 9062 9063 push @return, "$canal=$position|ocupado2|$texto_pos|$unico_id|$canalid"; 9063 9064 push @return, "$canal=$position|setalpha|100|$unico_id|$canalid"; … … 9074 9075 $cola->{$canalid}{SERVER} = $server; 9075 9076 $cola->{$canalid}{TIME} = $tiempo; 9076 if (@corto) {9077 if (@corto) { 9077 9078 return ( @corto, @ocupado, @return ); 9078 } else {9079 return @return;9079 } else { 9080 return @return; 9080 9081 } 9081 9082 } … … 9241 9242 if ( !defined($name) ) { $name = "" } 9242 9243 9243 if ( $name eq "<unknown>" ) { $name = ""; }9244 if ( $name eq "<unknown>" ) { $name = ""; } 9244 9245 9245 9246 if ( !is_number($numero) ) {
