thankyou
Donate to the B3 fund!

"even a small donation helps!"
Donate with PayPal!
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!

Author Topic: TagProtect Plugin  (Read 23105 times)

Offline PtitBigorneau

  • Moderator
  • Sr. Member
  • *
  • Posts: 194
    • www.ptitbigorneau.fr
TagProtect Plugin
« on: September 28, 2010, 06:02:27 PM »

There was already a plugin to protect the tag of a team or clan 'clantag'
but impossible to download this plugin then here is my plugin to protect the tag teams or clans

TagProtect Plugin v1.2

It protects 2 tags
first tag . exact tag of team
second tag  . second tag (for members in test by exemple)

3 commands :

- !listmemberclan or !ltmc For see the list of members of the team who are authorized to wear the tag.

- !addct [name] To make list of members of the team who are authorized to wear the tag.
- !delct [name] For delete a menber from the list.

exmple for my clan 'The Pirate Family'

clan name 'The Pirate Family'
exact tag '-[TPF]-'
second tag '-[TPF-T]-' for members in test
approximate tag 'tpf'

if the player is not registered and connects with as nickname :

-[TPF]-nickname or -[tpf]-nickname -> player banned
nickname-[TPF]- or nickname-[tpf]- -> player banned

-[TPF-T]-nickname or -[tpf-t]-nickname -> player banned
nickname-[TPF-T]- or nickname-[tpf-t]- -> player banned

tpfnickname or TPFnickname -> kicked
nicknametpf or nicknameTPF -> kicked
nicknametpfnickname -> no kicked no banned
nickname-tpf-nickname -> kicked

in tagprotect.xml , possibility to disable or enable the ban for exact tag and second tag 

banactived = yes -> if a player is not registered as a member of the team and he wears the exact tag, he is banned
banactived = no ->if a player is not registered as a member of the team and he wears the exact tag, he is kicked with a message inviting him to contact the administrator

useful function when the all members of a team is not registered

Installation:

1. Place the tagprotect.py in your ../b3/extplugins and the
tagprotect.xml in your ../b3/extplugins/conf folders.

2. Open your B3.xml file (default in b3/conf) and add the next line in the
<plugins> section of the file:

<plugin name="tagprotect" config="@b3/extplugins/conf/tagprotect.xml"/>

3. Open tagprotect.xml

modify clan name (exemple : The Pirate Family )
modify tag exact (exemple : -[TPF]- )
modify second tag (exemple : -[TPF-T]- for test member by exemple)
modify approximate tag (exemple tpf )
modify banactived yes/no

4. Run the contact SQL script (tagprotect.sql) on your B3 database

download -> tagprotect

Sorry for my English
« Last Edit: September 28, 2010, 06:04:40 PM by PtitBigorneau »
PtitBigorneau

Offline MordyT

  • Support Hero
  • Hero Member
  • *
  • Posts: 3644
  • Over $300 Donated to B3!
    • MordyT
Re: TagProtect Plugin
« Reply #1 on: September 29, 2010, 12:27:52 AM »
Hmm...

Maybe I am missing something...
Code: [Select]
<configuration plugin="tagprotect">
    <settings name="settings">
<!--min level required for administration tagprotect -->
        <set name="ctadminlevel">100</set>
<!--min level required to use the listclan command -->
        <set name="listclanlevel">40</set>
<!--clan, team name -->
        <set name="clanname">RvO</set>
<!--clan, team exact tag exemple -[TPF]- -->
        <set name="clanexacttag">RvO</set>
<!--clan, team secondary tag exemple -[TPF-T]- for test member-->
        <set name="clansecondtag">RvO[*]</set>
<!--clan, team approximate tag exemple TPF -->
        <set name="clanapprotag">RvO</set>
<!--ban actived yes/no-->
        <set name="banactived">no</set>        
        </settings>
</configuration>


If I connect to the server and am not in the list.... and my name is
Code: [Select]
 RvO[*]Mordy
, shouldn't it kick me?

P.S. Parts of B3 Log...

