Im using ban type #3 this is *!*user@*.host.tld , but my network doesnt support this ban type if the identd is more than 9 chars long. I need to cut the identd for example /2 and than add the normal ban type. I mean this:
* Joins: SomeCoolNick (~Some11Chars@some.coolhost.tld)
<SomeCoolNick> visit my http://somespamurl.tld
* SomeCoolNick was kicked by Eggdrop (Invite/Spam (*http://*) :: [Wed Dec 28 08:34:04 2005] - Banned 20 minutes ·<count>·)
* Eggdrop sets mode: +b *!*Chars@*.coolhost.tld
// instead of setting +b *!*Some11Chars@*.coolhost.tld (this couldn't be accepted from the ircd and the user rejoin and be kicked again ...)
And the second thing is some bug in your tcl
It have to be set a ban like ~Ident@IP the bot make the following:
* Eggdrop set mode: +b *!~Identd@IP
// instead to cut the ~ and set a normal ban type like *!*Ident@IP
// and than happen this
* SomeCoolNick was kicked by Eggdrop ( Some reason)
* Joins: SomeCoolNick (*!~Identd@IP)
* SomeCoolNick was kicked by Eggdrop ( Some reason)
* Joins: SomeCoolNick (*!~Identd@IP)
* SomeCoolNick was kicked by Eggdrop ( Some reason)
* Joins: SomeCoolNick (*!~Identd@IP)
* SomeCoolNick was kicked by Eggdrop ( Some reason)
* Joins: SomeCoolNick (*!~Identd@IP)
// ...
Can be fixed this to cut always the ~ and set ban type *!*Ident@IP. Some suggestions ? Thank you
if [string match {[1368]} $type] {
set user *[string trimleft $user ~]
}
the '~' gets trimmed as you can see, so that problem shouldn't occur when using allprotection. UNLESS you're using the extra ban type (10) where the '~' does not get trimmed, but that ban type is *!user@* (not *!user@ip). It'll be fixed in the next version.
[21:10] Tcl error [caps:kick]: can't read "p": no such variable
[21:10] Tcl error [text:char]: can't read "o": no such variable
[21:10] Tcl error [text:line]: can't read "o": no such variable
eggdrop 1.6.17
tcl 8.4.7
What wrong I`ve done?
Thank you.
set l [string range [set l [ap:cf $l]] 0 [expr {[set fo [string first \017 $l]] == -1?"end":"$fo"}]]
and it should work fine.
The problem was that I've added checking if \017 (CTRL+O) code exits, if so it will stop further counting of affected chars (since ctrl+o halts the effect of codes), but when ctrl+o doesn't exist in the text, it'll return -1 which means nothing.