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: q3login Plugin  (Read 9236 times)

Offline d0nin380

  • Full Member
  • ***
  • Posts: 56
q3login Plugin
« on: March 29, 2013, 02:43:05 PM »
Okay, here is a SUPPOSED-TO-BE-WORKING login plugin for games with no clientside private messaging.

For the first admin, set the passwdlevel to 2 and set password for yourself. Then set the passwdlevel back to desired level

I have only tested it on CoD4. I would recommend to test it on an empty server if running for other than cod4.

All bug reports will be much appreciated!

download

PLEASE, READ THE WHOLE README BEFORE USING IT.

Quote from: README
# q3login_README.txt
# Plugin for B3 (www.bigbrotherbot.com)
#
# Copyright 2013 d0nin380 <d0nin380<at>gmail<dot>com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.

Description:

    BEFORE USING THIS PLUGIN PLEASE, READ THE WHOLE README.
    
    This plugin is a modification of B3's login plugin (login.py version 1.2).
    The config file is exactly like the original login.xml.
    Purpose of this plugin is to add security to games with compromised guids
    and no client side private messaging such as CoD4.
    
    There are couple of security measures on place:
        If you type !q3login yourpassword
        the bot will check yourpassword against the password in database and if it matches
        the bot will automatically send you a new random password.
        
        If you forget the slash from /password yourpassword and end up spamming it in to the server,
        the bot will check yourpassword against the password in database and change it if needed.
        The bot will PM you the new password.
        
        These 2 arent perfectly foolproof. I often find myself hitting tab after I type password mypass
        and hit enter. If I typed pasword instead of password, this would spam my password to the server.
        Be careful with the commands and always start your password command with / so in case you have a typo
        the password wont be spammed to the server.
    

Commands:
    !q3login
        First via console: "/password yourpassword" THEN !q3login
        
        This command will log you in AFTER you type, in console: /password yourpassword
        after you run the command, you will see a message saying: "to complete authentication, type /reset password..."
        You have to type exactly "/reset password" without quotes and not "/reset what-ever-your-password-is"
        Next say event parsed will check if you reset the password to empty and restore your privileges.
        
    !q3setpassword
        First via console: "/password <newpassword>[:name]" THEN !q3setpassword
        
        This command will set your new password.
        To change password for yourself you type /password your-new-pass
        If you want to change a password to d0nin380,
        you would first set password via console: "/password newpassword:d0nin380"
        
        After you set /password, type !q3setpassword.
        Please note, you cannot have spaces in password
        and DO NOT forget to /reset password.
        If you don't reset password, when you connect to another server, they will be able to see it.
        

Installation:
1. Unzip the content of this package into your B3 folder. It will
place the q3login.py file in b3/extplugins and the config file q3login.xml in
your b3/extplugins/conf folder.

2. Open q3login.xml with your texteditor and edit to your liking.

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

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

4. Restart your b3

Support:
Support will ONLY be provided in http://forum.bigbrotherbot.net/releases/q3login-plugin/ so do not email me or anybody else your support questions.

# CHANGELOG
# 29/03/2012 - 1.0 - d0nin380
# * Initial Release
« Last Edit: April 02, 2013, 04:06:28 PM by d0nin380 »

Offline Courgette

  • Senior Dev.
  • Hero Member
  • *
  • Posts: 4882
    • Github repository
Re: q3login Plugin
« Reply #1 on: March 29, 2013, 02:52:37 PM »
Nice work.

I took the liberty to change your download link to http://forum.bigbrotherbot.net/downloads/?sa=view;down=225 (which in turn points to your github account)

Having your plugin listed in the download section will bring more visibility to it.

Offline d0nin380

  • Full Member
  • ***
  • Posts: 56
Re: q3login Plugin
« Reply #2 on: March 29, 2013, 02:59:10 PM »
ok, thank you Courgette.

edit. Fixed the typo on your name..
« Last Edit: March 30, 2013, 07:51:16 PM by d0nin380 »

Offline IrishDoc

  • Jr. Member
  • **
  • Posts: 39
Re: q3login Plugin
« Reply #3 on: April 02, 2013, 03:42:26 PM »
I am getting "you don't have sufficient access" when I type in !q3setpassword.

I followed these steps, after putting the files in the correct areas and restarting my bot.
console (~) /password  *********
bot    !q3setpassword


If I try !q3login, I get a pm saying "Access Denied"

What I am doing wrong?  I am the only super admin on my bot and have access for all commands.

Offline d0nin380

  • Full Member
  • ***
  • Posts: 56
