Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
autoload.pl
Package: openkore-2.0.7.zip [view]
Upload User: market2
Upload Date: 2018-11-18
Package Size: 18786k
Code Size: 2k
Category:
Game Hook Crack
Development Platform:
Windows_Unix
- #!/usr/bin/env perl
- use strict;
- use FindBin qw($RealBin);
- if ($ARGV[0] eq '' || $ARGV[0] eq '--help' || $ARGV[0] !~ /^(on|off|status)$/) {
- print "Usage: autoload.pl <on|off|status>n";
- print "Enable or disable autoloading.n";
- exit;
- }
- chdir "$RealBin/..";
- my @files = qw(Commands.pm Skills.pm Match.pm Misc.pm Network/Send.pm
- functions.pl ChatQueue.pm FileParsers.pm Utils.pm
- IPC/Processors.pm Log.pm Interface.pm Plugins.pm
- Settings.pm);
- if ($ARGV[0] eq 'on') {
- foreach my $file (@files) {
- if (!open(F, "< $file")) {
- print STDERR "Cannot open $file for reading.n";
- exit 1;
- }
- local($/);
- my $data = <F>;
- close F;
- $data =~ s/^# use SelfLoader;/use SelfLoader;/m;
- $data =~ s/^# __DATA__/__DATA__/m;
- if (!open(F, "> $file")) {
- print STDERR "Cannot open $file for writing.n";
- exit 1;
- }
- print F $data;
- close F;
- }
- print "Autoloading enabled.n";
- } elsif ($ARGV[0] eq 'off') {
- foreach my $file (@files) {
- if (!open(F, "< $file")) {
- print STDERR "Cannot open $file for reading.n";
- exit 1;
- }
- local($/);
- my $data = <F>;
- close F;
- $data =~ s/^use SelfLoader;/# use SelfLoader;/m;
- $data =~ s/^__DATA__/# __DATA__/m;
- if (!open(F, "> $file")) {
- print STDERR "Cannot open $file for writing.n";
- exit 1;
- }
- print F $data;
- close F;
- }
- print "Autoloading disabled.n";
- } else {
- open(F, "< $files[0]");
- local($/);
- my $data = <F>;
- close F;
- if ($data =~ /^use SelfLoader/) {
- print "Autoloading is currently: enabledn";
- } else {
- print "Autoloading is currently: disabledn";
- }
- }