documentation
download & extend
community & support
B3 hosting
May 24, 2012, 09:22:55 PM
Home
Features
Get Started
Supported Games
Forums
Help
Search
Tags
Groupware
Login
Register
Activation Mail
It appears you have not registered with our community. To register please click here ...
You are here:
Big Brother Bot Forum
Add-Ons
Plugins Discussion
Plugins by PtitBigorneau
(Moderator:
PtitBigorneau
)Contact Plugin
Pages: [
1
]
2
3
4
Go Down
« previous
next »
Print
Author
Topic: Contact Plugin (Read 4046 times)
PtitBigorneau
Moderator
OS: Linux
Type: Owner dedicated server(s)
Gameservers:
UrT
Posts: 133
Offline
Contact Plugin
«
on:
August 10, 2010, 08:02:57 AM »
hey
I present to you a little plugin
Plugin Contact for send an e_mail to the administration server
use : !contact <message to admin>
need smtp server
Installation:
1. Place the contact.py in your ../b3/extplugins and the
contact.xml in your ../b3/extplugins/conf folders.
2. Open contact.xml
modify e_mail adress for send message
modify e_mail adress for receive message
modify server name
3. Open your B3.xml file (default in b3/conf) and add the next line in the
<plugins> section of the file:
<plugin name="contact" priority="11" config="@b3/extplugins/conf/contact.xml"/>
Choose your next free number for the priority
download->
contact v1.0
«
Last Edit: August 11, 2010, 12:46:15 AM by PtitBigorneau
»
Logged
xlr8or
[ www.xlrstats.com ]
Project Lead
OS: Linux
Type: Owner dedicated server(s)
Gameservers:
CoD, CoD2, CoD5, UrT
Posts: 2022
Offline
Support Specialty:
B3-Core, CoD/UrT/WoP/ETPro parsers, Plugin development
Re: Contact Plugin
«
Reply #1 on:
August 10, 2010, 11:23:59 AM »
Nice addition.
The priority parameter is however no longer used, so you don't need it anymore for plugins.
Logged
Github repo
-
Groupware
grosbedo
Former Dev. (senate)
OS: Linux
Type: Owner dedicated server(s)
Gameservers:
OpenArena
Posts: 258
Offline
Re: Contact Plugin
«
Reply #2 on:
August 11, 2010, 05:10:57 AM »
If you ever want to enhance this plugin, could you please add a better errors handling ?
Code:
100811 17:19:21 DEBUG AdminPlugin: OnSay handle 5:"!contact hey mate ! someone
is cheating currently, can you come in please ?"
100811 17:19:21 DEBUG AdminPlugin: Handle command !contact hey mate ! someone
is cheating currently, can you come in please ?
100811 17:19:21 VERBOSE RCON sending (127.0.0.1:27963) say ^1supeR^5,^7Bot: ^3[p
m]^7 ^7There was an error processing your command
100811 17:19:21 ERROR handler AdminPlugin could not handle event Say: error: [
Errno 111] Connection refused [('/home/openarena/b3/b3/parser.py', 765, 'handleE
vents', 'hfunc.parseEvent(event)'), ('/home/openarena/b3/b3/plugin.py', 157, 'pa
rseEvent', 'self.onEvent(event)'), ('/home/openarena/b3/b3/plugin.py', 175, 'onE
vent', 'self.handle(event)'), ('/home/openarena/b3/b3/plugins/admin.py', 172, 'h
andle', 'self.OnSay(event)'), ('/home/openarena/b3/b3/plugins/admin.py', 306, 'O
nSay', 'results = command.execute(data, event.client)'), ('/home/openarena/b3/b3
/plugins/admin.py', 1905, 'execute', 'self.func(data, client, copy.copy(self))')
, ('/home/openarena/b3/b3/extplugins/contact.py', 57, 'cmd_contact', "server = s
mtplib.SMTP('localhost')"), ('/usr/lib/python2.6/smtplib.py', 239, '__init__', '
(code, msg) = self.connect(host, port)'), ('/usr/lib/python2.6/smtplib.py', 295,
'connect', 'self.sock = self._get_socket(host, port, self.timeout)'), ('/usr/li
b/python2.6/smtplib.py', 273, '_get_socket', 'return socket.create_connection((p
ort, host), timeout)'), ('/usr/lib/python2.6/socket.py', 514, 'create_connection
', 'raise error, msg')]
This is because I didn't configure SMTP yet (although it should work already, I will verify).
Other than that, good idea and good job
Logged
PtitBigorneau
Moderator
OS: Linux
Type: Owner dedicated server(s)
Gameservers:
UrT
Posts: 133
Offline
Re: Contact Plugin
«
Reply #3 on:
August 11, 2010, 06:35:28 AM »
thank you
then plugin tested on urban terror, on ubuntu server with sendmail
just add in php.ini (/etc/php5/apache2/php.ini) for sending mail via php
Code:
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = mail.ptitbigorneau.fr #smtp adress
; http://php.net/smtp-port
smtp_port = 25
nothing to configure for sending mail via python
Logged
dakotaboul123
Sr. Member
OS: Windows
Type: Gameserver Rental Co.
Gameservers:
CoD4
Posts: 182
Offline
Re: Contact Plugin
«
Reply #4 on:
August 15, 2010, 07:13:36 PM »
When i go to sue this plugin i get these errors in my b3.log
100815 22:09:28 WARNING WelcomePlugin: using default value 20 for command !greeting
100815 22:09:28 CRITICAL Error loading plugin: No module named text
Traceback (most recent call last):
File "b3\parser.pyo", line 473, in loadPlugins
File "b3\parser.pyo", line 541, in pluginImport
File "C:\UserFiles\dakotaboul123\GameServers\TC63810866725487762073825\b3\extplugins\contact.py", line 11, in <module>
File "email\__init__.pyo", line 79, in __getattr__
ImportError: No module named text
100815 22:10:00 ERROR Error executing crontab <bound method StatusPlugin.update of <b3.plugins.status.StatusPlugin instance at 0x01909F58>>: 'NoneType' object has no attribute 'gameName'
[('b3\\cron.pyo', 233, 'run', None), ('b3\\cron.pyo', 171, 'run', None), ('b3\\cron.pyo', 60, 'run', None), ('b3\\plugins\\status.pyo', 172, 'update', None)]
100815 22:11:00 ERROR Error executing crontab <bound method StatusPlugin.update of <b3.plugins.status.StatusPlugin instance at 0x01909F58>>: 'NoneType' object has no attribute 'gameName'
[('b3\\cron.pyo', 233, 'run', None), ('b3\\cron.pyo', 171, 'run', None), ('b3\\cron.pyo', 60, 'run', None), ('b3\\plugins\\status.pyo', 172, 'update', None)]
But when i remove the plugin, they are gone
Logged
PtitBigorneau
Moderator
OS: Linux
Type: Owner dedicated server(s)
Gameservers:
UrT
Posts: 133
Offline
Re: Contact Plugin
«
Reply #5 on:
August 16, 2010, 01:28:03 AM »
windows? what version B3 , B3 Windows Installer?
you have an SMTP server?
the problem looks to be with "from email.MIMEText import MIMEText"
I am testing on windows 7 with the latest version B3 for windows
Logged
Courgette
Senior Dev.
OS: Linux
Type: Home user
Posts: 3485
Offline
Support Specialty:
B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
Re: Contact Plugin
«
Reply #6 on:
August 16, 2010, 01:54:40 AM »
@PtitBigorneau:
It looks like dakotaboul123 is using the windows version of B3.
In the windows version of B3 the end user does not requires to have python installed on his computer. As a consequence if a 3rd party plugin tries to import a python module which is not already used by B3, the import will fail.
The smtplib module is not part of the B3 core. We will add this module to B3 1.3.4 when it goes public so this plugin can work fine with the windows release of B3.
@dakotaboul123:
If you want to run this plugin right now, you have to install B3 from sources (and thus also install python on your computer, etc)
Or you can wait for the public release of B3 1.3.4
«
Last Edit: August 16, 2010, 02:17:31 AM by Courgette
»
Logged
Follow me :
@cucurb
.~. new
Smokin' guns official website
Courgette
Senior Dev.
OS: Linux
Type: Home user
Posts: 3485
Offline
Support Specialty:
B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
Re: Contact Plugin
«
Reply #7 on:
August 16, 2010, 02:28:38 AM »
@PtitBigorneau:
i've been testing B3 1.3.4b on a windows machine and it appears that this plugin will only work on the windows version of B3 if you replace
Code:
from email.MIMEText import MIMEText
with
Code:
from email import *
also replace
Code:
email = MIMEText(message)
with
Code:
email = MIMEText.MIMEText(message)
«
Last Edit: August 16, 2010, 02:44:33 AM by Courgette
»
Logged
Follow me :
@cucurb
.~. new
Smokin' guns official website
PtitBigorneau
Moderator
OS: Linux
Type: Owner dedicated server(s)
Gameservers:
UrT
Posts: 133
Offline
Re: Contact Plugin
«
Reply #8 on:
August 16, 2010, 03:07:41 AM »
thank courgette
for the new version of the plugin, I've made the changes
new version 1.1
add command !acontact for sending messages between admins or moderators
adds 4 commands:
!addmail register or change your mail address
use : !addmail [adress mail]
!delmail for delete your mail address
use : !delmail
!listcontact for Admins list with an mail address registered
use : !listcontact
!acontact for message to admin or moderator server
use : !acontact [name or ID admin] [message]
Installation:
1. Place the contact.py in your ../b3/extplugins and the
contact.xml in your ../b3/extplugins/conf folders.
2. Open contact.xml
modify e_mail address for send message
modify e_mail address for receive message
modify server name
modify smtp server name (lacolhost or smtp.exemple.com)
3. Open your B3.xml file (default in b3/conf) and add the next line in the
<plugins> section of the file:
<plugin name="contact" config="@b3/extplugins/conf/contact.xml"/>
4. Run the contact SQL script (contact.sql) on your B3 database
download ->
contact v1.1
«
Last Edit: August 16, 2010, 06:32:45 AM by PtitBigorneau
»
Logged
dakotaboul123
Sr. Member
OS: Windows
Type: Gameserver Rental Co.
Gameservers:
CoD4
Posts: 182
Offline
Re: Contact Plugin
«
Reply #9 on:
August 16, 2010, 04:10:44 PM »
Im using the standalone version
So i assume it wont work with that?
Logged
Courgette
Senior Dev.
OS: Linux
Type: Home user
Posts: 3485
Offline
Support Specialty:
B3-Core, UrT/SmG/BFBC2 parsers, Plugin development
Re: Contact Plugin
«
Reply #10 on:
August 16, 2010, 10:10:13 PM »
wait for B3 v1.3.4
Logged
Follow me :
@cucurb
.~. new
Smokin' guns official website
grosbedo
Former Dev. (senate)
OS: Linux
Type: Owner dedicated server(s)
Gameservers:
OpenArena
Posts: 258
Offline
Re: Contact Plugin
«
Reply #11 on:
August 17, 2010, 05:51:45 AM »
Nice additions PtitBigorneau ! Im going to install it _now_ !
/EDIT : Just, if I would see just one more feature, it would be a minimum time to wait between each mail, to avoid spamming.
«
Last Edit: August 17, 2010, 06:36:52 AM by grosbedo
»
Logged
PtitBigorneau
Moderator
OS: Linux
Type: Owner dedicated server(s)
Gameservers:
UrT
Posts: 133
Offline
Re: Contact Plugin
«
Reply #12 on:
August 17, 2010, 06:55:52 AM »
Quote
Just, if I would see just one more feature, it would be a minimum time to wait between each mail, to avoid spamming.
I currently work on this problem.
pending the player's name, ip address, the guid and id of the player are shown in the mail
in cases of abuse the person is easily punishable
Logged
grosbedo
Former Dev. (senate)
OS: Linux
Type: Owner dedicated server(s)
Gameservers:
OpenArena
Posts: 258
Offline
Re: Contact Plugin
«
Reply #13 on:
August 17, 2010, 07:52:54 AM »
I see
Logged
PtitBigorneau
Moderator
OS: Linux
Type: Owner dedicated server(s)
Gameservers:
UrT
Posts: 133
Offline
Re: Contact Plugin
«
Reply #14 on:
August 19, 2010, 05:52:13 AM »
new version v1.2
add a system anti_spamming limiting the time between the sending of two messages and the number of messages sent in a given period
by default
limit for the players has a message every 5 minutes and 5 messages per hour
for admins just one message every 5 minutes
change command !listcontact -> !listmail
adds 4 commands
!bancontact for prohibit a player's message posting
use : !bancontact or!bcontact [name or id]
!unbancontact for lift the ban
use: !unbancontact or!ucontact [name or id]
!listcontact for shipments by mail the list of users who have sent a message and see the last 10 users
use: !listcontact or! ltcontact
!lookcontact for check if a player has sent a message and if it is allowed or not to send messages
use! lookcontact or lkcontact [name or id]
Installation:
1. Place the contact.py in your ../b3/extplugins and the
contact.xml in your ../b3/extplugins/conf folders.
2. Open contact.xml
modify e_mail address for send message
modify e_mail address for receive message
modify server name
modify smtp server name (localhost or smtp.exemple.com)
3. Open your B3.xml file (default in b3/conf) and add the next line in the
<plugins> section of the file:
<plugin name="contact" config="@b3/extplugins/conf/contact.xml"/>
4. Run the contact SQL script (contact.sql or contact_update.sql if you have contact v1.1) on your B3 database
sorry for my english
Download ->
contact v1.2
«
Last Edit: August 20, 2010, 07:51:50 AM by PtitBigorneau
»
Logged
Tags:
Pages: [
1
]
2
3
4
Go Up
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News (Read Only)
===> News Archive
===> Website News
=> General Discussion
===> Servers
=> Shared Services
-----------------------------
Support Forums
-----------------------------
=> Support Instructions
=> Installation Support
=> General Usage Support
=> Game specific Support
===> Battle Field 3
=====> BF3/B3 beta board
===> Battle Field Bad Company 2
===> Call of Duty series
=====> CoD, CoD:UO, CoD2
=====> Call of Duty 4 (Modern Warfare)
=====> Call of Duty 5 (World at War)
=====> Call of Duty 6 (Modern Warfare 2)
=====> Call of Duty 7 (Black Ops)
=======> AlterOps
===> Frontlines, Fuel of War
===> Enemy Territory
===> Homefront
===> Medal of Honor 2010
===> Open Arena
===> Red Orchestra 2
===> Smokin' Guns
===> Soldier of Fortune 2
===> Urban Terror
===> World of Padman
===> Other games
-----------------------------
Add-Ons
-----------------------------
=> Plugins Discussion
===> Plugin Releases!
===> Plugins by xlr8or
===> Plugins by Courgette
===> Plugins by Freelander
===> Plugins by Bakes
===> Plugins by Ismael
===> Plugins by flinkaflenkaflrsk
===> Plugins by Anubis
===> Plugins by Spoon
===> Plugins by PtitBigorneau
===> Plugins by BlackMamba
===> Plugins by Beber888
===> Plugins by grosbedo
=> XLRstats
===> Weaponmodifiers
=> Echelon
===> Echelon version 2
=> Configurations
=> Installers
-----------------------------
Community Developers
-----------------------------
=> Plugin Developers
=> The Code Bin
Rate this page +1 at Google Search
Web Toolbar by Wibiya
SimplePortal 2.3.1 © 2008-2009, SimplePortal