egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Protection...
Goto page 1, 2  Next
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
N0b0dY
Voice


Joined: 20 Jul 2005
Posts: 9

PostPosted: Mon Jul 25, 2005 10:10 am    Post subject: Protection... Reply with quote

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:

        # {{{ 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! Rolling Eyes
Back to top
View user's profile Send private message
CrazyCat
Revered One


Joined: 13 Jan 2002
Posts: 1032
Location: France

PostPosted: Mon Jul 25, 2005 11:44 am    Post subject: Reply with quote

The error might be in another proc (dynamic:check:ip or dynamic:get:ip).
BTW, I wonder it's a trouble with file permission...
_________________
https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community.
Back to top
View user's profile Send private message Visit poster's website
N0b0dY
Voice


Joined: 20 Jul 2005
Posts: 9

PostPosted: Mon Jul 25, 2005 11:50 am    Post subject: Reply with quote

hmm should i paste that to?
Back to top
View user's profile Send private message
CrazyCat
Revered One


Joined: 13 Jan 2002
Posts: 1032
Location: France

PostPosted: Mon Jul 25, 2005 12:03 pm    Post subject: Reply with quote

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"
_________________
https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community.
Back to top
View user's profile Send private message Visit poster's website
N0b0dY
Voice


Joined: 20 Jul 2005
Posts: 9

PostPosted: Mon Jul 25, 2005 12:10 pm    Post subject: Reply with quote

hmm yes i want the script to work.. i saw in the file where i get it should i paste a link here?
Back to top
View user's profile Send private message
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Mon Jul 25, 2005 12:26 pm    Post subject: Reply with quote

Your using the script by xela. I got rid of that ip check thing and just added
Code:
if {[string match "*quakenet.org" "[getchanhost $nickname $channel]} {
blah
}


I dont remember having that problem though.
_________________
r0t3n @ #r0t3n @ Quakenet
Back to top
View user's profile Send private message MSN Messenger
N0b0dY
Voice


Joined: 20 Jul 2005
Posts: 9

PostPosted: Mon Jul 25, 2005 12:31 pm    Post subject: Reply with quote

You mean i should replace:
Code:

if {[string match "*users.quakenet.org" $userhost]} {
}

With your code?
Back to top
View user's profile Send private message
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Mon Jul 25, 2005 12:36 pm    Post subject: Reply with quote

oh no. I was thinging o my script i made. As you already have
Code:
if {[string match "*users.quakenet.org" $userhost]} {
}

you could maybe just delete all that ip check crap because it never worked for me Very Happy. 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
Back to top
View user's profile Send private message MSN Messenger
N0b0dY
Voice


Joined: 20 Jul 2005
Posts: 9

PostPosted: Mon Jul 25, 2005 12:40 pm    Post subject: Reply with quote

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 Embarassed
But i think you mean set 0 where the 1 is...:
Code:

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

Or am i wrong? Embarassed
Back to top
View user's profile Send private message
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Mon Jul 25, 2005 1:14 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
N0b0dY
Voice


Joined: 20 Jul 2005
Posts: 9

PostPosted: Tue Jul 26, 2005 8:27 am    Post subject: Reply with quote

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

‹@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:

Tcl error [::protection::parse:public]: invalid command name "::protection::command:modechange"
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Tue Jul 26, 2005 10:01 am    Post subject: Reply with quote

Quote:
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:
Quote:
$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.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
N0b0dY
Voice


Joined: 20 Jul 2005
Posts: 9

PostPosted: Tue Jul 26, 2005 12:30 pm    Post subject: Reply with quote

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:

‹@Bagarn› $adduser #Licence [nl]N0bas [nl]N0bas 10
 -aiBOT- Invalid handle characters specified: [, ]

Can i fix that? Embarassed
Back to top
View user's profile Send private message
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Tue Jul 26, 2005 12:45 pm    Post subject: Reply with quote

you are using [] is the handle which eggdrop thinks [nl] its a proc. Use
\[nl\]N0bas or nlN0bas.
_________________
r0t3n @ #r0t3n @ Quakenet
Back to top
View user's profile Send private message MSN Messenger
N0b0dY
Voice


Joined: 20 Jul 2005
Posts: 9

PostPosted: Tue Jul 26, 2005 1:07 pm    Post subject: Reply with quote

hmmm i just cant get it work Embarassed
Code:

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: \, [, \, ]
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber