Rev 33 | Rev 10970 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
33 | reyssat | 1 | |
2 | forumtest=!defof mb_readpolicy in wimshome/log/classes/$wims_class/forum/.def |
||
3 | !if $wims_user!=supervisor and $forumtest!=alluser |
||
4 | msgcnt=0 |
||
5 | !exit |
||
6 | !endif |
||
7 | |||
8 | !if $wims_user=supervisor |
||
9 | deffile=wimshome/log/classes/$wims_class/supervisor |
||
10 | !else |
||
11 | deffile=wimshome/log/classes/$wims_class/.users/$wims_user |
||
12 | !endif |
||
13 | |||
14 | newlim=10 |
||
15 | user_lastmsg=!getdef user_lastmsg in $deffile |
||
16 | !default user_lastmsg=0 |
||
17 | |||
18 | msgs=!record 0 of wimshome/log/classes/$wims_class/forum/.newlist |
||
19 | msgcnt=!linecnt $msgs |
||
20 | |||
21 | #msgcnt=0 |
||
22 | |||
23 | !if $user_lastmsg=0 |
||
24 | !if $msgcnt>$newlim |
||
25 | newmsgcnt=> $newlim |
||
26 | !else |
||
27 | newmsgcnt=$msgcnt |
||
28 | !endif |
||
29 | !exit |
||
30 | !endif |
||
31 | |||
32 | user_lastmonth=!char 1 to 6 of $user_lastmsg |
||
33 | !for n=$msgcnt to 1 step -1 |
||
34 | l_=!line $n of $msgs |
||
35 | !distribute words $l_ into w_,t_ |
||
36 | !if $w_<$user_lastmonth |
||
37 | !break |
||
38 | !endif |
||
39 | L_=!record $t_ of wimshome/log/classes/$wims_class/forum/$w_/.msglist |
||
40 | !distribute items $L_ into m_,d_,h_ |
||
41 | h_=!char 1,2,4,5,7,8 of $h_ |
||
42 | !if $user_lastmsg<=$w_$d_$h_ |
||
43 | !if $newmsgcnt>$newlim |
||
44 | newmsgcnt=> $newlim |
||
45 | !exit |
||
46 | !else |
||
47 | !advance newmsgcnt |
||
48 | !endif |
||
49 | !endif |
||
50 | !next n |