| View previous topic :: View next topic |
| Author |
Message |
Ni0 Voice
Joined: 12 Dec 2005 Posts: 13
|
Posted: Wed Dec 14, 2005 8:50 pm Post subject: Default ban mask @ command .kickban |
|
|
i have this code (adds handle at command .kickban (or .kb))
but i want the default banmask be *!*@fullhost and not *!*identd@*host. t. Without @nick at command
| Code: | unbind dcc o|o kickban *dcc:kickban;
bind dcc o|o kb kban:kickban
proc kban:kickban {handle idx arg} {
if {$arg == ""} {
*dcc:kickban $handle $idx $arg
return 0
}
set date [strftime %d/%m/%y]
set defr "\002Banned Without Reason"
set host [lindex [split $arg] 0]
if {[string first # [set c [lindex [split $arg] 1]]] == 0} {
if {[string first % [set t [lindex [split $arg] 2]]] == 0} {
if {[set r [join [lrange [split $arg] 3 end]]] == ""} {
set r $defr
}
*dcc:kickban $handle $idx "$host $c $t $handle:\002 $r"
}
} {
if {[string first % [set t [lindex [split $arg] 1]]] == 0} {
if {[set r [join [lrange [split $arg] 2 end]]] == ""} {
set r $defr
}
*dcc:kickban $handle $idx "$host $t $handle:\002 $r"
} {
if {[set r [join [lrange [split $arg] 1 end]]] == ""} {
set r $defr
}
*dcc:kickban $handle $idx "$host $handle:\002 $r"
}
}
} |
Any Help?  |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Wed Dec 14, 2005 9:54 pm Post subject: |
|
|
| Quote: | .help kickban
### kickban [channel] [-|@]<nickname> [comment]
Kicks and bans a user from the specified channel with the with the
comment/reason given. Your handle will be attached to the ban in the
bot's internal ban list, and the ban will last for whatever time is set
for the channel's ban-time. The ban will be a channel-specific ban. Use
'.+ban' for a more permanent ban, which can be activated on every
channel the bot monitors. Appending a prefix of - or @ to a nickname
changes the banmask used:
For example, with a hostmask of nick!ident@host.name.domain:
Command Banmask
.kickban nick *!*dent@*.name.domain
.kickban -nick *!*dent@host.name.domain
.kickban @nick *!*@host.name.domain
Or with a host of nick!~ident@host.name.domain (strict-host set to 1):
Command Banmask
.kickban nick *!*ident@*.name.domain
.kickban -nick *!*ident@host.name.domain
See also: chanset, chaninfo, -ban, +ban, bans, stick |
That means if you use @ before the nickname, it'll ban *!*@host. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
Ni0 Voice
Joined: 12 Dec 2005 Posts: 13
|
Posted: Wed Dec 14, 2005 10:04 pm Post subject: |
|
|
| yeap but i said i want this without the @ at command. |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Thu Dec 15, 2005 12:09 am Post subject: |
|
|
do not pass through default *dcc:kickban and use:
| Code: |
scan [getchanhost $nick] {%*[^@]@%s} host
|
_________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
Nor7on Op

Joined: 03 Mar 2007 Posts: 185 Location: Spain - Barcelona
|
Posted: Tue May 20, 2008 5:46 pm Post subject: hi. |
|
|
Hi everybody.
can fix this code for the last version of eggdrop 1.6.18?
| Code: |
unbind dcc o|o kickban *dcc:kickban;
bind dcc o|o kb kban:kickban
proc kban:kickban {handle idx arg} {
if {$arg == ""} {
*dcc:kickban $handle $idx $arg
return 0
}
set date [strftime %d/%m/%y]
set nick [lindex $arg 0]
set defr "\002Banned Without Reason"
set host [getchanhost $nick]
if {[string first # [set c [lindex [split $arg] 1]]] == 0} {
if {[string first % [set t [lindex [split $arg] 2]]] == 0} {
if {[set r [join [lrange [split $arg] 3 end]]] == ""} {
set r $defr
}
*dcc:kickban $handle $idx "$host $c $t $handle:\002 $r"
}
} {
if {[string first % [set t [lindex [split $arg] 1]]] == 0} {
if {[set r [join [lrange [split $arg] 2 end]]] == ""} {
set r $defr
}
*dcc:kickban $handle $idx "$host $t $handle:\002 $r"
} {
if {[set r [join [lrange [split $arg] 1 end]]] == ""} {
set r $defr
}
*dcc:kickban $handle $idx "$host $handle:\002 $r"
}
}
}
|
something wrong with this code, 'cause i put in partyline and:
| Code: |
<Nor7on> .kb testnick
<)Chasse> Invalid console channel.
<Nor7on> .kb #mychan testnick
<)Chasse> Invalid console channel.
|
when i put:
<Nor7on> .kb testnick #madrid
don't get error, but no found.
i want, when i put .kb nick, my eggdrop put ban(*!*@host.domain; perm) and kick in my channel.
can helpme?
thanks. |
|
| Back to top |
|
 |
|