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!

Pages: 1 2 3 [4]   Go Down
  Print  
Author Topic: ForumLink  (Read 11226 times) Bookmark and Share
Support Hero
*
OS: Windows
Type: Gameserver Rental Co.
Gameservers: 2x CoD4, 1x BF3
Posts: 2627
Offline Offline
Owner of Host4B3.com - Over 70 bots hosted!
WWW
« Reply #45 on: September 01, 2011, 07:54:16 AM »

I've wrote a bit of code to doing something like this but it changes players B3 group based on there forum group.(This has been coded for the PHPBB forum Only!)

add this "self.changelvl(event.client)"
below "t.start()" in foumlink.py

add this to forumlink.py
Code:
    def changelvl(self, client):
      forumid = client.var(self,'forumid',0).value
      self.dbconnect()
      cursor = self.query("""SELECT `group_id` FROM `phpbb_users` WHERE `user_id` = '%s'""" % (forumid))
      if cursor.rowcount > 0:
         r = cursor.fetchone()

         id = r[0]
         
         if id == IDHERE:
            group = clients.Group(keyword='superadmin')
            group = self.console.storage.getGroup(group)

            if client.inGroup(group):
                self.debug(self._adminPlugin.getMessage('groups_already_in', client.exactName, group.name))
            else:
                client.setGroup(group)
                client.save()
                self.console.say('%s has been added to the Administrator group' % client.exactName)
            return False
         elif id == IDHERE:
            group = clients.Group(keyword='serveradmin')
            group = self.console.storage.getGroup(group)

            if client.inGroup(group):
                self.debug(self._adminPlugin.getMessage('groups_already_in', client.exactName, group.name))
            else:
                client.setGroup(group)
                client.save()
                self.console.say('%s has been added to the Server Administrator group' % client.exactName)
            return False
         elif id == IDHERE:
            group = clients.Group(keyword='smod')
            group = self.console.storage.getGroup(group)

            if client.inGroup(group):
                self.debug(self._adminPlugin.getMessage('groups_already_in', client.exactName, group.name))
            else:
                client.setGroup(group)
                client.save()
                self.console.say('%s has been added to the Senior Moderator group' % client.exactName)
            return False
         elif id == IDHERE:
            group = clients.Group(keyword='mod')
            group = self.console.storage.getGroup(group)

            if client.inGroup(group):
                self.debug(self._adminPlugin.getMessage('groups_already_in', client.exactName, group.name))
            else:
                client.setGroup(group)
                client.save()
                self.console.say('%s has been added to the Moderator group' % client.exactName)
            return False
         elif id == IDHERE:
            group = clients.Group(keyword='ehd')
            group = self.console.storage.getGroup(group)

            if client.inGroup(group):
                self.debug(self._adminPlugin.getMessage('groups_already_in', client.exactName, group.name))
            else:
                client.setGroup(group)
                client.save()
                self.console.say('%s has been added to the EHD Members group' % client.exactName)
            return False
         elif id == IDHERE:
            group = clients.Group(keyword='vip')
            group = self.console.storage.getGroup(group)

            if client.inGroup(group):
                self.debug(self._adminPlugin.getMessage('groups_already_in', client.exactName, group.name))
            else:
                client.setGroup(group)
                client.save()
                self.console.say('%s has been added to the VIP group' % client.exactName)
            return False
         elif id == IDHERE:
            if client.maxLevel >= 2:
               group = clients.Group(keyword='user')
               group = self.console.storage.getGroup(group)

               if client.inGroup(group):
                   self.debug(self._adminPlugin.getMessage('groups_already_in', client.exactName, group.name))
               else:
                   client.setGroup(group)
                   client.save()
                   client.message('You have been reset to User')
               return False
            else:
               return False
         else:
            return False

You will have to edit the ids and group keywords to work with your B3 and forum.

Could you adapt this to SMF2 spoon? All I want to be able to do is change their server level based on forum group. I don't need to get PMs or anything.
Thanks!
Logged

Need B3 Bot hosting? Check out Host4B3.com
Check Twitter.com/Host4B3 for updates if the site it down.

