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
M
MrBenC
Voice
Posts: 4
Joined: Sat Nov 24, 2012 3:36 am

Post by MrBenC »

So apparently, this script seems to cause a problem. I'm pretty sure it's this one, but I'm not sure of the cause, making it difficult to fix.

I've spent a fair amount of time searching on Google, to no avail. So far, I haven't had the time to look into the problem myself, so perhaps someone else can advise.

What happens is that most of the time, the bot will just keep running like usual, until for an unexplained reason, the bot will just crash. I haven't noticed any pattern in particular, making it even harder to pin-point the cause.

I always get the following error message in Telnet:

Code: Select all

[17:43:16] * Wrote DEBUG
[17:43:16] * SEGMENT VIOLATION -- CRASHING!
[03] [0] OK Disconnected
The DEBUG file always looks something like this:

Code: Select all

Debug (eggdrop v1.6.21) written Mon Dec  3 17:43:15 2012
Full Patch List: 
Tcl library: /usr/share/tcltk/tcl8.4
Tcl version: 8.4.19 (header version 8.4.19)
Tcl is threaded
Configure flags: 
Compile flags: gcc -g -O2 -pipe -Wall -I.. -I.. -DHAVE_CONFIG_H  
Link flags: gcc
Strip flags: touch
Context: tclhash.c/710, [Tcl proc: ::AllProtection::pubms bcodes, param:  $_pubm1 $_pubm2 $_pubm3 $_pubm4 $_pubm5]
         tclhash.c/721, []
         tclhash.c/706, []
         tclhash.c/710, [Tcl proc: ::AllProtection::pubms btextc, param:  $_pubm1 $_pubm2 $_pubm3 $_pubm4 $_pubm5]
         tclhash.c/721, []
         tclhash.c/706, []
         tclhash.c/710, [Tcl proc: ::AllProtection::pubms btextl, param:  $_pubm1 $_pubm2 $_pubm3 $_pubm4 $_pubm5]
         tclhash.c/721, []
         tclhash.c/706, []
         tclhash.c/710, [Tcl proc: ::AllProtection::pubms textc, param:  $_pubm1 $_pubm2 $_pubm3 $_pubm4 $_pubm5]
         tclhash.c/721, []
         tclhash.c/706, []
         tclhash.c/710, [Tcl proc: ::AllProtection::pubms textl, param:  $_pubm1 $_pubm2 $_pubm3 $_pubm4 $_pubm5]
         tclhash.c/721, []
         tclhash.c/706, []
         tclhash.c/710 [Tcl proc: ::url::check, param:  $_pubm1 $_pubm2 $_pubm3 $_pubm4 $_pubm5]

<snip>

Compiled without extensive memory debugging (sorry).
Open sockets: 3 (listen), 4 (passed on), 6 (inbuf: 0085), 7, 10 (file), done.
The server runs Debian 6.0, always kept up to date, if that's relevant.

I've set up a crontab to start the bot within 2 minutes of crashing, just in case. Nevertheless, this is mildly annoying. As everyone knows, the Eggdrop process will do nothing on IRC for a few minutes as it reconnects and rejoins channels.

As the bot is the only bot providing channel protection for over a dozen channels, including a couple large ones, I would like to fix this, if at all possible.
Ben
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

The problem is rather a bug in your eggdrop. If you could build your eggdrop with debugging symbols enabled (make debug instead of make eggdrop), and enable coredumps (ulimit -c 10240 or so should do the trick) on the shell before starting your eggdrop; you'd get something to actually get working on.

Contexts are merely tagged spots in the sourcecode that your eggdrop recently traversed through prior it crashing; tclhash.c/710 is part of handling bindings, such as pubm (used by allprotection). There's no guarantee that the bug causing the crash is anywhere related to any of those context's.
NML_375
b
bryanwny
Voice
Posts: 24
Joined: Sun Sep 09, 2012 10:35 pm

Post by bryanwny »

I have a question in regards to the bwords list.

Let's say the badword is "tick" just to keep this forum friendly.

