Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Log-In Flood Control on 3.4.05
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

richfed
Average Member

United States
999 Posts

Posted - 05 July 2009 :  13:04:03  Show Profile  Visit richfed's Homepage
I am using 3.4.05, so that is probably the cause of this, but if I try to delete a member, I am getting the following error after installing this MOD:

quote:
Microsoft VBScript runtime error '800a000d'

Type mismatch: 'cLng'

/messageboard/inc_func_common.asp, line 1584


I had a difference in the implementation of this part on inc_func_common[from the ReadMe]:

quote:
MemberID = rsCheck("MEMBER_ID")
strDBNTUserName = rsCheck("M_NAME")


I am mising the second line on my file.

Here is a link to that file: inc_func_common

leatherlips
Senior Member

USA
1838 Posts

Posted - 05 July 2009 :  13:11:18  Show Profile  Visit leatherlips's Homepage
I also have 3.4.05 (with all patches installed) and I do not have this problem. I deleted my demo account to see if I would have the same issue as you but it deleted just fine.

Are you sure this isn't caused by something else?

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 05 July 2009 :  13:17:14  Show Profile  Visit richfed's Homepage
No, not sure, but it is likely a result of this Mod, or rather a mistake in its installation on my part. I can say that the last time I deleted an inactive member - which I do weekly - it suceeded.

I'm confused!

edit--> Just put my backup files back online and I was able to delete, so, I am sure now.

Edited by - richfed on 05 July 2009 13:25:08
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 05 July 2009 :  17:21:03  Show Profile
I don't have a .05 version to test on, but I don't think the chkUser function (if that's where the error is occuring) has changed. I'll take a look and do some testing.

could you post line 1584 and the line before and after it?

    _-/Cripto9t\-_
Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 05 July 2009 :  18:09:31  Show Profile  Visit richfed's Homepage
Sure, it falls in this routine from the MOD. The line in red is 1584 on my file:

'## Login Flood Control ## ADD sub routine below ##############################

Sub chkLoginSession(typ)

    select case cLng(typ)
        case 1
            '## if the user is waiting and hasnt waited long enough   ##
            '## start the wait all over and send them to password.asp ##

            if trim(Session(strCookieURL & "logindelay")) <> "" and isDate(Session(strCookieURL & "logindelay")) then
                if DateDiff("s",Session(strCookieURL & "logindelay"),time) < 0 then
                    Session(strCookieURL & "logindelay") = DateAdd("s",(intLoginCheckTime * 60),time)
                    Session(strCookieURL & "logingrace") = ""
                   Response.Redirect("password2.asp")
                end if
            end if
        case 2

            '## set variables back to default if user has waited long enough ##
            '## and start the login attempts all over                        ##

            if cLng(Session(strCookieURL & "login")) > cLng(intLoginAttempts) then
                if trim(Session(strCookieURL & "logindelay")) <> "" and isDate(Session(strCookieURL & "logindelay")) then
                    Session(strCookieURL & "login") = 0
                    Session(strCookieURL & "logindelay") = ""
                end if
            end if

            '## set login attempts to "" if grace is on and the time has been met ##

            if cLng(intLoginFloodGrace) = 1 then
                if trim(Session(strCookieURL & "logingrace")) <> "" and isDate(Session(strCookieURL & "logingrace")) then
                    if DateDiff("s",trim(Session(strCookieURL & "logingrace")),time) > cLng(intLoginGraceTime) then
                        if isNumeric(Session(strCookieURL & "login")) = true then
                            Session(strCookieURL & "login") = ""
                        end if
                    end if
                end if
                Session(strCookieURL & "logingrace") = time
            end if

            '## Increase login attempts ##

            if trim(Session(strCookieURL & "login")) = "" then
                Session(strCookieURL & "login") = 1
            else
                if isNumeric(Session(strCookieURL & "login")) = true then
                    Session(strCookieURL & "login") = cLng(Session(strCookieURL & "login")) + 1
                else
                    Session(strCookieURL & "login") = 1
                end if
            end if

            '## if user exceeds intLoginAttempts, start the wait ##

            if cLng(Session(strCookieURL & "login")) > cLng(intLoginAttempts) then
                Session(strCookieURL & "logindelay") = DateAdd("s",(intLoginCheckTime * 60),time)
                if cLng(intLoginFloodGrace) = 1 then
                    Session(strCookieURL & "logingrace") = ""
                end if
               Response.Redirect("password2.asp")
            end if

        case 3

            '## clean up after successful login

            if trim(Session(strCookieURL & "login")) <> "" then
                Session(strCookieURL & "login") = ""
                Session(strCookieURL & "logindelay") = ""
                if cLng(intLoginFloodGrace) = 1 then
                    if trim(Session(strCookieURL & "logingrace")) <> "" then
                        Session(strCookieURL & "logingrace") = ""
                    end if
                end if
            end if

    end select
End Sub

'## End ################################################################

Thanks for looking into this ...
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 05 July 2009 :  20:55:16  Show Profile
richfed, I'll give it a look in the morning, but I'm pretty sure it's my sloppy coding.

try replacing this
if cLng(Session(strCookieURL & "login")) > cLng(intLoginAttempts) then
                if trim(Session(strCookieURL & "logindelay")) <> "" and isDate(Session(strCookieURL & "logindelay")) then
                    Session(strCookieURL & "login") = 0
                    Session(strCookieURL & "logindelay") = ""
                end if
            end if

with this
if trim(Session(strCookieURL & "login")) <> "" and isNumeric(Session(strCookieURL & "login")) = true then
           if cLng(Session(strCookieURL & "login")) > cLng(intLoginAttempts) then
                if trim(Session(strCookieURL & "logindelay")) <> "" and isDate(Session(strCookieURL & "logindelay")) then
                    Session(strCookieURL & "login") = 0
                    Session(strCookieURL & "logindelay") = ""
                end if
            end if
        end if

I think that should fix it.

    _-/Cripto9t\-_
Go to Top of Page

cripto9t
Average Member

USA
881 Posts

Posted - 06 July 2009 :  10:45:33  Show Profile
I missed the link to your file yesterday. I thought maybe you had something out of place but everything looks alright. The reason I thought something was out of place is because it shouldn't execute that line unless your login fails.

I can't recreate it. Hopefully the code I posted will help.

    _-/Cripto9t\-_
Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 06 July 2009 :  10:49:31  Show Profile  Visit richfed's Homepage
Hi cripto9t!

Yep ... workin' now. That code seems to have done the trick. I have a question, but will post it in the original MOD thread.

Thanks a lot!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.37 seconds. Powered By: Snitz Forums 2000 Version 3.4.07