Code: [Select]
100928 15:16:47    BOT        www.BigBrotherBot.com (b3) v1.3.3 [nt] (Daniel)
100928 15:16:47    BOT        Python: 2.6.4 (r264:75708, Oct 26 2009, 07:36:50) [MSC v.1500 64 bit (AMD64)]
100928 15:16:47    BOT        Starting Cod4Parser v1.3.2 for server <snip>
100928 15:16:47    BOT        --------------------------------------------
100928 15:16:47    BOT        Attempting to connect to database <snip>...
100928 15:16:47    BOT        Connected to database [1 times]
100928 15:16:47    BOT        Working in Remote-Log-Mode : <snip>
100928 15:16:47    BOT        Starting bot reading file games_mp.log
100928 15:16:47    BOT        Loading Plugins (external plugin directory: <snip>\b3\extplugins)
100928 15:16:47    BOT        Loading Plugin #1 admin [@conf\plugin_admin.xml]
100928 15:16:47    BOT        AdminPlugin: Loading config @conf\plugin_admin.xml for AdminPlugin
100928 15:16:47    DEBUG    Register Event: Stop Process: AdminPlugin
100928 15:16:47    DEBUG    Register Event: Program Exit: AdminPlugin
100928 15:16:47    BOT        Plugin admin (1.7 - ThorN, xlr8or, Courgette) loaded
100928 15:16:47    BOT        Loading Plugin #2 punkbuster [@conf\plugin_punkbuster.xml]
100928 15:16:47    BOT        PunkbusterPlugin: Loading config @conf\plugin_punkbuster.xml for PunkbusterPlugin
100928 15:16:47    VERBOSE    Added crontab <bound method PunkbusterPlugin.rebuildBans of <b3.plugins.punkbuster.PunkbusterPlugin instance at 0x0000000001C1EB88>> (29473032) - 0s 0m 0h -1d -1M -1DOW
100928 15:16:47    DEBUG    Register Event: Stop Process: PunkbusterPlugin
100928 15:16:47    DEBUG    Register Event: Program Exit: PunkbusterPlugin
100928 15:16:47    BOT        Plugin punkbuster (1.0.8 - ThorN) loaded
100928 15:16:47    BOT        Loading Plugin #3 antinoob [<snip>\b3\extplugins\conf\plugin_antinoob.xml]
100928 15:16:47    INFO    Could not load built in plugin antinoob (No module named antinoob)
100928 15:16:47    INFO    trying external plugin directory :<snip>\b3\extplugins
100928 15:16:47    BOT        AntinoobPlugin: Loading config <snip>\b3\extplugins\conf\plugin_antinoob.xml for AntinoobPlugin
100928 15:16:47    DEBUG    AntinoobPlugin: Loading Configuration Started
100928 15:16:47    DEBUG    AntinoobPlugin: _warndurationdefault: 5
<snip>
100928 15:16:47    DEBUG    AntinoobPlugin: Loading Configuration Finished
100928 15:16:47    DEBUG    Register Event: Stop Process: AntinoobPlugin
100928 15:16:47    DEBUG    Register Event: Program Exit: AntinoobPlugin
100928 15:16:47    BOT        Plugin antinoob (1.0.8 - Anubis) loaded
100928 15:16:47    BOT        Loading Plugin #4 tagprotect <snip>\b3\extplugins\conf\tagprotect.xml]
100928 15:16:47    INFO    Could not load built in plugin tagprotect (No module named tagprotect)
100928 15:16:47    INFO    trying external plugin directory : <snip>\b3\extplugins
100928 15:16:47    BOT        TagprotectPlugin: Loading config <snip>\b3\extplugins\conf\tagprotect.xml for TagprotectPlugin
100928 15:16:47    DEBUG    AdminPlugin: Command "addct (None)" registered with cmd_addct for level (100, 100)
100928 15:16:47    DEBUG    AdminPlugin: Command "delct (None)" registered with cmd_delct for level (100, 100)
100928 15:16:47    DEBUG    AdminPlugin: Command "listmemberclan (ltmc)" registered with cmd_listmemberclan for level (40, 100)
100928 15:16:47    DEBUG    Register Event: Stop Process: TagprotectPlugin
100928 15:16:47    DEBUG    Register Event: Program Exit: TagprotectPlugin
100928 15:16:47 BOT     Plugin tagprotect (1.2 - PtitBigorneau www.ptitbigorneau.fr) loaded
100928 15:16:47 BOT     Loading Plugin publist
100928 15:16:47 BOT     PublistPlugin: No config file found for PublistPlugin. (was not required either)
100928 15:16:47 DEBUG Register Event: Stop Process: PublistPlugin
100928 15:16:47 DEBUG Register Event: Program Exit: PublistPlugin
100928 15:16:47 BOT     Plugin publist (1.5 - ThorN, Courgette) loaded
100928 15:16:47 BOT     Loading Plugin ftpytail
Obviously it is loading...
Then, when I connect:
Code: [Select]
100928 15:22:53    BOT        Client found in storage 2, welcome back RvO[*]Mordy
100928 15:22:53    DEBUG    Storage: setClient <b3.clients.Client object at 0x0000000001D4DEB8>
100928 15:22:53    DEBUG    Storage: setClient data {'time_add': 1279059086, 'time_edit': 1285712573, 'name': 'RvO[*]Mordy', 'group_bits': 128, 'ip': '', 'auto_login': 1, 'greeting': '', 'pbid': '', 'connections': 359, 'mask_level': 0, 'guid': '', 'id': 2}
100928 15:22:53    DEBUG    Client Authorized: [2] RvO[*]Mordy -
100928 15:22:54    VERBOSE    Queueing event Client Authenticated <b3.clients.Client object at 0x0000000001D4DEB8>
100928 15:22:54    VERBOSE    Parsing Event: Client Authenticated: TagprotectPlugin
So it seems to have authenticated me somehow... but how? I did not add myself at that point...
« Last Edit: September 29, 2010, 12:37:54 AM by MordyT »
Help will be given to those with a b3.log