If I add 'tick', it will only punish them if the person says 'tick' and ONLY tick, not 'I have a tick on me'. It doesn't seem to focus on individual words, but on the ENTIRE line typed as a whole. Is there a way to change that so it basically recognizes spaces before/after words and focuses on each individual word in a sentence?

I tried 'tick*', and it will kick on 'ticks', 'ticked', 'tickled', etc, as expected. But, it won't kick if you put anything BEFORE those words, unless you added it as *tick* which I don't want to do because then it kicks 'look at those sticks', for example.

I hope someone can make some sense of that. :D
User avatar
SpiKe^^
Owner
Posts: 831
Joined: Fri May 12, 2006 10:20 pm
Location: Tennessee, USA
Contact:

Post by SpiKe^^ »

My guess is, with badwords that are touchie, because they may be part of a larger allowed word, you must add multiple masks...

Code: Select all

set bwords(global) {
 tick
 "tick *"
 "* tick *"
 "* tick"
}

First mask to catch the word by itself
Second to catch the word at the beginning of the line
Third to catch the word in the middle of the line
And the last to catch the word at the end of the line

I have not looked at the matching routine used in the script, but I am fairly sure this will work:)
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
User avatar
SpiKe^^
Owner
Posts: 831
Joined: Fri May 12, 2006 10:20 pm
Location: Tennessee, USA
Contact:

Post by SpiKe^^ »

Looked at the string matching code and found this...

Code: Select all

    if {[string match -nocase $bw $arg]} {
Changing that line to something more like...

Code: Select all

    if {[string match -nocase $bw " $arg "]} {
...makes all of the masks easier to write & more likely to match.

So with that small code change, the only mask you would need is:

Code: Select all

set bwords(global) {
 "* tick *"
}

Goodluck.
SpiKe^^

Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
.
b
bryanwny
Voice
Posts: 24
Joined: Sun Sep 09, 2012 10:35 pm

Post by bryanwny »

That worked great, SpiKe^^. Thanks yet again! :)
User avatar
Arkadietz
Halfop
Posts: 67
Joined: Fri Jul 14, 2006 11:43 am
Location: cat /dev/zero > /dev/null;

Post by Arkadietz »

btw this is syntax check from http://paste.tclhelp.net/?id=csr

Line 158: NOTICE: Non constant argument to variable: $declr
Line 1580: NOTICE: Found constant "nick" which is also a variable.
Line 1829: WARNING: No braces around code in control statement.
Line 1879: WARNING: No braces around code in utimer statement.
Line 2188: NOTICE: Non constant argument to variable: $list
Line 2189: NOTICE: Suspicious variable name "$list"
Line 2269: WARNING: No braces around code in utimer statement.
Line 2391: WARNING: No braces around code in utimer statement.
Line 2420: WARNING: No braces around code in utimer statement.
Line 2623: NOTICE: Suspicious variable name "[namespace current]::NumKicks"
Line 2732: WARNING: No braces around code in utimer statement.
On a unix system everything is a file ; if something is not a file , it is a proccess.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Interesting info, but your point is?
a
alkoleht
Voice
Posts: 6
Joined: Sun Jun 26, 2011 8:12 am

Post by alkoleht »

Hi
First let me say that AllProtection has been a HUGE help to run my channels and keep the order. Great work.
I have multiple bots running the script and they work just perfect.
However i have been having ... well not trouble but hard to use some commands so that all bots are updated. Thanks to netbots i can set most of the chan settings thru netchanset but there are couple things that in order to change/edit them i need to DCC into each bot manually. Example of two things i use most:

adding/removing badwords and others
disabling/enabling AP in certain channels

I was wondering would it be possible to edit/add to script that i would be able to update all bots all at once. even pub commands would be very useful.
example adding bad words or enabling/disabling AP in certain chan:

!ap:add bword <word> <chan>
!ap:disable/enable <chan>

or something similar thru DCC so all bots running AP would update. Some solution to this would help a lot.

Thank you
b
bryanwny
Voice
Posts: 24
Joined: Sun Sep 09, 2012 10:35 pm

Post by bryanwny »

I have just turned on the advertising portion of the script, and the only entry I have for adwords is "*http://*". I also removed the global entries. I disabled the part/quit ban option for swears and advertisements.

It works as intended for the "*http://*" spams. The problem I'm running into is that people are getting banned for advertising channels. For example, someone said "Welcome to #chan" and was booted with a kb msg of "(Advertising detected. (* #c*) :: Banned 60 minutes.)"

I have tried adding an exempt for "*#*" without any luck. Is this built into the script without an easy way to disable it, or am I missing something? :)

