Raised This Month: $14 Target: $400
 3% 

Regular Custom Configs


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Server Management       
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 03-23-2005 , 12:36   Regular Custom Configs
Reply With Quote #1

An advanced tool for executing specific config files based on regular expression patterns matched with the current map name.

Think of it, you can easily have a config file executed for all maps starting with "ky_*", "fy_*" and so on. Actually, there really is much more to it than that. Read the ini file for info on how to set it up.

This is an example line from the ini file:

Quote:
^de_ addons/amxmodx/configs/configs_de.cfg
It executes that cfg file on all maps that begin with de_ ...
You could add "(?i)ice addons/amxmodx/configs/configs_ice.cfg" to have it execute that file on all maps containing ice (in their names;-)). The (?i) part is to make the pattern case insensitive.


Requires the REGEXP module. Enable it in configs/modules.ini.

Note: you can use the command "amx_regex <string> <pattern>" to try patterns out before you enter them into your ini file.

Syntax of the Perl Compatible Regular Expressions, PCRE: http://www.perldoc.com/perl5.8.0/pod/perlre.html
Attached Files
File Type: zip regularcustomconfigs.zip (9.8 KB, 343 views)
Johnny got his gun is offline
XxKpAznGuyxX
Senior Member
Join Date: Dec 2004
Location: EARTH!!
Old 03-23-2005 , 13:11  
Reply With Quote #2

really nice plugin since I have alot of FY maps and I have to restrict all the buying and it takes alot of space this just takes little space
__________________
24/7 Chicago Terror-8.9.2.120:27015
XxKpAznGuyxX is offline
Send a message via AIM to XxKpAznGuyxX Send a message via MSN to XxKpAznGuyxX
ToT | V!PER
Senior Member
Join Date: Jun 2004
Location: Germany
Old 03-23-2005 , 13:21  
Reply With Quote #3

Could you use

addons/amxmodx/configs/maps folder as the default plugin uses?
ToT | V!PER is offline
Send a message via ICQ to ToT | V!PER
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 03-23-2005 , 13:25  
Reply With Quote #4

You can use any path within the mod directory.
Johnny got his gun is offline
ToT | V!PER
Senior Member
Join Date: Jun 2004
Location: Germany
Old 03-23-2005 , 13:39  
Reply With Quote #5

Quote:
Originally Posted by Johnny got his gun
You can use any path within the mod directory.
My fault, should have taken a look into the archive first...
ToT | V!PER is offline
Send a message via ICQ to ToT | V!PER
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 03-23-2005 , 14:04  
Reply With Quote #6

You really love regex dont you?

You really should do a server_exec() after you execute the server_cmd too.
Could lead to problems.

In any case, nice work.

(yay emoticons)
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 03-23-2005 , 14:19  
Reply With Quote #7

Someone asked for this in the irc channel, and I made it... but he left before I was done.
Of course I could've invented my own format. But why invent the wheel twice. Face it, regexp is there to be loved by you.

server_exec is only needed to perform a execution right away before proceeding with the next statement. Else it executes that when the function calling it ends. Which should be safe in my case. :-)
Johnny got his gun is offline
rex
Senior Member
Join Date: Mar 2004
Location: Australia
Old 03-27-2005 , 03:55  
Reply With Quote #8

good work Johnny, just what i am looking for.
__________________
Come and join us at Cricket Manager
http://boundary.cricketmanager.co.uk...t Manager Fans
rex is offline
Send a message via MSN to rex
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 04-08-2005 , 15:48  
Reply With Quote #9

0.2 up... some minor touchups. I forgot what they were, likely not that important. :-)
Johnny got his gun is offline
Dorksville
Senior Member
Join Date: Feb 2005
Location: in my bed
Old 04-08-2005 , 16:04  
Reply With Quote #10

thats pretty cool plugin nice one
__________________
damn right i am good in bed i can sleep for hours
Dorksville is offline
Send a message via MSN to Dorksville
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 04:39.


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