The features of this include
- select players from a list to execute various actions
- conveniently write warnings containing the players name and host
- keep track of warnings, mutes, kicks and bans with persistent lists
- easily identify hosts you once warned, muted, kicked or banned
Changelog
- {l Code}: {l Select All Code}
V0.2:
status icons for admin/ auth/ helper added
select a bot for a large list of bot options
player names added in all IP lists to ease editing your config.cfg
serverdesc field changed to a button
servermotd button/field added
darker background for better readability
a few more lines and conditionals for a clear layout
moderate.cfg
- {l Code}: {l Select All Code}
// [moderate] gui by Bonifarz, based on [master] by Calinou
//Important: Persistent lists
//Comment out these lines if you want to keep the IP lists of players you once banned etc.
//Each list needs to be initialized, so first run the script once.
//mywarnlist = ""
//mymutelist = ""
//mykicklist = ""
//mybanlist = ""
//setpersist mywarnlist 1
//setpersist mymutelist 1
//setpersist mykicklist 1
//setpersist mybanlist 1
//local variables
adminpw = "hide"
setserverdesc = "0"
setservermotd = "0"
cnsel = "-1"
newgui moderate [
guibackground 0x000000
guistayopen [
if ($setserverdesc) [
guifield serverdesc (* -1 (strlen $serverdesc)) [
setserverdesc = 0
]
] [
guibutton (concatword " Server: "$serverdesc) [
setserverdesc = 1
]
]
if ($setservermotd) [
guifield servermotd -60 [
setservermotd = 0
// no idea why this tends to cause an errous tab
// while the same for serverdesc does not...
]
] [
guibutton "^fa view/ set MotD (login message)" [
setservermotd = 1
]
]
// here we could add some interesting server stats using the (getserver i i i) command
// not sure what first index to use for the connected server
guibar
guilist [
guibar
guilist [
guibutton "^falanconnect" [lanconnect] "" "textures/flag"
guibutton "^fwclaim admin" [
adminpw = ""
] "" "textures/rocket"
if (strcmp $adminpw "") [
// guitext "password: " // this causes an errous tab
guifield adminpw 15 [
setpriv $adminpw
]
]
guibutton "auth ^fa/^f(textures/pistol) helper" [
setpriv 1
] "" "textures/shotgun"
guibutton "^fwopen (log-)file" [notepad servlog.txt] "" "textures/modeediting"
if (ishelper (getclientnum)) [
guibar
// maybe collapse these four with a button
guibutton "^fgopen mode" [mastermode 0] "" "textures/server"
guibutton "^fcveto mode" [mastermode 1] "" "textures/server"
guibutton "^fylocked mode" [mastermode 2] "" "textures/serverlock"
guibutton "^fmprivate mode" [mastermode 3] "" "textures/serverpriv"
guibar
guibutton "^fgreset variables " [resetvars] "" "textures/action"
guibutton "^fyclear all mutes" [clearmutes] "" "textures/chat"
guibutton "^frclear all bans" [clearbans] "" "<mad:.75/.75/.75>textures/warning"
guibutton "^farelinquish priv." [setpriv 0] "" "textures/action"
]
]
guibar
guilist [
guitext (concatword "^fycn")
guibar
loop cn $serverclients [
if (> (strlen (getclientname $cn)) 0) [
guitext (concatword "^fy" $cn )
]
]
]
guibar
guilist [
guitext (concatword "^fbhost (IP)")
guibar
loop cn $serverclients [
if (> (strlen (getclientname $cn)) 0) [
guitext (concatword "^fb" (getclienthost $cn))
]
]
]
guibar
guilist [
guitext "^fw^f(textures/flag)"
// player status icons: spec/team, server priv, warn/mute/kick/banlists
guibar
loop cn $serverclients [
if (> (strlen (getclientname $cn)) 0) [
guilist [
case ( (getclientteam $cn) 0 ) 1 [
guitext (concatword "^f[" $teamalphacolour "]^f(textures/teamalpha) ") ] 2 [
guitext (concatword "^f[" $teamomegacolour "]^f(textures/teamomega) ") ] 3 [
guitext (concatword "^f[" $teamkappacolour "]^f(textures/teamkappa) ") ] 4 [
guitext (concatword "^f[" $teamsigmacolour "]^f(textures/teamsigma) ") ] 0 [
if (= (isspectator $cn) 1) [
guitext (concatword "^fa^f(textures/spec) " )] [
guitext (concatword "^fa^f(textures/player) " )
]
]
if (< -1 (strstr $mywarnlist (getclienthost $cn))) [ guitext "^fr^f(textures/warning)" ]
if (< -1 (strstr $mymutelist (getclienthost $cn))) [ guitext "^fr^f(textures/chat)" ]
if (< -1 (strstr $mykicklist (getclienthost $cn))) [ guitext "^fr^f(textures/wait)" ]
if (< -1 (strstr $mybanlist (getclienthost $cn))) [ guitext "^fr^f(textures/dead)" ]
if (isadministrator $cn) [
guitext "^fg^f(textures/rocket)"
] [
if (ismoderator $cn) [
guitext "^fg^f(textures/shotgun)"
] [ if (ishelper $cn) [
guitext "^fg^f(textures/pistol)"
]
]
]
]
]
]
]
guibar
guilist [
guitext "^faplayer name"
guibar
loop cn $serverclients [
if (> (strlen (getclientname $cn)) 0) [
if (= @cnsel @cn ) [
guitext (concatword "^fy" (getclientname $cn) " ") ] [
guibutton (concatword "^fa" (getclientname $cn) " ") [cnsel = @cn] ] [
]
]
]
]
guibar
if (> (strlen (getclientname $cnsel)) 0) [
guilist [
guitext (concatword "^fy" (getclientname $cnsel))
guibar
// actions for everyone including yourself and bots:
guibutton "^fg deselect" [ cnsel = -1 ] "" "textures/exit"
guitext "change team: " "<mad:.5/.5/.5>textures/team"
guilist [
guibutton (concatword "^f[" $teamalphacolour "]^f(textures/teamalpha) ") [setteam $cnsel alpha]
guibutton (concatword "^f[" $teamomegacolour "]^f(textures/teamomega) ") [setteam $cnsel omega]
guibutton (concatword "^f[" $teamkappacolour "]^f(textures/teamkappa) ") [setteam $cnsel kappa]
guibutton (concatword "^f[" $teamsigmacolour "]^f(textures/teamsigma) ") [setteam $cnsel sigma]
]
if (!= $cnsel (getclientnum)) [
// actions for everyone except yourself
if (< -1 (strstr (getclienthost $cnsel) "bot")) [
guibutton "^fgreset bots" [
mybotlimit = $botlimit
botlimit 0
sleep 100 [
botlimit $mybotlimit
]
// equivalent to Zeros resetbots, but still needs sleep :p
]
guilist [
guilist [
guifield botspeed 3
guifield botskillmin 3
guifield botskillmax 3
guifield aipassive 3
guifield aiforcegun 3
guifield botlimit 3
guifield botbalance 3
guifield botoffset 3
]
guilist [
guitext "^fa speed "
guitext "^fa skillmin "
guitext "^fa skillmax "
guitext "^fa passive "
guitext "^fa fav. gun "
guitext "^fa limit "
guitext "^fa balance "
guitext "^fa offset "
]
]
] [
// actions that do not work on bots
// put them here for testing anyways =)
guibutton "^fa force spectator" [
spectator 1 $cnsel
] "" "textures/spec"
guibutton "^fy end spectator" [
spectator 0 $cnsel
] "" "textures/player"
guibutton "^fy warn" [
saycommand "^fzyr^f(textures/warning) " (getclientname $cnsel) "^fb("(getclienthost $cnsel)")^fw:"
mywarnlist = (concatword $mywarnlist (getclienthost $cnsel) " (name " (getclientname $cnsel) ") ")
] "" "textures/warning"
guibutton "^fy mute" [
mute $cnsel
mymutelist = (concatword $mymutelist (getclienthost $cnsel) " (name " (getclientname $cnsel) ") ")
] "" "textures/chat"
guibutton "^fm kick" [
kick $cnsel
mykicklist = (concatword $mykicklist (getclienthost $cnsel) " (name " (getclientname $cnsel) ") ")
] "" "textures/wait"
guibutton "^fr ban" [
ban $cnsel
mybanlist = (concatword $mybanlist (getclienthost $cnsel) " (name " (getclientname $cnsel) ") ")
] "" "<mad:.75/.75/.75>textures/dead"
]
] [
guitext "^fbthat is you"
]
]
guibar
]
]
//guibar // this tends to pop into another gui tab
]
]
vote mod
One more thing: If you miss the functionality to enforce a change of map, I suggest the following.
- put a copy of <REinstall>/data/menus.cfg in your RE user data directory
- search your copy of menus.cfg for these lines:
- {l Code}: {l Select All Code}
guibutton (? (isonline) "^fgsubmit vote" "^fgstart game") [
start $mapcur $modeselected $mutsselected
]
- insert these lines below:
- {l Code}: {l Select All Code}
if (ishelper (getclientnum)) [
guibutton " / ^fyenforce" [
mastermode 1
start $mapcur $modeselected $mutsselected
sleep 3000
mastermode 0
]
]