EDIT: Derp, nevermind. Don't mess with the bot at 3am I suppose -- I didn't pay enough attention to the "(no wildcards used)" comment lol. Added just "#" to adexempt and it works great now! ;)
h
hibs
Voice
Posts: 3
Joined: Wed Dec 11, 2013 5:12 am

Post by hibs »

Hi, in the script i'm using the default exmptype is set like this variable exmptype {ops voices +fmo|+fmo}.
So how to set for one channel exempts voice, for another ops and voices
p
plankton
Voice
Posts: 1
Joined: Sat Dec 14, 2013 9:31 pm

Allprotection 4.7 on Eggdrop 1.8

Post by plankton »

Hi ,
I am getting this annoying error while I am trying to load AP 4.7 on egg 1.8. it works perfect with 1.6.21 but giving error in 1.8.. I cant even load it.. here is the error in PuTTy when I try to load the .tcl. can u pls help me how to fix this error ?
thx.
[02:26:35] Module loaded: channels
[02:26:35] Module loaded: server
[02:26:35] Module loaded: ctcp
[02:26:35] Module loaded: irc
[02:26:35] Module loaded: notes (with lang support)
[02:26:35] Module loaded: console (with lang support)
[02:26:35] Module loaded: uptime
[02:26:35] Tcl error in file 'plankton.conf':
[02:26:35] can't read "my-ip": no such variable
while executing
"set antispam(ip) ${my-ip}"
(in namespace eval "::AllProtection" script line 364)
invoked from within
"namespace eval AllProtection {

# Basic declarations: (don't touch)
variable declr
foreach declr {textl textc notcl notcc capsp repeatf codesf adexemp..."
(file "scripts/allprotection4.7.tcl" line 151)
invoked from within
"source scripts/allprotection4.7.tcl"
(file "plankton.conf" line 1488)
[02:26:35] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)
user@shell:~/plankton$
User avatar
spithash
Master
Posts: 249
Joined: Thu Jul 12, 2007 9:21 am
Location: Libera
Contact:

Post by spithash »

let's say I want to ban users with NO CTCP VERSION reply, what do I have to put in the list? here or partyline for example?

Code: Select all

set bctcrs(global) {

}
I am trying to ban some spambots/drones which return no ctcp version reply
Libera ##rtlsdr & ##re - Nick: spithash
Click here for troll.tcl
D
Diamond85
Voice
Posts: 27
Joined: Sat Oct 25, 2008 5:12 pm

Hello Sir_Fz. Channel mode +l (user limit)

Post by Diamond85 »

Is it possible to change the limit range so.
The one ".chanset #channel ap:maxlimit 300"?.
Then the eggdrop does not set the limit higher.
and if the channel is full, the user will automatically be directed then in the +L channel.

and if +L is not set.
then the eggdrop set +L #channel from ".chanset #channel ap:redirectchan #channel" ?

I hope you understand what I mean "my english very bad" :/
D
Diamond85
Voice
Posts: 27
Joined: Sat Oct 25, 2008 5:12 pm

Re: Allprotection 4.7 on Eggdrop 1.8

Post by Diamond85 »

@plankton change:

Code: Select all

set antispam(ip) ${my-ip}
to:

Code: Select all

set antispam(ip) 127.0.0.1
if the ircd run local other change it to the ircd ip. it works good 4 me.

click here and you can see why its comming the error on 1.8
Post Reply