Re: q3login Plugin
« Reply #4 on: April 02, 2013, 04:01:24 PM »
Try setting the passwdlevel in config to 2 temporarily.

Offline IrishDoc

  • Jr. Member
  • **
  • Posts: 39
Re: q3login Plugin
« Reply #5 on: April 02, 2013, 04:14:06 PM »
ok, i was able to create a password and login.  But after I change the permissions back to 40, I am still able to login but I am getting insufficient permissions regarding all the other commands.


I had to use the !iamgod command again. 

Will I have to change the levels of all my member / admins again also??
« Last Edit: April 02, 2013, 04:17:23 PM by IrishDoc »

Offline d0nin380

  • Full Member
  • ***
  • Posts: 56
Re: q3login Plugin
« Reply #6 on: April 02, 2013, 04:21:30 PM »
ok, i was able to create a password and login.  But after I change the permissions back to 40, I am still able to login but I am getting insufficient permissions regarding all the other commands.


I had to use the !iamgod command again. 

Will I have to change the levels of all my member / admins again also??

No. Thank you for reporting that. I thought I got rid of that bug but I guess not. Check your log and report any errors please. I was able to reproduce that bug when I was writing the code. It would set the group bits in db to the temporary ones if there was an error or if the user disconnected before login..

Offline IrishDoc

  • Jr. Member
  • **
  • Posts: 39
Re: q3login Plugin
« Reply #7 on: April 02, 2013, 04:37:32 PM »
Will the database save any passwords I set for admins without them being on?  ie if I give them all a generic password, that they can login with and then change to something of their own choosing when they are able to login?  Also will this block all commands or just those that need 40 or above to use?
« Last Edit: April 02, 2013, 04:41:58 PM by IrishDoc »

Offline d0nin380

  • Full Member
  • ***
  • Posts: 56
Re: q3login Plugin
« Reply #8 on: April 02, 2013, 04:45:32 PM »
No unfortunately they have to be online. I will see if I can push an update today so you can set a generic password.

Offline IrishDoc

  • Jr. Member
  • **
  • Posts: 39
Re: q3login Plugin
« Reply #9 on: April 02, 2013, 07:18:29 PM »
Just to let you know that it is resetting the group status of each person I add to it.  Its not a big deal for me, as I can put them back quickly but thought I would let you know.

ie It took a super admin down to a regular when I added them.

Offline d0nin380

  • Full Member
  • ***
  • Posts: 56
Re: q3login Plugin
« Reply #10 on: April 02, 2013, 07:38:31 PM »
...
ie It took a super admin down to a regular when I added them.
Are they in group regular after they login?

The way how it works; say you set the threshold to 40, then everybody over lvl 40 will be set to regular until they login, after login, they will be regranted the group bits.

Offline IrishDoc

  • Jr. Member
  • **
  • Posts: 39
Re: q3login Plugin
« Reply #11 on: April 02, 2013, 10:03:59 PM »
Yes they are receiving a pm saying no need to login again but don't have permissions to do anything, I go and check their level in echelon and they were changed to regular, but after changing their level back everything runs ok.

Offline d0nin380

  • Full Member
  • ***
  • Posts: 56
Re: q3login Plugin
« Reply #12 on: April 02, 2013, 10:30:59 PM »
Okay I will have to check that when I get home. Is there any errors in your log?

Is there any further issues once they have logged in the first time and you set the adminlevels back to them?

edit:
Okay I found where my issue was.  Bugfix released. Thank you IrishDoc for the bug report.

Quote
# CHANGELOG
# 1.0 - 26/03/2013 - d0nin380
# * Initial release - modification of login.py
# 1.0.1 - 02/04/2013 - d0nin380
# * Fixed a bug where temporary client.groupBits were saved
# in the database by !q3setpassword
« Last Edit: April 03, 2013, 03:35:09 AM by d0nin380 »

Offline charlie1o1

  • Jr. Member
  • **
  • Posts: 36
  • Passion of B3
    • Army of Darkness
Re: q3login Plugin
« Reply #13 on: July 21, 2013, 01:14:41 AM »
Hi :)
 
        I follow all steps but q3login plugin not working :(

here is my b3.log '

http://pastebin.com/q36KgbJs
=AOD=

Offline d0nin380

  • Full Member
  • ***
  • Posts: 56
Re: q3login Plugin
« Reply #14 on: July 21, 2013, 01:42:16 AM »
Hi :)
 
        I follow all steps but q3login plugin not working :(

here is my b3.log '

http://pastebin.com/q36KgbJs

Can you please double check the syntax in your b3.xml
Specifically the line where q3login is listed.

 


Rate this page +1 at Google Search