Most of the plugins here are made by B3 users and the authors may not visit frequently. If you need support for plugins or if questions remain unanswered, you will have to contact the author directly. Read the full Support Disclaimer here
NOTE: Do not attach plugins to your forumtopics! Attachements are periodically removed by maintenance tasks. Upload your plugins to our Downloads section instead!

You are here: Big Brother Bot ForumAdd-OnsPlugins Discussion (Moderator: MordyT)Auto-kick spectators request
Pages: [1]   Go Down
  Print  
Author Topic: Auto-kick spectators request  (Read 840 times) Bookmark and Share
Beta Testers
*
OS: Windows
Type: Gameserver Rental Co.
Gameservers: 3 CoD4, 1 MoH, 1 BC2, and 2 BO
Posts: 158
Offline Offline
WWW
« on: September 17, 2010, 10:28:20 AM »

Until I start attempting to create my own plug-ins, just wondering if its possible, or if anyone would be willing to create an auto-kick spectators plug-in for CoD4. If its possible, it'd be great to be able to set the amount of time a player can stay in spectate mode before it kicks them. I know !warn can warn, remove, and tempban a player for a configurable amount of time, however I would like to see one that does so automatically in the event an admin isn't available.

Thanks everyone, keep up the good work!
Logged


Former Dev. (senate)
*****
OS: Linux
Type: Owner dedicated server(s)
Gameservers: OpenArena
Posts: 258
Offline Offline
« Reply #1 on: September 17, 2010, 03:46:22 PM »

Yes it's possible, but I don't know if the parser will give you all the necessary infos.

Normally, the current group of a user is stored in each client object (if the parser for your game includes this function).

And when the user is switching, you can use the events EVT_CLIENT_TEAM_CHANGE and EVT_CLIENT_JOIN.

Another thing, is that you can store any data for any client you want, take a look at the plugins/stats.py to see an example. So basically, what you can do is from the moment they connect to the Spectator team, you set the current time and store it the client's infos, then regularly dump the server (each 5 seconds for example) and see who is still in spectator, and compare the current time against the time you stored. To dump regularly, you can use the scheduler function of B3, you can take a look at plugins/adv.py for an example.

But this way would not be ressource efficient. Maybe there is another way than dumping yourself the server's infos each 5 seconds ?
Logged
Beta Testers
*
OS: Windows
Type: Gameserver Rental Co.
Gameservers: 3 CoD4, 1 MoH, 1 BC2, and 2 BO
Posts: 158
Offline Offline
WWW
« Reply #2 on: September 17, 2010, 05:24:09 PM »

Hmm..i would look at plugin_adv, but for whatever reason I can't get b3 to load when i try to use it. All the other plugins work though.
Logged

Former Dev. (senate)
*****
OS: Linux
Type: Owner dedicated server(s)
Gameservers: OpenArena
Posts: 258
Offline Offline
« Reply #3 on: September 22, 2010, 06:16:09 AM »

Hmm..i would look at plugin_adv, but for whatever reason I can't get b3 to load when i try to use it. All the other plugins work though.

The "Load an external XML banner file" doesn't work, you have to include your banners directly inside plugin_adv.xml
Logged
Tags:
Pages: [1]   Go Up
  Print  
 
Jump to:  


Rate this page +1 at Google Search


SimplePortal 2.3.1 © 2008-2009, SimplePortal