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.

AllProtection.tcl (Stable: v4.8 / Beta: v4.9b4)

Support & discussion of released scripts, and announcements of new releases.
Post Reply
I
IRCNick
Halfop
Posts: 64
Joined: Wed Oct 12, 2005 9:43 pm
Location: Germany
Contact:

Extention and some troubles with existing tcl

Post by IRCNick »

Hi again,

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:

Code: Select all

* 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:

Code: Select all

* 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
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

turn strict-host off and convince SirFz to use eggdrop's [maskhost], it truncates long idents properly
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
I
IRCNick
Halfop
Posts: 64
Joined: Wed Oct 12, 2005 9:43 pm
Location: Germany
Contact:

Post by IRCNick »

strict-host was already off

Code: Select all

set strict-host 0
It seem this isn't the problem...
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

hmm yeah, if he's using his own maskhost proc - which he obviously does - strict-host probably won't matter as it should
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

demond wrote:turn strict-host off and convince SirFz to use eggdrop's [maskhost], it truncates long idents properly
I'm using user's maskhost proc from the Tcl faq, I'll see what can be done for this situation.
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Sir_Fz wrote:
demond wrote:turn strict-host off and convince SirFz to use eggdrop's [maskhost], it truncates long idents properly
I'm using user's maskhost proc from the Tcl faq, I'll see what can be done for this situation.
I could have sworn that procedure removed the tilde from the identd.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Just looked into it, it does:

Code: Select all

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.
t
traxx
Voice
Posts: 11
Joined: Tue Jan 03, 2006 7:23 am

Post by traxx »

Hi there,

everytime I try to start the bot the following error appears:

Code: Select all

[11:01:28] <moonbot> [11:01] Tcl error in file 'Moonbot.conf':
[11:01:28] <moonbot> [11:01] invalid command name "timerexists"
[11:01:28] <moonbot>     while executing
[11:01:28] <moonbot> "timerexists config:lim"
[11:01:28] <moonbot>     invoked from within
[11:01:28] <moonbot> "if {$clim(ctype)} {
[11:01:28] <moonbot>  if {[timerexists config:lim] == ""} {
[11:01:28] <moonbot>   timer $clim(ctime) [list config:lim]
[11:01:28] <moonbot>  }
[11:01:28] <moonbot> } {
[11:01:28] <moonbot>  if {[utimerexists config:lim] == ""} {
[11:01:28] <moonbot>   uti..."
[11:01:28] <moonbot>     (file "scripts/Moonbot/antiflood.tcl" line 1166)
[11:01:28] <moonbot>     invoked from within
[11:01:28] <moonbot> "source scripts/Moonbot/antiflood.tcl"
[11:01:28] <moonbot>     (file "Moonbot.conf" line 1298)
[11:01:28] <moonbot> [11:01] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)
-
Do you have an idea what the reason for this error is? Btw: I did not touch the script except the config-section.

Thanks in advance for reading.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

You nee alltools.tcl for that to work, but that's not necessary with the new version. Upgrade your script.
User avatar
username
Op
Posts: 196
Joined: Thu Oct 06, 2005 9:20 am
Location: Russian Federation, Podolsk
Contact:

Post by username »

Hello
I have a trouble: in partyline I see such thing:

Code: Select all

[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.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

When loading AllProtection for the first time, you need to .restart. If you don't wish to restart then use the
.ap:reset #channel
command for all your channels to set the default channel settings on them.

This gives me the idea of adding the feature of using .ap:reset * to reset settings on all channels.
m
minted
Halfop
Posts: 64
Joined: Wed Jul 20, 2005 9:58 am

Post by minted »

Sir_Fz wrote:As for the codes not working, it's working fine on my bot but I'll check with other users and see if it's working.
anyone else mention anything about codes kick not working?
its a shame, its a useful feature for our server.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Yeah I found out about this issue and I already fixed it in the version-to-be-released. If you want a quick fix, do the following:

In proc ap:ccodes (line 2126), change:

Code: Select all

set l [ap:cf $l] ; set l [string range $l 0 [string first \017 $l]]
to

Code: Select all

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.
m
minted
Halfop
Posts: 64
Joined: Wed Jul 20, 2005 9:58 am

Post by minted »

works :)
thanks

small note, i've noticed that ppl using all text underlined bypass the long text(chars) kick.
User avatar
username
Op
Posts: 196
Joined: Thu Oct 06, 2005 9:20 am
Location: Russian Federation, Podolsk
Contact:

Post by username »

Hello.
This is my trouble:
[ 18:27:32 ] · · Kicks: xokc41 was kicked from #code by [ MATPOC ] : [ Excess chars detected. (400 chars in 0.0 secs) :: [Thu Jan 12 18:25:08 2006] - Banned dohuya minutes ·19· ]
[ 18:27:32 ] · · Joins: xokc41 [ Miranda@192.168.122.ircnet-3488]
[ 18:27:32 ] · · ChanMode: MATPOC sets mode [ +b ] *!Miranda@192.168.122.ircnet-3488
[ 18:27:33 ] · · ChanMode: MATPOC sets mode [ +mR ]
flooder back to chan after kick before bot setup the ban.
Post Reply