PDA

View Full Version : mass admin file?


Fire_optikz001
1st September 2009, 13:47
ok i was thinking of a mass admin file
it seems to be working but in my logs i have

Can't open group file : ./default_1/../user/admin.txt

i only get that every once in a while i was thinking is there a way to go up a directory in lapper? like from default_1 into user

or did i do it right?

Yisc[NL]
1st September 2009, 16:20
The right syntax should be:

"./../Database/storedvalue"

. = to indicate a file will be used
.. = go one level up

Krayy
1st September 2009, 21:44
ok i was thinking of a mass admin file
it seems to be working but in my logs i have

Can't open group file : ./default_1/../user/admin.txt

i only get that every once in a while i was thinking is there a way to go up a directory in lapper? like from default_1 into user

or did i do it right?
Depends on what you mean by mass admin.

Are you saying that you want everyone to be an admin, because if you already have a list of admin users, then just copy them into the admins.txt file in the main lapper directory and then change the line in the LFSLapper.lpr file that says:

UserGroupFromFile( "admin", "./admin.txt" );

to

UserGroupFromFile( "admin", "../admin.txt" );

Fire_optikz001
1st September 2009, 21:54
well thats what i have i was just asking and by mass i ment multi servers :) but thats alli needed to know whatnks guys :)

Krayy
1st September 2009, 22:36
well thats what i have i was just asking and by mass i ment multi servers :) but thats alli needed to know whatnks guys :)
Just remember that you will need to adjust all of the LFSLapper.lpr files for all lapper instances to point to ../admin.txt

BTW, I'll put up some code soon to allow you to add/remove admins while inside LFS.

Fire_optikz001
1st September 2009, 22:38
Just remember that you will need to adjust all of the LFSLapper.lpr files for all lapper instances to point to ../admin.txt

BTW, I'll put up some code soon to allow you to add/remove admins while inside LFS.

yay just what i need hmm would that code work with my ban files too?

Krayy
1st September 2009, 23:09
yay just what i need hmm would that code work with my ban files too?
How do you mean ban files?

PS, what version of lapper are you using?

Fire_optikz001
1st September 2009, 23:46
5.8.4.5
EX i have

Event OnConnect()
$userName = GetCurrentPlayerVar("UserName");
UserGroupFromFile( "whole_ban", "../user/whole_ban.txt" );
UserGroupFromFile( "super_ban", "../user/super_ban.txt" );
...

IF( UserInGroup( "whole_ban",$userName ) == 1 )
THEN
privMsg( "^1You Have A Current Ban From This Server");
privMsg( "^1To See When Your Ban Is Over Visit");
privMsg( "^2http://supercr3w.ning.com/page/user-report-sys" );
cmdLFS("/kick " . . $userName );
ELSE
IF( UserInGroup( "super_ban",$userName ) == 1 )
THEN
privMsg( "^1You Have A Current Ban From This Server");
privMsg( "^1To See When Your Ban Is Over Visit");
privMsg( "^2http://supercr3w.ning.com/page/user-report-sys" );
cmdLFS("/ban " . $userName . " 30");
ENDIF
ENDIF
EndEvent

Event OnNewPlayerJoin()
$userName = GetCurrentPlayerVar("UserName");
UserGroupFromFile( "drive_ban", "../user/drive_ban.txt" );
IF( UserInGroup( "drive_ban",$userName ) == 1 )
THEN
privMsg( "^1You Have A Current Ban From Driving");
privMsg( "^1To See When Your Ban Is Over Visit");
privMsg( "^2http://supercr3w.ning.com/page/user-report-sys" );
cmdLFS("/spec " . $userName );
ENDIF
EndEvent

Tim NL
2nd September 2009, 00:31
Hi,
I use this on my servers for people who are not welcome.
Just put a file whith the usernames in a txt file in the default dir.


Event OnConnect() # Player event
$Username = GetCurrentPlayerVar("Username");

UserGroupFromFile( "notwelcome", "./notwelcome.txt" );
IF( UserInGroup( "notwelcome",$Username ) == 1 )
THEN
cmdLFS( "/ban " . $Username . " 99" );
ENDIF

Krayy
2nd September 2009, 01:19
5.8.4.5
EX i have
...<snip>...
I like that...mind if I "borrow" it :shrug:

Fire_optikz001
2nd September 2009, 02:53
I like that...mind if I "borrow" it :shrug:
not at all :D