Raised This Month: $51 Target: $400
 12% 

Making things more modular


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
EKS
Veteran Member
Join Date: Mar 2004
Location: Norway
Old 02-07-2006 , 20:02   Making things more modular
Reply With Quote #1

One of the goals with BAT long was to make things more modular, so 1 plugin dont have to do everything on your server.
Lots of plugins that are coded may require admin interaction like ( http://forums.alliedmods.net/showthread.php?t=39303 ) , so i was thinking. Those of us that write Admin plugin perhaps we should make a public interface for them that other plugin writers can interface with?

I personaly plan to add it to BAT, but i was thinking perhaps all the admin plugins should have a commen basic interface at least. So other plugin writers can easly interact check if a user has admin.

So my question is, would the other admin plugin authors be interested in adding a system like this? ( Is it even technicaly posible to make)

And would the other plugin authors bother using it?


For the basic interface, im thinking we should export somethign like
IsUserAdmin
SetUserAdminFlags
GetUserAdminFlags
KickUser
BanUser
SlapUser

Any feedback welcome
EKS is offline
BAILOPAN
Join Date: Jan 2004
Old 02-07-2006 , 21:32  
Reply With Quote #2

I think devicenull did something like this with his plugin.
__________________
egg
BAILOPAN is offline
[email protected]
Member
Join Date: Dec 2005
Old 02-15-2006 , 09:12  
Reply With Quote #3

I've been trying something like this, but I'm running into a problem. I've created my interface class, and an implementation of it, then EXPOSE_SINGLE_INTERFACE of it in one plugin. In another plugin, I try to use CreateInterface( "intreface's version here", NULL ) to load it, but it wont load the interface. CreateInteface works fine withing the plugin that exposes the interface. I thought maybe it was something to do with which order the plugins were loading, so i tried just having the exporting plugin loaded, then manually load the one that's trying to use the interface, but still nothing. I don't know if anyone has tried to do something like this before, any ideas?
Lojo.jacob@gmail.com is offline
BAILOPAN
Join Date: Jan 2004
Old 02-15-2006 , 09:46  
Reply With Quote #4

Because you don't have the actual plugin's CreateInterface function. PS - this isn't a general HL2 Coding site, it's SourceMM, so please take Valve Server Plugin specific questions elsewhere.
__________________
egg
BAILOPAN is offline
devicenull
Veteran Member
Join Date: Mar 2004
Location: CT
Old 02-24-2006 , 22:16  
Reply With Quote #5

Quote:
Originally Posted by BAILOPAN
I think devicenull did something like this with his plugin.
I did.. but I don't exactly like the way mine's done.. it segfaults the server when yu exit the server (I know why too, it's just a big pain to fix)

While it may be possible, I don't know how much use it would get.
__________________
Various bits of semi-useful code in a bunch of languages: http://code.devicenull.org/
devicenull is offline
TommyV
Member
Join Date: Nov 2005
Old 04-06-2006 , 11:38  
Reply With Quote #6

This really would be a nice thing to have. But it wouldn't catch on unless either mani or a couple of other more widely used admin plugins used it.

I noticed devicenull's Admin Manager plugin didn't even get one reply, which is a shame as it's a really good idea. I guess people aren't so interested in taking a more modula approach to admin plugins
TommyV is offline
c0ldfyr3
AlliedModders Donor
Join Date: Aug 2005
Location: Ireland
Old 04-06-2006 , 14:00  
Reply With Quote #7

I implemented it into SprayMod but didn't release because of the crash bug and no other plugins are using it so I don't want to use the first couple of flags for SprayMod functionality :\
__________________
c0ldfyr3 is offline
Send a message via MSN to c0ldfyr3 Send a message via Yahoo to c0ldfyr3
EKS
Veteran Member
Join Date: Mar 2004
Location: Norway
Old 04-06-2006 , 15:03  
Reply With Quote #8

I have allready talked to mani, and we agreed upon a "API" for this system. I have allready added it to the next beta of BAT, and im waiting for Mani to take a final look at it before its released.

I agree there is no point in a system like this unless Mani adds it, as it has 90% of the server marked. Once the interface is "done" il post it here
EKS is offline
sslice
Senior Member
Join Date: Feb 2005
Location: Texas, USA
Old 04-06-2006 , 17:30  
Reply With Quote #9

Ah, nice.. this should give other plugins much more functionality without people having to create their own administration system.
__________________
sslice is offline
L. Duke
Veteran Member
Join Date: Apr 2005
Location: Walla Walla
Old 04-06-2006 , 18:43  
Reply With Quote #10

I've been thinking of redoing my chicken plugin at some point. It would be nice to use an existing admin system, especially if it was already in use by MAP or BAT on the server so they didn't have to setup anything else.
L. Duke is offline
Reply



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 10:47.


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