Wrong Level Problem

Started by Broly, Dec 07, 2017, 05:15 PM

Previous topic - Next topic

Broly

Check the function please, is there any problem with it ? actually its showing wrong level on IRC i use  print( FindLevel(user, false) ) to find my real level in consel and it shows you're USER but i have ( ~ ) sign on IRC here's the code

else if ( EventID == "366" )
{
// A dynamic array to store each user's class instance in.
NickList <- [];

// Now, Lets parse the names query.
local
FindUsers = split( raw[ 0 ], ":" ),
users = split( FindUsers[ 1 ], " " );

// Iterate our parsed list of users.
for ( local i = 0; i < users.len(); i++ )
{
// Establish the level symbol.
local
Level = users[ i ].slice( 0, 1 );

if ( Level == "~" ) NickList.push( UserLevels( users[ i ].slice( 1, users[ i ].len() ), "Owner", 5 ) );
else if ( Level == "&" ) NickList.push( UserLevels( users[ i ].slice( 1, users[ i ].len() ), "SOP", 4 ) );
else if ( Level == "@" ) NickList.push( UserLevels( users[ i ].slice( 1, users[ i ].len() ), "AOP", 3 ) );
else if ( Level == "%" ) NickList.push( UserLevels( users[ i ].slice( 1, users[ i ].len() ), "HOP", 2 ) );
else if ( Level == "+" ) NickList.push( UserLevels( users[ i ].slice( 1, users[ i ].len() ), "VOP", 1 ) );
else NickList.push( UserLevels( users[ i ], "User", 0 ) );
}
}

picture


Broly


Xmair


Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD

Broly