If drop off the map it is due to RL becoming busy :)

System: Python 2.7.3 - Deb 7 - B3 Source Code - 128MB RAM box (rented at $5 a year) - remote MySQL - Remote Web Services

Offline PtitBigorneau

  • Moderator
  • Sr. Member
  • *
  • Posts: 194
    • www.ptitbigorneau.fr
Re: TagProtect Plugin
« Reply #2 on: September 29, 2010, 10:02:06 AM »
you are super admin?

there is a protection for super admin, this is normal if super admin is not kicked
PtitBigorneau

Offline MordyT

  • Support Hero
  • Hero Member
  • *
  • Posts: 3644
  • Over $300 Donated to B3!
    • MordyT
Re: TagProtect Plugin
« Reply #3 on: September 29, 2010, 06:21:59 PM »
Is there protection for admins and mods as well?
I am super admin, but my admins can connect as well without issue...

*Via my HTC EvO 4G*
Help will be given to those with a b3.log

If drop off the map it is due to RL becoming busy :)

System: Python 2.7.3 - Deb 7 - B3 Source Code - 128MB RAM box (rented at $5 a year) - remote MySQL - Remote Web Services

Offline PtitBigorneau

  • Moderator
  • Sr. Member
  • *
  • Posts: 194
    • www.ptitbigorneau.fr
Re: TagProtect Plugin
« Reply #4 on: September 29, 2010, 06:59:11 PM »
no just super admin level 100

other levels must be registered

on my servers, I have admins who are not in my clan
therefore not allowed to wear the tag

PtitBigorneau

Offline ryry46d9

  • B3 Contrib/Support
  • Sr. Member
  • *
  • Posts: 337
    • Pb| clan
Re: TagProtect Plugin
« Reply #5 on: December 20, 2010, 06:10:21 AM »
Any chance of making a white list instead?

Offline PtitBigorneau

  • Moderator
  • Sr. Member
  • *
  • Posts: 194
    • www.ptitbigorneau.fr
Re: TagProtect Plugin
« Reply #6 on: December 21, 2010, 11:46:04 AM »
white list ?
PtitBigorneau

Offline MordyT

  • Support Hero
  • Hero Member
  • *
  • Posts: 3644
  • Over $300 Donated to B3!
    • MordyT
Re: Re: TagProtect Plugin
« Reply #7 on: December 21, 2010, 07:24:09 PM »
It already is whitelist; you create a list of who is allowed to wear the tag.

*Via my HTC EvO 4G*
Help will be given to those with a b3.log

If drop off the map it is due to RL becoming busy :)

