egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

AllProtection.tcl (Stable: v4.8 / Beta: v4.9b4)
Goto page Previous  1, 2, 3 ... 85, 86, 87, 88, 89, 90  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
MrBenC
Voice


Joined: 24 Nov 2012
Posts: 4

PostPosted: Tue Dec 04, 2012 2:08 pm    Post subject: Reply with quote

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:

[17:43:16] * Wrote DEBUG
[17:43:16] * SEGMENT VIOLATION -- CRASHING!
[03] [0] OK Disconnected


The DEBUG file always looks something like this:


Code:

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
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Tue Dec 04, 2012 5:56 pm    Post subject: Reply with quote

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, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
bryanwny
Voice


Joined: 09 Sep 2012
Posts: 24

PostPosted: Tue Jan 22, 2013 4:52 pm    Post subject: Reply with quote

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. Very Happy
Back to top
View user's profile Send private message
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 792
Location: Tennessee, USA

PostPosted: Tue Jan 22, 2013 6:22 pm    Post subject: Reply with quote

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

Code:

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
.
Back to top
View user's profile Send private message Visit poster's website
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 792
Location: Tennessee, USA

PostPosted: Tue Jan 22, 2013 6:49 pm    Post subject: Reply with quote

Looked at the string matching code and found this...
Code:
    if {[string match -nocase $bw $arg]} {


Changing that line to something more like...
Code:
    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:

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
.
Back to top
View user's profile Send private message Visit poster's website
bryanwny
Voice


Joined: 09 Sep 2012
Posts: 24

PostPosted: Tue Jan 22, 2013 7:36 pm    Post subject: Reply with quote

That worked great, SpiKe^^. Thanks yet again! Smile
Back to top
View user's profile Send private message
Arkadietz
Halfop


Joined: 14 Jul 2006
Posts: 67
Location: cat /dev/zero > /dev/null;

PostPosted: Mon Mar 11, 2013 5:35 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Mar 16, 2013 10:13 am    Post subject: Reply with quote

Interesting info, but your point is?
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
alkoleht
Voice


Joined: 26 Jun 2011
Posts: 6

PostPosted: Mon Apr 08, 2013 2:41 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
bryanwny
Voice


Joined: 09 Sep 2012
Posts: 24

PostPosted: Thu Nov 28, 2013 4:00 am    Post subject: Reply with quote

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? Smile

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! Wink
Back to top
View user's profile Send private message
hibs
Voice


Joined: 11 Dec 2013
Posts: 3

PostPosted: Wed Dec 11, 2013 6:05 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
plankton
Voice


Joined: 14 Dec 2013
Posts: 1

PostPosted: Sat Dec 14, 2013 9:35 pm    Post subject: Allprotection 4.7 on Eggdrop 1.8 Reply with quote

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.
Quote:
[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$
Back to top
View user's profile Send private message
spithash
Master


Joined: 12 Jul 2007
Posts: 248
Location: Libera

PostPosted: Fri Dec 20, 2013 9:31 am    Post subject: Reply with quote

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:
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
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Diamond85
Voice


Joined: 25 Oct 2008
Posts: 27

PostPosted: Sun Jan 05, 2014 3:27 pm    Post subject: Hello Sir_Fz. Channel mode +l (user limit) Reply with quote

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" :/
Back to top
View user's profile Send private message
Diamond85
Voice


Joined: 25 Oct 2008
Posts: 27

PostPosted: Mon Jan 06, 2014 5:03 am    Post subject: Re: Allprotection 4.7 on Eggdrop 1.8 Reply with quote

@plankton change:
Code:
set antispam(ip) ${my-ip}

to:
Code:
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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Goto page Previous  1, 2, 3 ... 85, 86, 87, 88, 89, 90  Next
Page 86 of 90

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber