-
Notifications
You must be signed in to change notification settings - Fork 1
/
key.pl
47 lines (38 loc) · 1.07 KB
/
key.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# external, sysop key menu
$version="1.0";
$form{'j'}="Zd-86400"; #key
$f=0;
# hardcode sysop names here
if(lc($player{'name'}) eq "joe") { $f=1; }
if(lc($player{'name'}) eq "heather") { $f=1; }
if(lc($player{'name'}) eq "quaczar") { $f=1; }
if(lc($player{'name'}) eq "warkings") { $f=1; }
if (lc($server) eq "anarchy"){
if (lc($player{'name'}) eq "usmarine") { $f=1; }
if (lc($player{'name'}) eq "taz") { $f=1; }
}
#
# this line activtes all player servers
# if (lc($server) eq lc($player{'name'}) { $f=1; }
#
if ($server eq "demo") { $f=1; }
if ($f) {
($item,$estamp)=split(/\-/,$form{'j'});
$slot=index($player{'inven'},"Za");
if (substr($player{'inven'},$slot,2)eq'Za') {
if ($slot>-1) {
if($item=~/^[A-Z][0-9a-z]$/){
$player{'inven'}=substr($player{'inven'},0,$slot).$item.sprintf("%08x",+$cstamp+$estamp).substr($player{'inven'},$slot+10);
do 'inv.pl';
print "dinv=1\n";
} else {
print "pop=invalid item\n";
}
} else {
print "pop=mismatch\n";
}
} else {
print "pop=no space $f\n";
}
}
1;