System: Python 2.7.3 - Deb 7 - B3 Source Code - 128MB RAM box (rented at $5 a year) - remote MySQL - Remote Web Services

Offline PtitBigorneau

  • Moderator
  • Sr. Member
  • *
  • Posts: 194
    • www.ptitbigorneau.fr
Re: TagProtect Plugin
« Reply #8 on: December 21, 2010, 10:41:20 PM »
command

!addct [name or id player]
PtitBigorneau

Offline ryry46d9

  • B3 Contrib/Support
  • Sr. Member
  • *
  • Posts: 337
    • Pb| clan
Re: TagProtect Plugin
« Reply #9 on: December 22, 2010, 12:05:23 AM »
That's would be OK for a small 1-2 server clan. but my clan Pb| has 6 server and 28 members, while  |WC| they have 26ish + servers on B3 and too many to count members.

I did run in to a problem trying to add a member, the bot kept on banning him. I made the mistake of not saving the log file :(
If I run in to it again I'll post some info

Offline PtitBigorneau

  • Moderator
  • Sr. Member
  • *
  • Posts: 194
    • www.ptitbigorneau.fr
Re: TagProtect Plugin
« Reply #10 on: December 22, 2010, 01:39:03 PM »
with multiple servers and with many members, this is a big job to implement the plugin tagprotect

the solution is to record all the members id for each server

after create tables with tagprotec.sql for every database

with phpmyadmin and enter id for every database

after you can install the plugin tagprotect without the clan members were kicked or banned


and I remember the option banactived in tagprotect.xml , possibility to disable or enable the ban for exact tag and second tag  

banactived = yes -> if a player is not registered as a member of the team and he wears the exact tag, he is banned
banactived = no ->if a player is not registered as a member of the team and he wears the exact tag, he is kicked with a message inviting him to contact the administrator


sorry for my english



PtitBigorneau

Offline ryry46d9

  • B3 Contrib/Support
  • Sr. Member
  • *
  • Posts: 337
    • Pb| clan
Re: TagProtect Plugin
« Reply #11 on: December 22, 2010, 02:52:55 PM »
yeah setting up the |WC| servers are going to be pain full  :P

Offline epiacum

  • Jr. Member
  • **
  • Posts: 42
Re: TagProtect Plugin
« Reply #12 on: January 26, 2011, 01:24:14 PM »
!addct doesnt get recognised, could this be down to a mistake in my plugin list order ib b3?

Offline PtitBigorneau

  • Moderator
  • Sr. Member
  • *
  • Posts: 194
    • www.ptitbigorneau.fr
Re: TagProtect Plugin
« Reply #13 on: January 27, 2011, 10:59:06 AM »
can you post your b3.log ?
PtitBigorneau

Offline epiacum

  • Jr. Member
  • **
  • Posts: 42
Re: TagProtect Plugin
« Reply #14 on: January 30, 2011, 10:49:08 PM »
Unfortunately I cant right now. Had to disable it temporarily.

I did briefly get it to work with !addct for one of our guys with normal clan tags but quickly had to diasble the plugin very soon after.

A couple of our guys have clan tags as part of their player names and it was kicking them, banning them etc. In fact it was doing the same to the guys with proper clan tags too. (I think thats because theyre not all regged yet)

If you have a suggestion that can help me config I'd be happy to r-enable and post the log.

Our clan tag is S.A.F

This is the config that it was being too aggro with :

Code: [Select]
<configuration plugin="tagprotect">
    <settings name="settings">
<!--min level required for administration tagprotect -->
<set name="ctadminlevel">100</set>
<!--min level required to use the listclan command -->
<set name="listclanlevel">1</set>
<!--clan, team name -->
<set name="clanname">S.A.F Clan</set>
<!--clan, team exact tag exemple -[TPF]- -->
<set name="clanexacttag">S.A.F</set>
<!--clan, team secondary tag exemple -[TPF-T]- for test member-->
<set name="clansecondtag">[S.A.F]</set>
<!--clan, team approximate tag exemple TPF -->
<set name="clanapprotag">S.A.F</set>
<!--ban actived yes/no-->
<set name="banactived">no</set>
        </settings>
</configuration>


 


Rate this page +1 at Google Search

anything