determinate determinate

Author Topic: Provide Password before login  (Read 1428 times)

0 Members and 1 Guest are viewing this topic.

Offline Dreams

  • Double Ace
  • *
  • Posts: 114
  • Karma: +1/-12
Provide Password before login
« on: May 23, 2010, 09:39:32 am »
Is there a script that makes you having to provide a password, like in ynhub.
Having to provide a password before you can enter the hub.
If there is a script please do notify me, cause i cant find it.
If not, can this be done? =)
« Last Edit: May 23, 2010, 09:43:37 am by Dreams »

Offline Mutor

  • Global Moderator
  • Forum God
  • *****
  • Posts: 3 854
  • Karma: +395/-18
  • To err is human, to arr is pirate...
    • PxDev
Re: Provide Password before login
« Reply #1 on: May 23, 2010, 03:10:26 pm »
I don't understand why anyone would want this.
Of course it can be scripted but in effect all it
does is make a hub a registered users only hub.

Why not just do that?
Respectfully,

Mutor

=-=-=-=-=-=-=-==-=-=-=
[ Ptokax Admins Hub ] Ptokax Help Hub
[ Mutor's Ptokax Archive Website ] Scripting Forum
[ Dynamic Downloads ] API 2
[ Microsoft IIS serving PxWeb 1.0d ] API 2
[ WebReg 1.1.2.0 ] Web Based Hub Reg

Offline Dreams

  • Double Ace
  • *
  • Posts: 114
  • Karma: +1/-12
Re: Provide Password before login
« Reply #2 on: May 23, 2010, 06:02:31 pm »
Its for a hub that users gets checked in, before they get a reg in the real hub.
So that the ops can check users share and stuff like that.

Offline Mutor

  • Global Moderator
  • Forum God
  • *****
  • Posts: 3 854
  • Karma: +395/-18
  • To err is human, to arr is pirate...
    • PxDev
Re: Provide Password before login
« Reply #3 on: May 23, 2010, 06:06:28 pm »
A semi-private hub is a better alternative to that,
where unregistered users may not download, search
and at option chat or pm users other than ops.

At any rate with the two hub scenario, you need
to get that password to the user for them to even
enter. This just seems all too redundant to me.

You may use Disclaimer 2.0b LUA 5.1x [Strict] [API 2]
as it has much the same function.
« Last Edit: May 23, 2010, 06:19:30 pm by Mutor »
Respectfully,

Mutor

=-=-=-=-=-=-=-==-=-=-=
[ Ptokax Admins Hub ] Ptokax Help Hub
[ Mutor's Ptokax Archive Website ] Scripting Forum
[ Dynamic Downloads ] API 2
[ Microsoft IIS serving PxWeb 1.0d ] API 2
[ WebReg 1.1.2.0 ] Web Based Hub Reg

Offline Dreams

  • Double Ace
  • *
  • Posts: 114
  • Karma: +1/-12
Re: Provide Password before login
« Reply #4 on: May 23, 2010, 06:21:43 pm »
There are some other ways of doin this like you say.
But the thing is that i dont use unreg users in my hub.
and if a users sits in a hub that doesnt do unreg users, they will get kicked for loggin on to this hub if
i do as you said now.
Thats why i was thinking of this, as i know many hubs run this with ynhub.

Offline Mutor

  • Global Moderator
  • Forum God
  • *****
  • Posts: 3 854
  • Karma: +395/-18
  • To err is human, to arr is pirate...
    • PxDev
Re: Provide Password before login
« Reply #5 on: May 23, 2010, 06:23:25 pm »
You misunderstand me, at any rate I amended my last post
to include a link to a script that does what you ask. albeit
for a completely different reason.
« Last Edit: May 23, 2010, 06:25:19 pm by Mutor »
Respectfully,

Mutor

=-=-=-=-=-=-=-==-=-=-=
[ Ptokax Admins Hub ] Ptokax Help Hub
[ Mutor's Ptokax Archive Website ] Scripting Forum
[ Dynamic Downloads ] API 2
[ Microsoft IIS serving PxWeb 1.0d ] API 2
[ WebReg 1.1.2.0 ] Web Based Hub Reg

Offline Dreams

  • Double Ace
  • *
  • Posts: 114
  • Karma: +1/-12
Re: Provide Password before login
« Reply #6 on: May 23, 2010, 07:17:49 pm »
Aha, so then i did missunderstand you =) but im trying the script right now.
This can work, but i dont want the user to be saved because he/she has agreed.
If the user disconnect it want he/she to have to agree again, is it possible to make this?
Maybe a line tha can be removed so that it doesnt save the users agreement?

Offline Dreams

  • Double Ace
  • *
  • Posts: 114
  • Karma: +1/-12
Re: Provide Password before login
« Reply #7 on: May 23, 2010, 07:27:54 pm »
but shouldnt this script do so that i cant see anything untill i have agreed?
cause as it is now i can send pm:s and do stuff without even having agreed.

Offline Mutor

  • Global Moderator
  • Forum God
  • *****
  • Posts: 3 854
  • Karma: +395/-18
  • To err is human, to arr is pirate...
    • PxDev
Re: Provide Password before login
« Reply #8 on: May 23, 2010, 08:31:37 pm »
No actually you cannot do anything, everything but main chat is blocked for enabled profiles.
It may not have kicked you but pm's, searches etc are blocked. I've posted an updated
version of the script v2.0c
Respectfully,

Mutor

=-=-=-=-=-=-=-==-=-=-=
[ Ptokax Admins Hub ] Ptokax Help Hub
[ Mutor's Ptokax Archive Website ] Scripting Forum
[ Dynamic Downloads ] API 2
[ Microsoft IIS serving PxWeb 1.0d ] API 2
[ WebReg 1.1.2.0 ] Web Based Hub Reg

Offline Dreams

  • Double Ace
  • *
  • Posts: 114
  • Karma: +1/-12
Re: Provide Password before login
« Reply #9 on: May 23, 2010, 08:52:34 pm »
Tried the updated script and it works.

But isnt it possible to fix that a user that hasnt typed "agreed", cant see anything at all but the "You must type !agree to continue using this hub. Typing anything else will cause youto be disconnected from"?
So that im not logged in yet, cause as it is now my other hub says that i'm in a public hub vile waiting on me to type agreed..
or is this alot of work or something that you find not necessery for this script?
 

Offline Mutor

  • Global Moderator
  • Forum God
  • *****
  • Posts: 3 854
  • Karma: +395/-18
  • To err is human, to arr is pirate...
    • PxDev
Re: Provide Password before login
« Reply #10 on: May 23, 2010, 09:01:08 pm »
Fix indicates something is broken. Just because you
prefer something else doesn't mean it's broken. :P

A script cannot filter outgoing chat from the hub.
As you are always so particular in your needs and
wants, you should write your own scripts.
Respectfully,

Mutor

=-=-=-=-=-=-=-==-=-=-=
[ Ptokax Admins Hub ] Ptokax Help Hub
[ Mutor's Ptokax Archive Website ] Scripting Forum
[ Dynamic Downloads ] API 2
[ Microsoft IIS serving PxWeb 1.0d ] API 2
[ WebReg 1.1.2.0 ] Web Based Hub Reg

Offline Dreams

  • Double Ace
  • *
  • Posts: 114
  • Karma: +1/-12
Re: Provide Password before login
« Reply #11 on: May 23, 2010, 09:16:48 pm »
I didnt mean its broken =)
But as i wrote before about people who are logged in to other hubs.
They will get kicked/temp banned for only trying to get in to this hub.
That was why i asked if it could be done that a user cant be in the hub before they
type agreed, otherwise its like they are in a public hub.
Or have i missunderstod? Isnt it why the agree thing is there, to not be in a public hub?

I just meant that like in ynhub you can provide the password before you login.
And i thought that if typing agreed before you even have entered the hub, it would be
the same and it wouldnt count as a public hub? If it was possible to do it like that. =)
« Last Edit: May 23, 2010, 09:19:29 pm by Dreams »

Offline Mutor

  • Global Moderator
  • Forum God
  • *****
  • Posts: 3 854
  • Karma: +395/-18
  • To err is human, to arr is pirate...
    • PxDev
Re: Provide Password before login
« Reply #12 on: May 23, 2010, 09:31:29 pm »
Firstly I have never used YnHub and I'm not familiar with it's function.
I'm only trying to mimic the function of this feature as I understand it.

If a user is registered in Px they have to satisfy that log-in, the hub
acts before script. So here they are allowed to log-in but do nothing
until they type the agree command. This command represents the hub
password. I'm fairly certain the exact function you want cannot be
scripted, perhaps this is better suited as a feature request for PtokaX.
Respectfully,

Mutor

=-=-=-=-=-=-=-==-=-=-=
[ Ptokax Admins Hub ] Ptokax Help Hub
[ Mutor's Ptokax Archive Website ] Scripting Forum
[ Dynamic Downloads ] API 2
[ Microsoft IIS serving PxWeb 1.0d ] API 2
[ WebReg 1.1.2.0 ] Web Based Hub Reg

Offline Dreams

  • Double Ace
  • *
  • Posts: 114
  • Karma: +1/-12
Re: Provide Password before login
« Reply #13 on: May 23, 2010, 09:37:28 pm »
Alright, then i will put this as a request for ptokax.
Thanks for you answers.
Before you answerd i thought of what you just said, that a script cant act before hub.
And im satesfied with the answers.
Thanks for your sincerity.

Offline Mutor

  • Global Moderator
  • Forum God
  • *****
  • Posts: 3 854
  • Karma: +395/-18
  • To err is human, to arr is pirate...
    • PxDev
Re: Provide Password before login
« Reply #14 on: May 23, 2010, 10:06:24 pm »
I thought of a way to do it, although a little goofy.
As the hub has little regard for an unregistered user,
we can register the user with a pre-set pass and profile,
summarily disconnect them with a prompt to reconnect.

They will then be prompted for the hub password.
I don't know if this satisfies your needs but I can think
of little else to do in script.

Code: [Select]
HubPwd = "guestpass"
RegProf = 3
OpNick = "Mutor"


OnStartup = function()
Bot = SetMan.GetString(21)
end

OnError = function(msg)
local user = Core.GetUser(OpNick)
if msg and user then
Core.SendToUser(user,"<"..Bot.."> "..msg.."|")
end
end

ValidateNickArrival = function(user,data)
local _,_,Nick = data:find("^$ValidateNick (%S+)|$")
if Nick and not RegMan.GetReg(Nick) then
RegMan.AddReg(Nick,HubPwd,RegProf)
Core.SendToUser(user,"<"..Bot.."> Enabling Log-In for: "..Nick..". Please reconnect.|")
Core.Disconnect(user)
end
end
Respectfully,

Mutor

=-=-=-=-=-=-=-==-=-=-=
[ Ptokax Admins Hub ] Ptokax Help Hub
[ Mutor's Ptokax Archive Website ] Scripting Forum
[ Dynamic Downloads ] API 2
[ Microsoft IIS serving PxWeb 1.0d ] API 2
[ WebReg 1.1.2.0 ] Web Based Hub Reg

Offline Dreams

  • Double Ace
  • *
  • Posts: 114
  • Karma: +1/-12
Re: Provide Password before login
« Reply #15 on: May 23, 2010, 10:17:13 pm »
I allready had my mind made up on thanking you and saying that you have done enough already =)
But out of the blue, exactly what i wanted. =)
Many thanks to you, works like a charm! if i could i would kiss you!

Offline Dreams

  • Double Ace
  • *
  • Posts: 114
  • Karma: +1/-12
Re: Provide Password before login
« Reply #16 on: May 23, 2010, 10:53:20 pm »
Just a question, why reconnect? =)

Offline Mutor

  • Global Moderator
  • Forum God
  • *****
  • Posts: 3 854
  • Karma: +395/-18
  • To err is human, to arr is pirate...
    • PxDev
Re: Provide Password before login
« Reply #17 on: May 23, 2010, 10:54:26 pm »
To force prompt for password.
Respectfully,

Mutor

=-=-=-=-=-=-=-==-=-=-=
[ Ptokax Admins Hub ] Ptokax Help Hub
[ Mutor's Ptokax Archive Website ] Scripting Forum
[ Dynamic Downloads ] API 2
[ Microsoft IIS serving PxWeb 1.0d ] API 2
[ WebReg 1.1.2.0 ] Web Based Hub Reg

Offline Dreams

  • Double Ace
  • *
  • Posts: 114
  • Karma: +1/-12
Re: Provide Password before login
« Reply #18 on: May 24, 2010, 01:08:46 am »
Okay, so i have a request for this script.
I can se that all the users that are logging in with the provided password, are saved in ptokax registry.
Could they be deleted on user disconnect maybe? like a temporary account in some way

Offline Mutor

  • Global Moderator
  • Forum God
  • *****
  • Posts: 3 854
  • Karma: +395/-18
  • To err is human, to arr is pirate...
    • PxDev
Re: Provide Password before login
« Reply #19 on: May 24, 2010, 03:02:58 am »
Code: [Select]
HubPwd = "guestpass"
RegProf = 3
OpNick = "Mutor"


OnStartup = function()
Bot,Regs = SetMan.GetString(21),{}
end

OnError = function(msg)
local user = Core.GetUser(OpNick)
if msg and user then Core.SendToUser(user,"<"..Bot.."> "..msg.."|") end
end

ValidateNickArrival = function(user,data)
local _,_,Nick = data:find("^$ValidateNick (%S+)|$")
if Nick and not RegMan.GetReg(Nick) then
Regs[Nick] = RegMan.AddReg(Nick,HubPwd,RegProf)
Core.SendToUser(user,"<"..Bot.."> Enabling Log-In for: "..Nick..". Please reconnect.|")
Core.Disconnect(user)
return true
end
end

UserDisconnected = function(user)
if Regs[user.sNick] then RegMan.DelReg(user.sNick) end
end
OpDisconnected,RegDisconnected = UserDisconnected,UserDisconnected
Respectfully,

Mutor

=-=-=-=-=-=-=-==-=-=-=
[ Ptokax Admins Hub ] Ptokax Help Hub
[ Mutor's Ptokax Archive Website ] Scripting Forum
[ Dynamic Downloads ] API 2
[ Microsoft IIS serving PxWeb 1.0d ] API 2
[ WebReg 1.1.2.0 ] Web Based Hub Reg

Offline Dreams

  • Double Ace
  • *
  • Posts: 114
  • Karma: +1/-12
Re: Provide Password before login
« Reply #20 on: May 24, 2010, 12:23:31 pm »
To force prompt for password.

I'm curious, can this be done before disconnect?
Or is this the only way? Just wondering if it is possible
not having to reconnect..
Or is this the only way for the hubsoft to register the user so that he/she
doesnt become a unregistred user before login?
Im not asking for this to be done, but yes, if it can be done it would be nice.

What i meant with this is if its possible to only having to type the password without beeing disconnected at all and beeing registered when he/she has typed the password, instead of beeing registered first and then typing the password.
Or if there is an automatical way of beeing reconnect directly so that the user doesnt have to reconnect themselfs?

I thought i could atleast ask you if its possible =)

And thanks Mutor for doing this script =)
« Last Edit: May 24, 2010, 12:37:40 pm by Dreams »

Offline Mutor

  • Global Moderator
  • Forum God
  • *****
  • Posts: 3 854
  • Karma: +395/-18
  • To err is human, to arr is pirate...
    • PxDev
Re: Provide Password before login
« Reply #21 on: June 03, 2010, 04:07:33 am »
I thought of another way, you'll see that they actually connect
but then have to satisfy the password prompt or be diconnected.
See if you like this method any better.

Code: [Select]
HubPwd = "guestpass"
RegProf = 3
OpNick = "Mutor"


OnStartup = function()
Bot,Regs = SetMan.GetString(21),{}
end

OnError = function(msg)
local user = Core.GetUser(OpNick)
if msg and user then Core.SendToUser(user,"<"..Bot.."> "..msg.."|") end
end

ValidateNickArrival = function(user,data)
local _,_,Nick = data:find("^$ValidateNick (%S+)|$")
if Nick and not RegMan.GetReg(Nick) then
Regs[Nick] = RegMan.AddReg(Nick,HubPwd,RegProf)
return Core.SendToUser(user,"$GetPass|"),true
end
end

UserDisconnected = function(user)
if Regs[user.sNick] then RegMan.DelReg(user.sNick) end
end
OpDisconnected,RegDisconnected = UserDisconnected,UserDisconnected
« Last Edit: June 03, 2010, 04:09:05 am by Mutor »
Respectfully,

Mutor

=-=-=-=-=-=-=-==-=-=-=
[ Ptokax Admins Hub ] Ptokax Help Hub
[ Mutor's Ptokax Archive Website ] Scripting Forum
[ Dynamic Downloads ] API 2
[ Microsoft IIS serving PxWeb 1.0d ] API 2
[ WebReg 1.1.2.0 ] Web Based Hub Reg

Offline Dreams

  • Double Ace
  • *
  • Posts: 114
  • Karma: +1/-12
Re: Provide Password before login
« Reply #22 on: June 04, 2010, 08:59:46 am »
At first, i did get this script to work.
It asked for a password before i could login.
And when i entered the password, i got loged in and everything was as it should be.

But now using the script, it logs me in to the hub and askes for a password when im in the hub,
and when i enter the password, it disconnects me.. and i have to reconnect several times
to get connected again..
Dont know if its me or the script?
« Last Edit: June 04, 2010, 09:02:10 am by Dreams »

Offline Mutor

  • Global Moderator
  • Forum God
  • *****
  • Posts: 3 854
  • Karma: +395/-18
  • To err is human, to arr is pirate...
    • PxDev
Re: Provide Password before login
« Reply #23 on: June 04, 2010, 09:51:11 pm »
If you enter the correct password it should accept it the first time.
Respectfully,

Mutor

=-=-=-=-=-=-=-==-=-=-=
[ Ptokax Admins Hub ] Ptokax Help Hub
[ Mutor's Ptokax Archive Website ] Scripting Forum
[ Dynamic Downloads ] API 2
[ Microsoft IIS serving PxWeb 1.0d ] API 2
[ WebReg 1.1.2.0 ] Web Based Hub Reg

Offline Dreams

  • Double Ace
  • *
  • Posts: 114
  • Karma: +1/-12
Re: Provide Password before login
« Reply #24 on: June 05, 2010, 09:16:26 am »
Yes, i know, but belive me, i have tried many times.. and even copied the password from
the lua script so that i couldnt enter the wrong one.. but it disconnected me either way

Offline TZB

  • Double Ace
  • *
  • Posts: 149
  • Karma: +13/-0
  • ||-T-z-B-||
    • Gigabyte
Re: Provide Password before login
« Reply #25 on: June 05, 2010, 01:47:03 pm »
Actually I have read half way conversation and i actually haven't tried your script Mutor, But this kid wants something like i have seen so i can just explain what he is looking for [If you have already got what you want then just ignore this post]
Mutor when we enter the HUB using our client we generally store password and nick data in preset in favorites.But if we just have a IP and Nick then when we try and login there is a POP UP dialogue box for entering the password.Untill then we dont get to enter anywhere inside the HUB premises.
I have attached a Print screen for it as well.
What am asking is rather going long way can we just make a script to Ignore the MyInfo value? Sent by the DC++ Client specially when it comes to password section in that we every time a user connects he has to enter the password,But not when he reconnects.
This is just a assumption based suggestion so please pardon me if i have missed out any technical terms or ways.
gigahub.no-ip.biz:666

Offline Dreams

  • Double Ace
  • *
  • Posts: 114
  • Karma: +1/-12
Re: Provide Password before login
« Reply #26 on: July 20, 2010, 07:25:33 pm »
This TZB is exactly what i hoped for.
That screenshot shows how.

If the script could do that every time a user trys to log in.

Offline Mutor

  • Global Moderator
  • Forum God
  • *****
  • Posts: 3 854
  • Karma: +395/-18
  • To err is human, to arr is pirate...
    • PxDev
Re: Provide Password before login
« Reply #27 on: July 21, 2010, 12:29:51 am »
TZB I know what Dreams is looking for, but you
cannot do that exactly with hub-side script AFAIK.
The hub acts before the Lua API. You can force a
password prompt but you have little control over
a user entering if allowing unregistered users to enter.

What is requested really has to be a hub feature to
exactly act as desired.
Respectfully,

Mutor

=-=-=-=-=-=-=-==-=-=-=
[ Ptokax Admins Hub ] Ptokax Help Hub
[ Mutor's Ptokax Archive Website ] Scripting Forum
[ Dynamic Downloads ] API 2
[ Microsoft IIS serving PxWeb 1.0d ] API 2
[ WebReg 1.1.2.0 ] Web Based Hub Reg

Offline TZB

  • Double Ace
  • *
  • Posts: 149
  • Karma: +13/-0
  • ||-T-z-B-||
    • Gigabyte
Re: Provide Password before login
« Reply #28 on: July 25, 2010, 07:54:00 am »
OK. I get the point. Thanks Mutor.
gigahub.no-ip.biz:666

 

determinate determinate