Jump to content

Modifying Admin Settings In PRS 1.3


Recommended Posts

PRS uses its own levels - 1-5. I'm no coder, but i'd expect the code I have to change to resemble something like !admin blah blah if prs.level = 1 then prs.getid (PRS.LEVEL)

and maybe I should change it to !admin blah blah if prs.level = 1 then prs.getid (FOS)

PS: I'd also like to change 1 to FOS wen you type !level and level 1 to FOS when yout type !stats

Link to comment

I have found the relevant bits of code: elseif ($3 == !level) mta.text $1 $mta.nick($1,%a) $+ 's Level: $prs.level($1,%a)

I woiuld need to make it something like $+ 's level: ((if prs.level = 1 then = FOS) or whatever, i dont know these scripts. And if prs.level =<1 then prs.level) (or whatever)

and !admin is elseif (!admin* iswm $3) admincount $1-

which I think (dont count on this) links to this bit of script: alias admincount {

var %a = 0, %b = None

while (%a < %loop) {

if ($mta.nick($1,%a) != $null) {

if ($prs.level($1,%a) > 0) {

if (%b == None) %b = $mta.nick($1,%a) $+ ( $+ $prs.level($1,%a) $+ )

else %b = %b $+ , $mta.nick($1,%a) $+ ( $+ $prs.level($1,%a) $+ )

}

}

!inc %a

}

mta.text $1 Current Admins: %b $+ .

Which would need to be modified so if the level = 1 then it says FOS (friend of server) instead of level 1

Link to comment

i guess something like this:

elseif ($3 == !level) mta.text $1 $mta.nick($1,%a) $+ 's Level: $iif(($prs.level($1,%a) == 1), FOS, $prs.level($1,%a)) 

alias admincount { 
  var %a = 0, %b = None 
  while (%a < %loop) { 
    if ($mta.nick($1,%a) != $null) { 
      if ($prs.level($1,%a) > 0) { 
        if (%b == None) %b = $mta.nick($1,%a) $+ ( $+ $iif(($prs.level($1,%a) == 1), FOS, $prs.level($1,%a)) $+ )  
        else %b = %b $+ , $mta.nick($1,%a) $+ ( $+ $iif(($prs.level($1,%a) == 1), FOS, $prs.level($1,%a)) $+ ) 
      } 
    } 
  !inc %a 
  } 
  mta.text $1 Current Admins: %b $+ . 
} 

Link to comment

its simple enough to change, however the script will need modifying in many places (admin commands for level 1 will need changing to level 2 to stop general users using the admin commands), also, genral users wont be able to login manually (since their IP isnt added to the config file), so its kinda pointless.

Link to comment
its simple enough to change, however the script will need modifying in many places (admin commands for level 1 will need changing to level 2 to stop general users using the admin commands), also, genral users wont be able to login manually (since their IP isnt added to the config file), so its kinda pointless.

Thanks for your help guys. But I am concerned with your comments Scooby. Maybe its a misunderstanding - FriendOfServer status is not given to everyone - I just want level 1 admins to be known as firends of server so I can justify having plenty of level 1s. Plus, I only give rcon to admin level 3 and higher - therefore manual logon would not matter. With this explanation in mind, will that script above do as I need without mucking up the other admin levels? Level 1 or FOS can mute and freeze in my server - will these abilities be affected by changing what the server says when you type !level or !admin. Thanks for the help.

Link to comment

this cannot be done with rcon admins

and if you want it with the mirc script admin . you should look into changing level 2 - because level 1 means any player in mirc script (thats what scooby means) , level 2 and higher means admin

Link to comment
its simple enough to change, however the script will need modifying in many places (admin commands for level 1 will need changing to level 2 to stop general users using the admin commands), also, genral users wont be able to login manually (since their IP isnt added to the config file), so its kinda pointless.

Thanks for your help guys. But I am concerned with your comments Scooby. Maybe its a misunderstanding - FriendOfServer status is not given to everyone - I just want level 1 admins to be known as firends of server so I can justify having plenty of level 1s. Plus, I only give rcon to admin level 3 and higher - therefore manual logon would not matter. With this explanation in mind, will that script above do as I need without mucking up the other admin levels? Level 1 or FOS can mute and freeze in my server - will these abilities be affected by changing what the server says when you type !level or !admin. Thanks for the help.

well i suppose u could edit the !Admin alias to not show level 1 admins, and manually add the Level 1's with the !Addadmin command, u would just need to maybe change some of the level 1 commands. this of course would only work for people with static IP's.

look in ur script for: ;start of Admin level 1 commands.

look down the list and u will see the command available to level 1 admins, if there are any that u dont want these people to use, u just need to add to each line: && ($prs.level($1,$2) > 1)

eg: elseif ($3 == !setwarnlimit) prs.setwarnlimit $1-

would be: elseif ($3 == !setwarnlimit) && ($prs.level($1,$2) > 1) prs.setwarnlimit $1-

this would all work fine i guess, although all ur doing is changing level 1 admins to show are FOS.

Link to comment

I thought level 0 was any player in the script, not 1. My level 1 admins have mute and freeze powers (set through the PRS interface) and they are not rcon, just !addadmin powered admins. So - changing the script to the one up top will not interfere with the admin powers, will not let any guy be a level 1 or FOS, and will simply just display level 1s as Friends of Server to people that look the normal way (ie !admin or !level) That's all I'm after.

EDIT: Hmm, I've just looked through the script commands. So what you're saying is, level 1's can use any command? I was under the impression that the interface in PRS limited them to the kick ban and freeze ect commands that you set their levels to be able to use. So any old level 1 can use commands such as !banip, !banname, !map, !nextmap !setwarn etc? If that's true, then that seems absurd. Is there a simple bit of code I could put in the top so that these commands would be limited to level 3?

Link to comment
I thought level 0 was any player in the script, not 1. My level 1 admins have mute and freeze powers (set through the PRS interface) and they are not rcon, just !addadmin powered admins. So - changing the script to the one up top will not interfere with the admin powers, will not let any guy be a level 1 or FOS, and will simply just display level 1s as Friends of Server to people that look the normal way (ie !admin or !level) That's all I'm after.

EDIT: Hmm, I've just looked through the script commands. So what you're saying is, level 1's can use any command? I was under the impression that the interface in PRS limited them to the kick ban and freeze ect commands that you set their levels to be able to use. So any old level 1 can use commands such as !banip, !banname, !map, !nextmap !setwarn etc? If that's true, then that seems absurd. Is there a simple bit of code I could put in the top so that these commands would be limited to level 3?

no they cant use any command... they can only use LEVEL 1 commands,

ie: set upload url, setwarnlimit, setdmlimit, un/warn, exportmaps, cancelvotekicks, add/rem creators and so on...

i personally wouldnt want any old person using some of these, but its starting to fall into place now and from what i can tell, basically ur making a big issue from nothing...

all u want to do is make level 1 show as FOS... i think?

which i think xbost already showed.

Link to comment
  • 3 weeks later...

Ok to make this better I would like it to say FOS for level 1 when people log in (just auto, i don't have lvl 1 rcon)

alias prs.login {

var %a = $mta.nick($1,$2)

if ($hget(prswarns,AdminIP $+ %a) != $null) {

if ($hget(prswarns,AdminIP $+ %a) == $gettok($mta.ip($1,$2),1-2,46)) {

.timer 1 1 mta.text $1 %a Auto-logged In, Level $hget(prswarns,AdminLevel $+ %a)

!hadd pgstemp loggedin $+ $2 $hget(prswarns,AdminLevel $+ %a)

.timerkick $+ $2 off

}

There is the code (i think thats the right bit of code) and as before, I would like it to work normally for anyone level 2 and above ( up to 5) but if someone's level is 1 then it says: mta.text $1 %a Auto-logged In, Level (FOS)

This is for PRS so it needs prs.level and prs.getid etc

Thanks :D

Link to comment

alias prs.login { 
var %a = $mta.nick($1,$2) 
if ($hget(prswarns,AdminIP $+ %a) != $null) { 
if ($hget(prswarns,AdminIP $+ %a) == $gettok($mta.ip($1,$2),1-2,46)) { 
.timer 1 1 mta.text $1 %a Auto-logged In, Level $iif($hget(prswarns,AdminLevel $+ %a) == 1,(FOS),$v1) 
!hadd pgstemp loggedin $+ $2 $hget(prswarns,AdminLevel $+ %a) 
.timerkick $+ $2 off  
} 

Try that.

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...