Help will be given to those with a b3.log

System: Python 2.7.1 - B3 Source Code - Locally hosted MySQL & Apache - Win 2k3

Sr. Member
****
OS: Windows
Type: Owner dedicated server(s)
Gameservers: CoD4
Posts: 180
Offline Offline
WWW
« Reply #46 on: September 02, 2011, 03:46:11 AM »

i would need to know the name of the group id and the name of the table it is in.
Logged

Support Hero
*
OS: Windows
Type: Gameserver Rental Co.
Gameservers: 2x CoD4, 1x BF3
Posts: 2627
Offline Offline
Owner of Host4B3.com - Over 70 bots hosted!
WWW
« Reply #47 on: September 07, 2011, 09:27:34 AM »

i would need to know the name of the group id and the name of the table it is in.

The table name is smf_members.
Then under the row with the user (in my case 1) there is a column called id_group If the value is set to 17, it should make the user a admin (40). OFC, I would love for it to be able to go even further, but we will see...
Logged

Need B3 Bot hosting? Check out Host4B3.com
Check Twitter.com/Host4B3 for updates if the site it down.

Help will be given to those with a b3.log

System: Python 2.7.1 - B3 Source Code - Locally hosted MySQL & Apache - Win 2k3
Full Member
***
OS: Windows
Type: Renting Server with B3
Gameservers: CoD4
Posts: 51
Offline Offline
« Reply #48 on: October 05, 2011, 06:57:41 AM »

Hey guys, has anyone made a version of this for IPB? Because i realllly realllly want to have this on my servers but our organization is running IPB and we do not plan to move. So is it possible to do it on IPB or not?

If someone has the time to do this it would be awesome!
Logged
Sr. Member
****
OS: Windows
Type: Owner dedicated server(s)
Gameservers: CoD4
Posts: 180
Offline Offline
WWW
« Reply #49 on: October 05, 2011, 03:36:14 PM »

The table name is smf_members.
Then under the row with the user (in my case 1) there is a column called id_group If the value is set to 17, it should make the user a admin (40). OFC, I would love for it to be able to go even further, but we will see...

Really all you would have to do it change
cursor = self.query("""SELECT `group_id` FROM `phpbb_users` WHERE `user_id` = '%s'""" % (forumid)
to
cursor = self.query("""SELECT `id_group` FROM `smf_members` WHERE `user_id` = '%s'""" % (forumid)
then change if id == IDHERE: to what ever your id's are.
Logged

Full Member
***
OS: Windows
Type: Renting Server with B3
Gameservers: CoD4
Posts: 51
Offline Offline
« Reply #50 on: October 05, 2011, 08:03:39 PM »

Does anyone know how hard this would be? Spoon how difficult would this be? Do i just need to change the name of the tables? Or would all of the code be completely different?

Thanks for your time, Jman/Aurora
Logged
Sr. Member
****
OS: Windows
Type: Owner dedicated server(s)
Gameservers: CoD4
Posts: 180
Offline Offline
WWW
« Reply #51 on: October 07, 2011, 11:06:44 AM »

it would probs need alot of code changed
Logged

Full Member
***
OS: Windows
Type: Renting Server with B3
Gameservers: CoD4
Posts: 51
Offline Offline
« Reply #52 on: October 09, 2011, 08:40:59 AM »

it would probs need alot of code changed


Hmmm okay. Would you be interested in doing this? Im not sure how hard it would be but im sure it wouldnt be that bad. All it does is see what their group ID is and put them in that group on the bot right? To say as a noob anyways. If that is all it does all you would need to do is change the name of the tables. Right?
Logged
Sr. Member
****
OS: Windows
Type: Owner dedicated server(s)
Gameservers: CoD4
Posts: 180
Offline Offline
WWW
« Reply #53 on: October 11, 2011, 03:42:25 PM »

this plugin does not support IPB forum
Logged

Tags:
Pages: 1 2 3 [4]   Go Up
  Print  
 
Jump to:  


Rate this page +1 at Google Search


SimplePortal 2.3.1 © 2008-2009, SimplePortal