This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Protection...

Old posts that have not been replied to for several years.
N
N0b0dY
Voice
Posts: 9
Joined: Wed Jul 20, 2005 1:29 pm

Protection...

Post by N0b0dY »

Hello there im new in this forum (and in tcl-scripting)....
I have found a protectionscript it works fine, but i cant add a user...
Down here i paste the adduser-function....
This is the errorcode in the partyline "Tcl error [secure:script:adduser]: couldn't create error file for command: no such file or directory"
Script:

Code: Select all

        # {{{ add new user

            proc secure:script:adduser { nickname hostname handle channel arguments } {
                global botnick secure lastbind

                if {![channel get $channel "protection"]} {
                    putserv "PRIVMSG $channel :You have to enable the protection script first."
                    return 0
                }

                set user       [lindex [split $arguments] 0]
                set alternativ [lindex [split $arguments] 1]

                if {($user == "")} {
                    putserv "PRIVMSG $channel :You forgot the nickname parameter. Type: $lastbind \037nickname\037 ?\037handle\037? (must be on $channel)"
                } elseif {![onchan $user $channel]} {
                    putserv "PRIVMSG $channel :Couldn't find $user in $channel."
                } elseif {[validuser [nick2hand $user]]} {
                    putserv "PRIVMSG $channel :$user is already known as [nick2hand $user]."
                } elseif {[validuser $user] && ($alternativ == "")} {
                    putserv "PRIVMSG $channel :Handle '$user' is already known. Try again with a alternativ Handle."
                } elseif {[string equal -nocase $user "$botnick"] || [string equal -nocase $user "$nickname"]} {
                    return 0
                } else {

                    set userhost [getchanhost $user $channel]

                    if {[string match "*users.quakenet.org" $userhost]} {
                        set userhost *!*@[lindex [split $userhost "@"] 1]
                    } else {

                        if {($secure(dynamic,ip,check) == "1")} {

                            set result [dynamic:check:ip [dynamic:get:ip [lindex [split $userhost @] 1]]]

                            if {($result == "-1")} {
                                putserv "PRIVMSG $channel :Couldn't resolve $users's hostname \[[lindex [split $userhost @] 1]\] for dynamic IP check."
                                return 0
                            } elseif {($result == "1")} {
                                putserv "PRIVMSG $channel :$user is currently using a dynamic IP as host. He can change his hostname by setting up usermode +x (mIRC: /mode $user +x (must be authed with Q))."
                                return 0
                            }

                        }

                        set userhost [maskhost $userhost]

                    }

                    if {($alternativ != "") && [validuser $alternativ]} {
                        putserv "PRIVMSG $channel :Alternativ Handle '$alternativ' is already known. Try again with a new alternativ Handle."
                    } elseif {($alternativ != "") && ![validuser $alternativ]} {
                        adduser $alternativ $userhost; set added $alternativ
                    } else {
                        adduser $user $userhost; set added $user
                    }

                    putserv "PRIVMSG $channel :$user has been added with the Handle '$added'"

                    putserv "NOTICE $user :You have been added to my userlist by $nickname. Your known host will as of now be: $userhost."

                }

            }

        # }}}
I hope someone can find it out, thanks! :roll:
User avatar
CrazyCat
Revered One
Posts: 1359
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

The error might be in another proc (dynamic:check:ip or dynamic:get:ip).
BTW, I wonder it's a trouble with file permission...
N
N0b0dY
Voice
Posts: 9
Joined: Wed Jul 20, 2005 1:29 pm

Post by N0b0dY »

hmm should i paste that to?
User avatar
CrazyCat
Revered One
Posts: 1359
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

It's up to you: do you want us to have a look on your possible errors?
Little tip: try to find a line containing "puts" or "open"
N
N0b0dY
Voice
Posts: 9
Joined: Wed Jul 20, 2005 1:29 pm

Post by N0b0dY »

hmm yes i want the script to work.. i saw in the file where i get it should i paste a link here?
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

