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.

.+ban and .kickban in a tcl script

Help for those learning Tcl or writing their own scripts.
Post Reply
t
tucow
Voice
Posts: 3
Joined: Mon Jul 31, 2006 11:57 am

.+ban and .kickban in a tcl script

Post by tucow »

Hello,

how could i use .+ban and .kickban in a tcl script?

I tried the following, but it doesn't work :/

Code: Select all

####### kban proc #######
proc kban {nickname hostname handle channel arguments} {
    global botnick
    if {[lindex [split $arguments] 0] == $botnick} { return 0 }
    kickban $botnick kickban [lindex [split $arguments] 0] [lrange [split $arguments] 1 end]
}

####### pban proc #######
proc pban {nickname hostname handle channel arguments} {
    global botnick
    if {[lindex [split $arguments] 0] == $botnick} { return 0 }
    +ban [lindex [split $arguments] 0] [lrange [split $arguments] 1 end]
}
What shall i do?
N
Nara
Halfop
Posts: 40
Joined: Sun Jul 23, 2006 11:12 pm

Post by Nara »

If I'm not mistaken, there's not an integrated ban command, so you have to putmode a +b hostmask and then a putkick on them.

As for +ban, if it's a channel ban, use newchanban. If it's a global ban, use newban.

~Nara
User avatar
krimson
Halfop
Posts: 86
Joined: Wed Apr 19, 2006 8:12 am

Post by krimson »

@tucow: as Nara pointed out, dcc commands are not the same with tcl commands accepted by eggdrop. you should read tcl-commands.doc in your ~/docs folder
Post Reply