Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const AdminLevel = 2; //The minimum required admin level to get added to the admin list.
- /*
- Level - Rank, Sign
- 1 - Member, None
- 2 - VOP, +v
- 3 - HOP, +h
- 4 - OP, +o
- 5 - AOP, +a
- 6 - QOP, +q
- */
- const AdminTime = 30; //Check for online admins. Value is in seconds.
- Admins <- []; //This will store the admins online currently.
- Timer <- null;
- function updateIRCAdmins()
- {
- foreach( member in FBS_NICKS )
- {
- if( member.Level > AdminLevel )
- Admins.push([
- member.Name,
- member.Level
- ]);
- }
- //You can add this to onScriptLoad to prevent command usage.
- if( Timer == null ) NewTimer("updateAdmins",AdminTime,0);
- }
- /* Optional - Usage
- Add this to your IRC commands list:-
- if( cmd == "checkforadmins" )
- {
- updateIRCAdmins();
- }
- else if( cmd == "getadminlist" )
- {
- foreach( admin in Admins )
- EchoMessage( "Name: " + admin[0] + ". Level: " + admin[1] )''
- }
- */
Add Comment
Please, Sign In to add comment