Thread: Oops!
View Single Post
Oops!
Old
  (#1)
Lazy
Member
 
Lazy's Avatar
 
Status: Offline
Posts: 236
Join Date: Jan 2004
Location: Toronto, Ontario, Canada
Default Oops! - 15-07-2004

The name of the thread does not mean this is a mistake or error, its about an idea.
With metamod plugins you must write out ( or copy ) several exported functions, API tables, ect... Seems like overkill if you just want to write a chat filter plugin don't you think?

This is where OOPS ( Object-Oriented Plugin System ) comes in.
A plugin is created by inheriting from a base class called CPluginBase and overriding the methods they would like to hook.
All plugins will have to export a function called "CreateInstance" which returns a CPluginBase pointer to an instance their plugin class.

Information about the plugin like the title, author, date, ... would be setup by overriding the "GetInfo" method of your class rather than the host plugin ( metamod/oops ) having to lookup and execute a query function.

This is just a small idea I came up with late last night and was wondering wether or not it's worth it to write something like this.

Note: If this thread is in the wrong place I apologize, I figured it would be better here since the plugin loader would be a metamod plugin itself.
  
Reply With Quote