AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Plugin Autoloader v1.0 (https://forums.alliedmods.net/showthread.php?t=51281)

Hawk552 02-14-2007 20:34

Plugin Autoloader v1.0
 
1 Attachment(s)
Plugin Autoloader

Description
This plugin is designed to automatically load all plugins in the ./plugins/ directory. It allows making exceptions (such as not loading certain plugins, debugging them, pausing them on load, and not touching any plugins listed in the plugins.ini).

Installation
In your ./configs/ directory, create a file called "autoloader.ini". In this file, add any exceptions you want to make that aren't listed in your plugins.ini. The syntax is as follows (you can copy this into the file if you want, just make sure you add a ';' before every 'myplugin'):

Code:

; Do not load this plugin
myplugin.amxx unload

; Debug this plugin
myplugin.amxx debug

; Pause this plugin on load
myplugin.amxx pause

Additional Information
Any plugins not listed here or in the plugins.ini file will be automatically loaded.

Leave the "plugins-autoloader.ini" file that this plugin creates alone. It is used for autoloading, and any modifications to it will be lost on map change / server crash, etc.

Arkshine 02-15-2007 14:04

Re: Plugin Autoloader v1.0
 
I don't understand this plugin.

With Amxx 1.76+ you can use a per-map plugins files. And unload / pause / debug a plugin easily. http://wiki.amxmodx.org/index.php/AM..._File_Features

So it's useless.

It's useful for users which have Amxx 1.75- ...

But the latest Amxx version is 1.76c... Sorry if I haven't understood...

Hawk552 02-15-2007 15:25

Re: Plugin Autoloader v1.0
 
It AUTOMATICALLY LOADS plugins based on what's in the /plugins/ directory. With what you said, you have to manually type out each plugin.

Phantom Warrior 02-15-2007 15:56

Re: Plugin Autoloader v1.0
 
Say you have gungame.sma in your plugins directory with this plugin you don't have to write the name 'gungame.amxx' into your plugins.ini.

But of course, you have to type this into your plugins.ini From then on, you just have to COPY AND PASTE the .sma file to your plugins directory. and so on.

lunarwolfx 02-15-2007 16:43

Re: Plugin Autoloader v1.0
 
Quote:

Say you have gungame.sma in your plugins directory with this plugin you don't have to write the name 'gungame.amxx' into your plugins.ini.
I think you mean gungame.amxx not gungame.sma.

slmclarengt 02-15-2007 21:27

Re: Plugin Autoloader v1.0
 
If I understand Hawk552 correct, which I think I do, it works as follows.

If you have a plugin say "gameplugin.amxx" in your PLUGINS FOLDER, you no longer need to type the name "gameplugin.amxx" into your PLUGINS.INI. Therefore, with his plugin you can just place a plugin inside of the plugins folder on the server and it will be automatically loaded when you next restart. Now, this has it's exceptions as described by Hawk552 in his first post. To provide special instructions to this auto-loading plugin, make the necessary modifications as described in sub-section "Installation" in the box, it clarifies and demonstrates the process by which plugins are given special loading instructions.

Slmclarengt

kp_uparrow 02-16-2007 12:13

Re: Plugin Autoloader v1.0
 
its cool but i have alot of junk in my plugins folder :(

Simon Logic 02-16-2007 13:54

Re: Plugin Autoloader v1.0
 
Hawk, reading 'This plugin is designed to autoload other plugins' is really hard to understand the main idea. After searching the code & founding 'read_dir()' function i believed what Phantom Warrior & slmclarengt just said. May be rewrite info to 'This plugin is designed to automatically load every plugin from PLUGINS folder' or smth similar?

Also may be there is a sense to implement this functionality into standard amx/x plugin in future. Plus add a possibility to switch what algorithm is preferred by admin:
a) autoload all plugins from special folder, using file with exceptions
b) use single plugins.ini file (currently)

Hawk552 02-16-2007 14:02

Re: Plugin Autoloader v1.0
 
Quote:

Originally Posted by Simon Logic (Post 441182)
Hawk, reading 'This plugin is designed to autoload other plugins' is really hard to understand the main idea. After searching the code & founding 'read_dir()' function i believed what Phantom Warrior & slmclarengt just said. May be rewrite info to 'This plugin is designed to automatically load every plugin from PLUGINS folder' or smth similar?

Also may be there is a sense to implement this functionality into standard amx/x plugin in future. Plus add a possibility to switch what algorithm is preferred by admin:
a) autoload all plugins from special folder, using file with exceptions
b) use single plugins.ini file (currently)

I rewrote that section. I wrote this plugin because BAILOPAN has said many times that he will never even consider adding this functionality, but I think personally that it can be useful.

FormulaZero 02-17-2007 13:30

Re: Plugin Autoloader v1.0
 
I love it Hawk, very nice.


All times are GMT -4. The time now is 11:06.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.