Subversion Repositories wimsdev

Rev

Rev 14923 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 14923 Rev 14924
Line 10... Line 10...
10
!! check if users is connected to his own living and make list of other living he is connected.
10
!! check if users is connected to his own living and make list of other living he is connected.
11
!! - tchatisopen  ($empty or 1) if individual tchat is open
11
!! - tchatisopen  ($empty or 1) if individual tchat is open
12
!! - make list of connected user in different living living_connected_$living
12
!! - make list of connected user in different living living_connected_$living
13
tmp=!nospace tchatisopen_$ulist
13
tmp=!nospace tchatisopen_$ulist
14
tmp=!replace internal , by ,tchatisopen_ in $tmp
14
tmp=!replace internal , by ,tchatisopen_ in $tmp
15
!reset $tmp
15
!reset nonempty_ind,nonempty_liv,$tmp
16
clscode=!replace internal / by ~ in $wims_class
16
clscode=!replace internal / by ~ in $wims_class
17
dt=!record 0 of wimshome/tmp/whoconnect/$clscode
17
dt=!record 0 of wimshome/tmp/whoconnect/$clscode
18
nb=!linecnt $dt
18
nb=!linecnt $dt
19
!for i=1 to $nb
19
!for i=1 to $nb
20
  list_session=!item 4 to -1 of $(dt[$i;])
20
  list_session=!item 4 to -1 of $(dt[$i;])
Line 22... Line 22...
22
  !for k=1 to $nbs
22
  !for k=1 to $nbs
23
    test=!defof wims_opentchat in wimshome/sessions/$(list_session[$k])/var.stat
23
    test=!defof wims_opentchat in wimshome/sessions/$(list_session[$k])/var.stat
24
    !if $test!=$empty
24
    !if $test!=$empty
25
      !if $test=$(dt[$i;1])
25
      !if $test=$(dt[$i;1])
26
        tchatisopen_$(dt[$i;1])=1
26
        tchatisopen_$(dt[$i;1])=1
-
 
27
        nonempty_ind=1
27
      !else
28
      !else
28
        n=!text select 0123456789 in $test
29
        n=!text select 0123456789 in $test
29
        living_connected_$n=!append item $(dt[$i;1]) to $(living_connected_$n)
30
        living_connected_$n=!append item $(dt[$i;1]) to $(living_connected_$n)
-
 
31
        nonempty_liv=1
30
      !endif
32
      !endif
31
    !endif
33
    !endif
32
  !next k_
34
  !next k
33
!next i
35
!next i
-
 
36
 
-
 
37
!! search living with last message not supervisor (only one ; not needed if nonempty_ind=1)
-
 
38
k=1
-
 
39
!while $nonempty_ind=$empty and $k<=$nbuser
-
 
40
  !readproc script/lastmsg.proc $(ulist[$k])
-
 
41
  !if $lastmsg!=$empty
-
 
42
    nonempty_ind=1
-
 
43
  !endif
-
 
44
  !increase k
-
 
45
!endwhile
-
 
46
k=0
-
 
47
!while $nonempty_liv=$empty and $k<=$nbliving
-
 
48
  !readproc script/lastmsg.proc .living$k
-
 
49
  !if $lastmsg!=$empty
-
 
50
    nonempty_liv=1
-
 
51
  !endif
-
 
52
  !increase k
-
 
53
!endwhile