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: geowelcome plugin  (Read 78900 times)

Offline sgt

  • B3 Contrib/Support
  • Full Member
  • *
  • Posts: 82
geowelcome plugin
« on: January 05, 2010, 02:04:51 PM »
I wrote a simple replacement for the welcome plugin.

When the user connect, it broadcast the location using geoip.

Quote
Connected $name from $country

And also adds this information in the welcome message:

Quote
Everyone welcome back $name, from $country. Player number #$id, played $connections times

$country: is "City (Country)"

Regards.

Available in the download section: http://www.bigbrotherbot.com/forums/downloads/?sa=view;down=51

EDIT: removed attachment. Added to download section.
« Last Edit: February 02, 2010, 12:41:57 PM by sgt »

Offline xlr8or

  • [ www.xlrstats.com ]
  • Project Lead
  • Hero Member
  • *
  • Posts: 2057
    • The Art of Tactical Gaming
Re: geowelcome plugin
« Reply #1 on: January 09, 2010, 12:28:50 PM »
Thanks for your contribution.

Please remove this attachment and upload it to our download section, so users may find al plugins in the same section and link it to this topic for support. Let us know when you uploaded it so we can approve it for you.

Offline sgt

  • B3 Contrib/Support
  • Full Member
  • *
  • Posts: 82
Re: geowelcome plugin
« Reply #2 on: January 09, 2010, 02:53:08 PM »
Thanks for your contribution.

Please remove this attachment and upload it to our download section, so users may find al plugins in the same section and link it to this topic for support. Let us know when you uploaded it so we can approve it for you.

Added to the download section. Thanks.

Offline dutchshrek

  • Newbie
  • *
  • Posts: 8
Re: geowelcome plugin
« Reply #3 on: January 16, 2010, 08:48:03 PM »
im a little confused...
If this uses GeoIP, then how does it know where the GeoIP.dat file is located?
Am I missing something?

Forgive my ignorance, I only just today grabbed geoip and configured xlrstats webfront to use it.
No idea what else i can do with it yet.

Offline sgt

  • B3 Contrib/Support
  • Full Member
  • *
  • Posts: 82
Re: geowelcome plugin
« Reply #4 on: January 16, 2010, 09:09:50 PM »
im a little confused...
If this uses GeoIP, then how does it know where the GeoIP.dat file is located?
Am I missing something?

Forgive my ignorance, I only just today grabbed geoip and configured xlrstats webfront to use it.
No idea what else i can do with it yet.

It use an external service (ipinfodb.com) for geolocation.
I forgot to add a library, I uploaded the file again because I don't know how to update the previous one.
It also includes a fix when the user disconnects before broadcasting.


« Last Edit: January 16, 2010, 11:04:46 PM by sgt »

Offline dutchshrek

  • Newbie
  • *
  • Posts: 8
Re: geowelcome plugin
« Reply #5 on: January 16, 2010, 10:45:39 PM »
silly question number 2...
Do I simply replace the deafult welcome with this?
what I mean is do I simply change     <plugin name="welcome" priority="9" config="@b3/conf/plugin_welcome.xml"/>
to
    <plugin name="geowelcome" priority="9" config="@b3/extplugins/conf/geowelcome.xml"/> ?

Or do these 2 work along side eachother?

Offline sgt

  • B3 Contrib/Support
  • Full Member
  • *
  • Posts: 82
Re: geowelcome plugin
« Reply #6 on: January 16, 2010, 11:06:26 PM »
silly question number 2...
Do I simply replace the deafult welcome with this?
what I mean is do I simply change     <plugin name="welcome" priority="9" config="@b3/conf/plugin_welcome.xml"/>
to
    <plugin name="geowelcome" priority="9" config="@b3/extplugins/conf/geowelcome.xml"/> ?

Or do these 2 work along side eachother?

You have to replace the existing welcome plugin with this one.
Please, download the updated version attached to the first post.

Offline xlr8or

  • [ www.xlrstats.com ]
  • Project Lead
  • Hero Member
  • *
  • Posts: 2057
    • The Art of Tactical Gaming
Re: geowelcome plugin
« Reply #7 on: January 17, 2010, 10:17:29 AM »
Quote
You have to replace the existing welcome plugin with this one.
This doesn't mean that you have to delete the original plugin! Just replace it in your b3.xml config file under plugins.

Nice service by the way, didn't know about ipinfodb.com before. Is it a reliable free service, or will it be 'paid only' in some time?

Offline sgt

  • B3 Contrib/Support
  • Full Member
  • *
  • Posts: 82
Re: geowelcome plugin
« Reply #8 on: January 17, 2010, 01:32:58 PM »
Nice service by the way, didn't know about ipinfodb.com before. Is it a reliable free service, or will it be 'paid only' in some time?

Good question  :) they are maintained by donations.
I hope they keep this service free, though everything can happen  :-\

I'll implement a cache for next version, to decrease the number of queries.

Offline hEmI

  • Jr. Member
  • **
  • Posts: 15
Re: geowelcome plugin
« Reply #9 on: January 23, 2010, 10:19:58 AM »
i get this error message

Quote
100123 10:05:06   BOT       Loading Plugin #8 geowelcome [/gameserver/servers/10681/urbanterror/b3/extplugins/conf/geowelcome.xml]
100123 10:05:06   INFO   Could not find built in plugin geowelcome, trying external plugin directories.
No module named geowelcome
100123 10:05:06   CRITICAL   Error loading plugin: No module named simplejson
Traceback (most recent call last):
  File "/gameserver/servers/10681/urbanterror/b3/parser.py", line 330, in loadPlugins
    pluginModule = self.pluginImport(p)
  File "/gameserver/servers/10681/urbanterror/b3/parser.py", line 355, in pluginImport
    return imp.load_module(name, fp, pathname, description)
  File "b3/extplugins/geowelcome.py", line 31, in <module>
    from b3 import geoip
  File "/gameserver/servers/10681/urbanterror/b3/geoip.py", line 2, in <module>
    import simplejson
ImportError: No module named simplejson

any ideas? i need simplejson package?
« Last Edit: January 23, 2010, 10:27:56 AM by hEmI »

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4883
    • Github repository
Re: geowelcome plugin
« Reply #10 on: January 23, 2010, 11:17:05 AM »
If you are using the win32 standalone version of B3, then you cannot use plugins that requires additionnal python modules (such as simplejson)

Offline hEmI

  • Jr. Member
  • **
  • Posts: 15
Re: geowelcome plugin
« Reply #11 on: January 23, 2010, 11:35:15 AM »
hmm..i dont really know which version is running on server, cause the bot was already installed.

When this "simplejson" is missing i have win32?

:( pity

thank you for reply.

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4883
    • Github repository
Re: geowelcome plugin
« Reply #12 on: January 23, 2010, 11:37:31 AM »
if you are running the bot with "b3_run.exe" instead of "python b3_run.py" then you are using the win32 standalone.
« Last Edit: January 23, 2010, 11:43:27 AM by Courgette »

Offline hEmI

  • Jr. Member
  • **
  • Posts: 15
Re: geowelcome plugin
« Reply #13 on: January 23, 2010, 12:05:39 PM »
uh yes, b3_run.py

very pity

thank you for help :)

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4883
    • Github repository
Re: geowelcome plugin
« Reply #14 on: January 23, 2010, 01:23:28 PM »
you are not running the standalone version. Thus you can install the new dependencies.

Ask the plugin developper about what dependencies are required for this plugin to work

 


Rate this page +1 at Google Search