$Priorty: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Created page with "{{DISPLAYTITLE:$Priorty}} <span class="pageSubtitle"><section begin="desc" />Change a user's priority<section end="desc" /></span> <p class="warning">Most Sirius $functions have...")
 
m (1 revision)
(No difference)

Revision as of 15:45, 31 January 2011

<section begin="desc" />Change a user's priority<section end="desc" />

Most Sirius $functions have been deprecated in favor of Object Oriented methods. The OO equivalent for the $Priorty function is to be entered.

The $Priorty function allows a privileged user (system manager or system administrator) to change another user's priority. :note As of Sirius Mods Version 7.3, you can open access to $Priorty beyond system managers or system administrators by specifying the FUNCOPTS system parameter X'40' or X'20' bit settings, as described in the Sirius Mods Command and Parameter Reference Manual.

The $Priorty function accepts four arguments and returns a numeric code.

The first argument is the number of the user whose priority is to be changed.

The second argument is an optional userid. If this argument is provided, the user number indicated by argument one will only have its priority changed if the userid matches the second argument. This prevents accidentally changing the priority of a user that just logged onto a thread previously occupied by another user.

The third argument is a number indicating the user's new minimum priority. This is a required argument and must be between 0 and 111.

The fourth argument is a number indicating the user's new maximum priority. This is an optional argument and must be between the minimum priority (argument 3) plus 16 and 127. The default for this argument is the minimum priority plus 47.

Syntax

<section begin="syntax" /> %RESULT = $Priorty ( user_num, userid, min, max) <section end="syntax" />

$Priorty Function

%RESULT is set to indicate the success of the function.

0 - Priority changed 1 - User not found 2 - Not privileged to issue PRIORITY command 3 - Invalid priority specified

$Priorty return codes


$Priorty gives you more flexibility in the priorities you can assign to a user than does the PRIORITY command. The valid priorities with the PRIORITY command and their corresponding minimum and maximum priority values are

  • LOW - 0 and 47
  • STANDARD - 32 and 79
  • HIGH - 80 and 127


The current priority of a user whose priority is reset via $Priorty is set to

( ( 2 * min_priority ) + max_priority ) / 3


The following program sets user 0 to low priority.

B %RC = $Priorty( 0, , 0) END

  • &SFUNC

Products authorizing $Priorty