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.

Problems :)

Old posts that have not been replied to for several years.
Locked
I
Insectora
Voice
Posts: 16
Joined: Thu Feb 20, 2003 2:51 am
Location: Germany

Problems :)

Post by Insectora »

Hello.
I have a problem with this script again :))

CODE

Code: Select all

proc daddy_ban_warn {nick host hand ban chan victims} {
        global daddy botnick
        set ban *!*[string range $host [string first "@" $host] end]
        if {![botisop $chan] || [strlwr $hand] == [string trimright [strlwr $victims] " "] || $daddy(ban_protect) == 0} {return 0}
        if {$hand == "*"} {
                if {[string first +userbans [channel info $chan]] != -1} {
                         if {$nick == $botnick} {return 0}
                         putserv "MODE $chan -o+b $nick $ban"
                         putserv "KICK $chan $nick :Don't ban my friends, bud"
                         newchanban $chan $ban Friendprotection "Friend was banned off $chan"
                         adduser $nick $nick!*@*
                         chattr $nick +d
                         return 0
                }
        return 0
        }

Before i edit the tcl, this script bans the bad guy on his nick.
But i wanted the script to ban on the address of the bad guy, and i aded
the line
set ban *!*[string range $host [string first "@" $host] end]

and raplace
putserv "MODE $chan -o+b $nick $nick"

With
putserv "MODE $chan -o+b $nick $ban"

and also edit {nick hand ban chan victims} to {nick host hand ban chan victims}, i only added the "host"

I and after all this i hoped the bot to ban the bad guy to his *!*@adress :))
But when i test the script , There was this error

TCL error [daddy_watch_mode]: no value given for parameter "victims" to "daddy_ban_warn"

why??
I only added the "host" !

Pls help me and tell me how to prevent this error in this script and future scripts :))
Stealth
User avatar
Yourname
Master
Posts: 358
Joined: Mon Sep 24, 2001 8:00 pm
Location: Toronto

Post by Yourname »

I dunno about the script error, but I know that this is the wrong place you have posted your question in. You must've tried putting it in the TCL section. :)
Dormant egghead.
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

wrong section ;)

as for the error... you can't simply just add another "input", if the proc is expecting 6 inputs it gives you an error if you suply just 5, the number and type of inputs varies with each type of bind..
I suggest you go and read about binds in the tcl-commands.doc file in the /doc dir on your eggdrop..

it's an amazing file which would halfe the questions asked in the TCL section if people would just read it ... ;)
Elen sila lúmenn' omentielvo
Locked