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 ... 39, 40, 41 ... 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
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Fri May 04, 2007 8:49 pm    Post subject: Reply with quote

It's fairly easy to implement it... I'll see if it'll be added in the next release.
_________________
Follow me on GitHub

- Opposing

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


Joined: 03 Apr 2006
Posts: 32

PostPosted: Sat May 05, 2007 9:26 pm    Post subject: Reply with quote

Hey Fz,

Is there any possible way to implement a way for (either myself or you to include in the next release) a function that allows you to dynamically add bad words and/or advertising rules to the "aplists" (or even anything that's in the aplists file for that matter) file either by PUB/MSG/DCC.

Thus far I've tried adding them directly into the actual script it's self then rehashing, and adding it into "aplists" then rehashing/reloading/resetting the channel, the only way it works is if I add it into aplists then -chan it then +chan it again which is a major inconvenience for the type of situation the bo is in.

Any ideas/suggestions and even snippets would be greatly appreciated.
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat May 05, 2007 9:45 pm    Post subject: Reply with quote

Adding to lists through the ap:add DCC command works just fine, no need for -/+chan at all. Note that the global lists are only used if there are no channel-specific lists. For example if channel #chan has no #chan bwords list then the bot will use the global bwords list. As for adding them via msg/public commands, I already said that I'll take it into consideration.
_________________
Follow me on GitHub

- Opposing

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


Joined: 03 Apr 2006
Posts: 32

PostPosted: Sat May 05, 2007 10:10 pm    Post subject: Reply with quote

I see I see, thanks for the update.

However there was one issue I came across when adding via the command, the bot seems to malfunction when I add the word "[wordhere]" in some cases where the bot is idling people will use the brackets to evade the filtered words, so I thought I'd add them to the filter list as well. The situation is when I add "[wordhere]" the bot starts to ban anyone that types anything, like I just added * or something, I've made sure this was the issue as I isolated it to make sure.

Any ideas?

Edit: I forgot to mention I tried escaping the brackets with \[ and \] but still no go.
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun May 06, 2007 8:15 am    Post subject: Reply with quote

Actually escaping the brackets does work. [] have special meaning in string match, for example if you add "*[ab]*" then you'll be matching any string containing a OR b but if you add "*\[ab\]*" then you'll be matching any string containing [ab].
_________________
Follow me on GitHub

- Opposing

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


Joined: 03 Apr 2006
Posts: 32

PostPosted: Tue May 15, 2007 12:58 am    Post subject: Reply with quote

Ahh, I understand.. but what's the difference between using "*/[ab/]*" and just */[ab/]* as that's what I was using and it was breaking the bot?

And while I have you, can you help me with a another proc I'm having issues with, basically with this next proc I want to test for all the invalid characters, such as ` ~ ! @ # etc etc;

Code:
proc pub:join {nick host hand chan arg} {
   set chan [lindex $arg 0]
   #set match [string map {\\ \\\\ [ \\\[ ] \\\] \{ \\\{ \} \\\}} $match]
   #proc icodes str { regexp {r:\d{1,3}\sb:\d{1,3}\su:\d{1,3}\sc:\d{1,3}} $str }
   if {[matchattr $hand A] == 0} {noaccess2 $nick ; return}
   if {$chan == $match} {notice $nick "You must provide a valid channel name." ; return}
   if {![llength [split $arg]] || [validchan [set channel [lindex [split $arg] 0]]]} {
      putquick "NOTICE $nick :\002join\002\: requires more parameters."
   } else {
      cmdlog $chan $nick $hand "join $chan"
      channel add $chan
      putquick "NOTICE $nick :I have joined \002$chan\002"
      putlog "\[[ctime [unixtime]]\] ($chan|$host) \[$nick:$hand\]: join $chan"
   }
}


I am still a novice so that's probably a bit wrong, basically I want the bot to check for invalid characters when you type (trigger)join #channel, or to make things easier I was thinking if there was a way that you could only type #channel and if you typed anything other than #with_a_word_here it will mark it as invalid, not sure if that's possible.

Thanks again for all your help.
Back to top
View user's profile Send private message
awyeah
Revered One


Joined: 26 Apr 2004
Posts: 1580
Location: Switzerland

PostPosted: Tue May 15, 2007 1:39 am    Post subject: Reply with quote

This should be able to do your job:

Code:

proc pub:join {nick host hand chan arg} {
   set chan [string map {\\ \\\\ [ \\\[ ] \\\] \{ \\\{ \} \\\} $ \\\$ \" \\\"} [string tolower [lindex $arg 0]]]
   if {[string equal "0" [matchattr $hand A]]} {noaccess2 $nick; return 0}
   if {[string equal -nocase $match $chan]} {putserv "NOTICE $nick :You must provide a valid channel name." ; return 0}
   if {![llength [split $arg]] || [validchan $chan]} {
      putquick "NOTICE $nick :\002join\002\: requires more parameters."
   } else {
      cmdlog $chan $nick $hand "join $chan"
      channel add $chan
      putquick "NOTICE $nick :I have joined \002$chan\002"
      putlog "\[[ctime [unixtime]]\] ($chan|$host) \[$nick:$hand\]: join $chan"
   }
}


For all the invalid characters you mentioned, you can use something like:

Code:

if {[string match {*[`~@]*} [string index $chan 0]] || [string equal "##" [string range $chan 0 2]]} { return 0 }

_________________
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
dq
Voice


Joined: 03 Apr 2006
Posts: 32

PostPosted: Tue May 15, 2007 2:17 am    Post subject: Reply with quote

I don't think it's working, at least not for me.. in a nutshell I basically want the bot to check for the invalid characters then return "You must provide a valid etc", with that being said I've done some research and to list all the characters that people could be using is an insanely redundant job, so I thought maybe if the person doesn't provide a word proceeding the hash (#) then the bot will reject it regardless, I'll list some examples below;

Quote:
(trigger)join #
Which will return invalid channel.

Quote:
(trigger)join #any sort of character
Which will return invalid channel.

Quote:
(trigger)join #word
Bot joins the channel.

Hopefully that makes sense =x
Back to top
View user's profile Send private message
awyeah
Revered One


Joined: 26 Apr 2004
Posts: 1580
Location: Switzerland

PostPosted: Tue May 15, 2007 3:22 am    Post subject: Reply with quote

Give this a go, hopefully it should fullfil all your requirements.

Code:

proc pub:join {nick host hand chan text} {
 if {[lindex $text 0] == ""} {
  putserv "PRIVMSG $chan :Please provide a channel name"; return 0
 }
 set chan [string map {\\ \\\\ [ \\\[ ] \\\] \{ \\\{ \} \\\} $ \\\$ \" \\\"} [string tolower [lindex $text 0]]]
 if {[string match {*[`~@$"]*} $chan] || [string match "* *" $chan] || ([regexp -all {\#} $chan] > 1)} {
  putserv "PRIVMSG $chan :Please provide a valid channel name"; return 0
 } 
 if {[string equal "#" [string index $chan 0]] && [string match "#*" $chan] && [regexp -nocase {[0-9a-z]} [string range $chan 1 end]] && ([string length $chan] >= 2)} {
  channel add $chan
  putserv "PRIVMSG $chan :I have joined \002$chan\002."
  }
}

_________________
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Tue May 15, 2007 4:59 am    Post subject: Reply with quote

dq wrote:
Ahh, I understand.. but what's the difference between using "*/[ab/]*" and just */[ab/]* as that's what I was using and it was breaking the bot?

It's *\[ab\]* and not */[ab/]*. With or without quotes makes no difference.

Please keep irrelevant posts out of this thread. This thread is for AllProtection *ONLY*.
_________________
Follow me on GitHub

- Opposing

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


Joined: 31 May 2007
Posts: 4

PostPosted: Thu May 31, 2007 7:21 am    Post subject: Reply with quote

Got a prob with the following. could anybody pls help me?


Quote:
[13:09] Tcl error in file 'baghira.conf':
[13:09] unmatched open quote in list
while executing
"lrange $apl 2 end"
(procedure "rd" line 5)
invoked from within
"rd"
(procedure "load" line 50)
invoked from within
"load"
(in namespace eval "::AllProtection" script line 2567)
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.6b7.tcl" line 140)
invoked from within
"source scripts/allprotection4.6b7.tcl"
(file "baghira.conf" line 1350)
[13:09] * KONFIGURATIONSDATEI NICHT GELADEN (NICHT GEFUNDEN ODER FEHLER)


thx
Back to top
View user's profile Send private message
Balu
Voice


Joined: 31 May 2007
Posts: 4

PostPosted: Thu May 31, 2007 5:17 pm    Post subject: Reply with quote

fixed the prob. when i deleted the applist it worked. but on every rehash of the bot the prob is back again. so i think there is a bug in that applist.

may u can fix that . ty
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Thu May 31, 2007 6:05 pm    Post subject: Reply with quote

Show me the content of your aplists file.
_________________
Follow me on GitHub

- Opposing

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


Joined: 31 May 2007
Posts: 4

PostPosted: Fri Jun 01, 2007 3:30 am    Post subject: Reply with quote

the content of aplist

Quote:
bchans global #example1 #example2 #example3
bnicks global *porno* *horny* *horney* *[censored]* *asshole* *dick* *bitch* *fagget* *shithead* *shitter* *penis* *pussy* *fukker* *camsex* *hure* *nutte* *fick* *[censored]*
bidents global *porno* *horny* *horney* *[censored]* *asshole* *dick* *bitch* *fagget* *shithead* *shitter* *penis* *pussy* *fukker*
bwords global *[censored]* "*bastard *" *cock* "* [censored] *" *ommak* *fag* "* fick*" *fick* *asshole* *bitch* *pussy* "* whore *" "* slut *" *dickhead* *horny* "* shithead *" *fagget* "* dick? *" "* fag? *" "* fuker *" *penis* "* fuk *" *hure* *fotze* *nutte*
adexempts global %chan www.egghelp.org
droneexempts global "*example1*!*@*" "*!*example2*@*" "*!*@example3.net"
bctcrs global "*exploitation script*"
adwords global "*join *" "*plz visit*" "*http://*
ptextl punish 12:6
ptextc punish 750:6
pnotil punish 6:3
pnotic punish 600:4
pctcpf punish 4:20



ty
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Fri Jun 01, 2007 6:19 am    Post subject: Reply with quote

Quote:
adwords global "*join *" "*plz visit*" "*http://*

There's a missing quote after "*http://* you forgot to close the quote. I must ask you, are you adding the elements manually into the file instead of using the .ap:add DCC command?
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
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 ... 39, 40, 41 ... 88, 89, 90  Next
Page 40 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