Your using the script by xela. I got rid of that ip check thing and just added

Code: Select all

if {[string match "*quakenet.org" "[getchanhost $nickname $channel]} {
blah
}
I dont remember having that problem though.
r0t3n @ #r0t3n @ Quakenet
N
N0b0dY
Voice
Posts: 9
Joined: Wed Jul 20, 2005 1:29 pm

Post by N0b0dY »

You mean i should replace:

Code: Select all

if {[string match "*users.quakenet.org" $userhost]} {
}
With your code?
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

oh no. I was thinging o my script i made. As you already have

Code: Select all

if {[string match "*users.quakenet.org" $userhost]} { 
} 
you could maybe just delete all that ip check crap because it never worked for me :D. Just delete the ip check stuff. Or even better, set $secure(dynamic,ip,check) to 0 to disable the ip check. But, still, i have not got the error that you have. Maybe if you set $secure(dynamic,ip,check) to "0" to disable the ip check, it could fix it.
r0t3n @ #r0t3n @ Quakenet
N
N0b0dY
Voice
Posts: 9
Joined: Wed Jul 20, 2005 1:29 pm

Post by N0b0dY »

ohh okey i have the protection from http://www.dev.alex.ip-am.de/ ... hmm i just have started with TCL so i dunno exacly where i should "set" that :oops:
But i think you mean set 0 where the 1 is...:

Code: Select all

if {($secure(dynamic,ip,check) == "1")} {
Or am i wrong? :oops:
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

Your wrong, In the top of the file it asks for a config.

But there is a new script of that out so:

http://xela.ip-am.de/prot1.4.zip <- Try this script.
N
N0b0dY
Voice
Posts: 9
Joined: Wed Jul 20, 2005 1:29 pm

Post by N0b0dY »

Thanks is works fine but i dunno how to add someone :oops:

Code: Select all

‹@Bagarn› $adduser #chan Wohoo 10
 -aiBOT- Please use: $adduser ?#channel? nickname handle {max. 32 characters} level {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
‹@Bagarns› $adduser #chan Wohoo 10 owner
-aiBOT- Please use: $adduser ?#channel? nickname handle {max. 32 characters} level {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
‹@Bagarns› $adduser #chan Wohoo 10 10
 -BOT- Handle '10' already in use.
Please can someone help me.... i also tried with "10 n|-"

And i have found some error with "$modechange"

Code: Select all

Tcl error [::protection::parse:public]: invalid command name "::protection::command:modechange"
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Please use: $adduser ?#channel? nickname handle {max. 32 characters} level {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
That means you should use:
$adduser #chan Wohoo Wohoo 10
where the second "Wohoo" is Wohoo's handle. (you can use another one ofcourse)

As for the error, it seems that there's a missing proc in your script.
N
N0b0dY
Voice
Posts: 9
Joined: Wed Jul 20, 2005 1:29 pm

Post by N0b0dY »

ohh thanks it works now, but that error is in the file i downloaded...
the script that metroid gave me-...
one error i found:

Code: Select all

‹@Bagarn› $adduser #Licence [nl]N0bas [nl]N0bas 10
 -aiBOT- Invalid handle characters specified: [, ]
Can i fix that? :oops:
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

you are using [] is the handle which eggdrop thinks [nl] its a proc. Use
\[nl\]N0bas or nlN0bas.
r0t3n @ #r0t3n @ Quakenet
N
N0b0dY
Voice
Posts: 9
Joined: Wed Jul 20, 2005 1:29 pm

Post by N0b0dY »

hmmm i just cant get it work :oops:

Code: Select all

Bagarn› $adduser #licence nlN0bas nlN0bas 10
-aiBOT- Seems like that nlN0bas is currently not online.
‹@Bagarn› $adduser #licence \[nl\]N0bas \[nl\]N0bas 10
 -aiBOT- Invalid handle characters specified: \, [, \, ]
Locked