Raised This Month: $100 Target: $400
 25% 

Plugin Autoloader v1.0


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Server Management        Approver:   sawce (9)
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 02-14-2007 , 21:34   Plugin Autoloader v1.0
Reply With Quote #1

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.
Attached Files
File Type: sma Get Plugin or Get Source (plugin_autoloader.sma - 2567 views - 3.1 KB)
__________________

Last edited by Hawk552; 02-16-2007 at 15:02.
Hawk552 is offline
Send a message via AIM to Hawk552
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 02-15-2007 , 15:04   Re: Plugin Autoloader v1.0
Reply With Quote #2

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...
__________________
Arkshine is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 02-15-2007 , 16:25   Re: Plugin Autoloader v1.0
Reply With Quote #3

It AUTOMATICALLY LOADS plugins based on what's in the /plugins/ directory. With what you said, you have to manually type out each plugin.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Phantom Warrior
BANNED
Join Date: Feb 2007
Location: hello, gaben
Old 02-15-2007 , 16:56   Re: Plugin Autoloader v1.0
Reply With Quote #4

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.
Phantom Warrior is offline
lunarwolfx
Member
Join Date: Feb 2005
Old 02-15-2007 , 17:43   Re: Plugin Autoloader v1.0
Reply With Quote #5

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.
lunarwolfx is offline
slmclarengt
Veteran Member
Join Date: Jul 2004
Location: The Cookie Jar... or Pul
Old 02-15-2007 , 22:27   Re: Plugin Autoloader v1.0
Reply With Quote #6

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
__________________
But we donít beat the Reaper by living longer. We beat the Reaper by living well. -Dr. Randy Pausch, R.I.P.

Come play WC3:FT on BnD Clan Server! You know you want to: Connect to WC3:FT BnD - go ahead click me!
slmclarengt is offline
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 02-16-2007 , 13:13   Re: Plugin Autoloader v1.0
Reply With Quote #7

its cool but i have alot of junk in my plugins folder
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
Simon Logic
Senior Member
Join Date: Nov 2006
Location: RF
Old 02-16-2007 , 14:54   Re: Plugin Autoloader v1.0
Reply With Quote #8

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)
__________________
my modest stuff: AXN 1.6.1 | plugins | bsp2csdm
Simon Logic is offline
Send a message via Skype™ to Simon Logic
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 02-16-2007 , 15:02   Re: Plugin Autoloader v1.0
Reply With Quote #9

Quote:
Originally Posted by Simon Logic View Post
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.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Old 02-16-2007, 20:28
Arkshine
This message has been deleted by Hawk552. Reason: that's nice
FormulaZero
BANNED
Join Date: Feb 2007
Location: Sector 7G
Old 02-17-2007 , 14:30   Re: Plugin Autoloader v1.0
Reply With Quote #10

I love it Hawk, very nice.
FormulaZero is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:56.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode