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 

help please[solved]

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
blake
Master


Joined: 23 Feb 2009
Posts: 201

PostPosted: Thu Dec 03, 2009 10:16 am    Post subject: help please[solved] Reply with quote

Hey
im trying to get this script to work its setting the chansets from DCC but it is not kicking the users with set ages from the set rooms added via dcc im getting no errors when loading it and none when a user joins channels also no errors when setting chansets is their any way to make it a smaller script ive used seperate scripts but its lagged the hell out of my bot and then stops kicking underaged overaged of wrong gender

ps sorry about the lenght of it

Code:
set bad(fullnames) {
"*18*"
"*19*"
"*20*"
"*21*"
"*22*"
"*23*"
"*24*"
"*25*"
"*26*"
"*27*"
"*28*"
"*29*"
"*30*"
"*31*"
"*32*"
"*33*"
"*34*"
"*35*"
"*36*"
"*37*"
"*38*"
"*39*"
"*40*"
"*41*"
"*42*"
"*43*"
"*44*"
"*45*"
"*46*"
"*47*"
"*48*"
"*49*"
"*50*"
"*51*"
"*52*"
"*53*"
"*54*"
"*55*"
"*56*"
"*57*"
"*58*"
"*59*"
"*60*"
"*61*"
"*62*"
"*63*"
"*64*"
"*65*"
"*66*"
"*67*"
"*68*"
"*69*"
"*70*"
"*71*"
"*72*"
"*73*"
"*74*"
"*75*"
"*76*"
"*77*"
"*78*"
"*79*"
"*80*"
"*81*"
"*82*"
"*83*"
"*84*"
"*85*"
"*86*"
"*87*"
"*88*"
"*89*"
"*90*"
"*91*"
"*92*"
"*93*"
"*94*"
"*95*"
"*96*"
"*97*"
"*98*"
"*99*"
"*100*"
}

set bad(reason) "You Are not permitted on this channel please join another
room!"
set bad(time) "1"
set bad(flags) "0hf|ohf"
setudef flag badfullname13+
setudef flag badfullname16+
setudef flag badfullname18+
setudef flag badfullname30+
setudef flag badfullname50+
setudef flag badfullname60+
setudef flag badfullnamefemale
setudef flag badfullnamemale

bind join -|- "* *" badrealname

proc badrealname {nickname hostname handle channel} {
global botnick
set ::cchan $channel
set ::nnick $nickname
set ::hhost $hostname
if { [channel get $channel badfullname13+] } {
if {![botisop $channel]} { return 0 }
if {[onchan $nickname $channel]} {
putquick "WHOIS $nickname $nickname"
bind RAW - 311 badfullnames
}
}
}

proc badfullnames { from keyword arguments } {
global botnick bad
set channel $::cchan
set nickname $::nnick
set host $::hhost
set handle "[nick2hand $nickname]"
set fullname [string range [join [lrange $arguments 5 end]] 1 end]
if {[onchan $nickname $channel]} {
          set banmask *!*@[lindex [split [getchanhost $nickname $channel] "@"] 1]
   }
  foreach realname [string tolower $bad(fullnames)] {
if {[string match $realname [string tolower $fullname]]} {
if {[matchattr $handle $bad(flags) $channel]} { return 0 }
newchanban $channel $banmask $botnick $bad(reason) [expr $bad(time) * 60]
}
}
unbind RAW - 311 badfullnames
}

set bad(fullnames) {
"*13 male*"
"*14 male*"
"*15 male*"
"*13 female*"
"*14 female*"
"*15 female*"
}

bind join -|- "* *" badrealname

proc badrealname {nickname hostname handle channel} {
global botnick
set ::cchan $channel
set ::nnick $nickname
set ::hhost $hostname
if { [channel get $channel badfullname16+] } {
if {![botisop $channel]} { return 0 }
if {[onchan $nickname $channel]} {
putquick "WHOIS $nickname $nickname"
bind RAW - 311 badfullnames
}
}
}

proc badfullnames { from keyword arguments } {
global botnick bad
set channel $::cchan
set nickname $::nnick
set host $::hhost
set handle "[nick2hand $nickname]"
set fullname [string range [join [lrange $arguments 5 end]] 1 end]
if {[onchan $nickname $channel]} {
          set banmask *!*@[lindex [split [getchanhost $nickname $channel] "@"] 1]
   }
  foreach realname [string tolower $bad(fullnames)] {
if {[string match $realname [string tolower $fullname]]} {
if {[matchattr $handle $bad(flags) $channel]} { return 0 }
newchanban $channel $banmask $botnick $bad(reason) [expr $bad(time) * 60]
}
}
unbind RAW - 311 badfullnames
}

set bad(fullnames) {
"*13*"
"*14*"
"*15*"
"*16*"
"*17"
}

bind join -|- "* *" badrealname

proc badrealname {nickname hostname handle channel} {
global botnick
set ::cchan $channel
set ::nnick $nickname
set ::hhost $hostname
if { [channel get $channel badfullname18+] } {
if {![botisop $channel]} { return 0 }
if {[onchan $nickname $channel]} {
putquick "WHOIS $nickname $nickname"
bind RAW - 311 badfullnames
}
}
}

proc badfullnames { from keyword arguments } {
global botnick bad
set channel $::cchan
set nickname $::nnick
set host $::hhost
set handle "[nick2hand $nickname]"
set fullname [string range [join [lrange $arguments 5 end]] 1 end]
if {[onchan $nickname $channel]} {
          set banmask *!*@[lindex [split [getchanhost $nickname $channel] "@"] 1]
   }
  foreach realname [string tolower $bad(fullnames)] {
if {[string match $realname [string tolower $fullname]]} {
if {[matchattr $handle $bad(flags) $channel]} { return 0 }
newchanban $channel $banmask $botnick $bad(reason) [expr $bad(time) * 60]
}
}
unbind RAW - 311 badfullnames
}

set bad(fullnames) {
"*13*"
"*14*"
"*15*"
"*16*"
"*17*"
"*18*"
"*19*"
"*20*"
"*21*"
"*22*"
"*23*"
"*24*"
}
bind join -|- "* *" badrealname

proc badrealname {nickname hostname handle channel} {
global botnick
set ::cchan $channel
set ::nnick $nickname
set ::hhost $hostname
if { [channel get $channel badfullname30+] } {
if {![botisop $channel]} { return 0 }
if {[onchan $nickname $channel]} {
putquick "WHOIS $nickname $nickname"
bind RAW - 311 badfullnames
}
}
}

proc badfullnames { from keyword arguments } {
global botnick bad
set channel $::cchan
set nickname $::nnick
set host $::hhost
set handle "[nick2hand $nickname]"
set fullname [string range [join [lrange $arguments 5 end]] 1 end]
if {[onchan $nickname $channel]} {
          set banmask *!*@[lindex [split [getchanhost $nickname $channel] "@"] 1]
   }
  foreach realname [string tolower $bad(fullnames)] {
if {[string match $realname [string tolower $fullname]]} {
if {[matchattr $handle $bad(flags) $channel]} { return 0 }
newchanban $channel $banmask $botnick $bad(reason) [expr $bad(time) * 60]
}
}
unbind RAW - 311 badfullnames
}

set bad(fullnames) {
"*13*"
"*14*"
"*15*"
"*16*"
"*17*"
"*18*"
"*19*"
"*20*"
"*21*"
"*22*"
"*23*"
"*24*"
"*25*"
"*26*"
"*27*"
"*28*"
"*29*"
"*30*"
"*31*"
"*32*"
"*33*"
"*34*"

}

bind join -|- "* *" badrealname

proc badrealname {nickname hostname handle channel} {
global botnick
set ::cchan $channel
set ::nnick $nickname
set ::hhost $hostname
if { [channel get $channel badfullname50+] } {
if {![botisop $channel]} { return 0 }
if {[onchan $nickname $channel]} {
putquick "WHOIS $nickname $nickname"
bind RAW - 311 badfullnames
}
}
}

proc badfullnames { from keyword arguments } {
global botnick bad
set channel $::cchan
set nickname $::nnick
set host $::hhost
set handle "[nick2hand $nickname]"
set fullname [string range [join [lrange $arguments 5 end]] 1 end]
if {[onchan $nickname $channel]} {
          set banmask *!*@[lindex [split [getchanhost $nickname $channel] "@"] 1]
   }
  foreach realname [string tolower $bad(fullnames)] {
if {[string match $realname [string tolower $fullname]]} {
if {[matchattr $handle $bad(flags) $channel]} { return 0 }
newchanban $channel $banmask $botnick $bad(reason) [expr $bad(time) * 60]
}
}
unbind RAW - 311 badfullnames
}

set bad(fullnames) {
"*13*"
"*14*"
"*15*"
"*16*"
"*17*"
"*18*"
"*19*"
"*20*"
"*21*"
"*22*"
"*23*"
"*24*"
"*25*"
"*26*"
"*27*"
"*28*"
"*29*"
"*30*"
"*31*"
"*32*"
"*33*"
"*34*"
"*35*"
"*36*"
"*37*"
"*38*"
"*39*"
"*40*"
"*41*"
"*42*"
"*43*"
"*44*"

}

bind join -|- "* *" badrealname

proc badrealname {nickname hostname handle channel} {
global botnick
set ::cchan $channel
set ::nnick $nickname
set ::hhost $hostname
if { [channel get $channel badfullname60+] } {
if {![botisop $channel]} { return 0 }
if {[onchan $nickname $channel]} {
putquick "WHOIS $nickname $nickname"
bind RAW - 311 badfullnames
}
}
}

proc badfullnames { from keyword arguments } {
global botnick bad
set channel $::cchan
set nickname $::nnick
set host $::hhost
set handle "[nick2hand $nickname]"
set fullname [string range [join [lrange $arguments 5 end]] 1 end]
if {[onchan $nickname $channel]} {
          set banmask *!*@[lindex [split [getchanhost $nickname $channel] "@"] 1]
   }
  foreach realname [string tolower $bad(fullnames)] {
if {[string match $realname [string tolower $fullname]]} {
if {[matchattr $handle $bad(flags) $channel]} { return 0 }
newchanban $channel $banmask $botnick $bad(reason) [expr $bad(time) * 60]
}
}
unbind RAW - 311 badfullnames
}

set bad(fullnames) {
"*13*"
"*14*"
"*15*"
"*16*"
"*17*"
"*male*"
"*boy*"
"*Boy*"
}

bind join -|- "* *" badrealname

proc badrealname {nickname hostname handle channel} {
global botnick
set ::cchan $channel
set ::nnick $nickname
set ::hhost $hostname
if { [channel get $channel badfullnamefemale] } {
if {![botisop $channel]} { return 0 }
if {[onchan $nickname $channel]} {
putquick "WHOIS $nickname $nickname"
bind RAW - 311 badfullnames
}
}
}

proc badfullnames { from keyword arguments } {
global botnick bad
set channel $::cchan
set nickname $::nnick
set host $::hhost
set handle "[nick2hand $nickname]"
set fullname [string range [join [lrange $arguments 5 end]] 1 end]
if {[onchan $nickname $channel]} {
          set banmask *!*@[lindex [split [getchanhost $nickname $channel] "@"] 1]
   }
  foreach realname [string tolower $bad(fullnames)] {
if {[string match $realname [string tolower $fullname]]} {
if {[matchattr $handle $bad(flags) $channel]} { return 0 }
newchanban $channel $banmask $botnick $bad(reason) [expr $bad(time) * 60]
}
}
unbind RAW - 311 badfullnames
}

set bad(fullnames) {
"*13*"
"*14*"
"*15*"
"*16*"
"*17*"
"*Female*"
"*Girl*"
"*girl*"
}

bind join -|- "* *" badrealname

proc badrealname {nickname hostname handle channel} {
global botnick
set ::cchan $channel
set ::nnick $nickname
set ::hhost $hostname
if { [channel get $channel badfullnamemale] } {
if {![botisop $channel]} { return 0 }
if {[onchan $nickname $channel]} {
putquick "WHOIS $nickname $nickname"
bind RAW - 311 badfullnames
}
}
}

proc badfullnames { from keyword arguments } {
global botnick bad
set channel $::cchan
set nickname $::nnick
set host $::hhost
set handle "[nick2hand $nickname]"
set fullname [string range [join [lrange $arguments 5 end]] 1 end]
if {[onchan $nickname $channel]} {
          set banmask *!*@[lindex [split [getchanhost $nickname $channel] "@"] 1]
   }
  foreach realname [string tolower $bad(fullnames)] {
if {[string match $realname [string tolower $fullname]]} {
if {[matchattr $handle $bad(flags) $channel]} { return 0 }
newchanban $channel $banmask $botnick $bad(reason) [expr $bad(time) * 60]
}
}
unbind RAW - 311 badfullnames
}

putlog "Badfullnames Loaded !"


we have rooms for all set ages and genders so need to get it working so we can seperate the rooms
_________________
Blake
UKEasyHosting UKStormWatch


Last edited by blake on Tue Dec 08, 2009 8:33 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
BLaCkShaDoW
Op


Joined: 11 Jan 2009
Posts: 115
Location: Romania

PostPosted: Thu Dec 03, 2009 4:57 pm    Post subject: hi Reply with quote

Do you want to have for each channel..a list of badrealnames ? because if you want i could modify my badfullname script so you can define for each chan bad realnames on irc or direct in a text file.
_________________
BLaCkShaDoW Production @ WwW.TclScripts.Net
Back to top
View user's profile Send private message Send e-mail Visit poster's website
blake
Master


Joined: 23 Feb 2009
Posts: 201

PostPosted: Fri Dec 04, 2009 6:44 am    Post subject: Reply with quote

Hi BLaCkShaDoW

I think it would better if it was channel definable and l may also work better if its reading it from a text file as long as i can add extra channels to it that would be superb

im currently using your badfullnames script at the moment on yours you have it to set to ban in number of hours is it possible to get it so the ban is released in 2 minutes and just set on the channel not the bots chanbanlist if not thats not a huge problem

Thanks BLaCkShaDoW
_________________
Blake
UKEasyHosting UKStormWatch
Back to top
View user's profile Send private message Visit poster's website
BLaCkShaDoW
Op


Joined: 11 Jan 2009
Posts: 115
Location: Romania

PostPosted: Fri Dec 04, 2009 8:12 am    Post subject: hi Reply with quote

ok.The text file it will be like that :

#channel1 *17* *18* *19* *20*...
#channel2 *14* *15* *16*....
The idea is that each channel has his own list of bad fullnames.
End so on..
Its that Ok ?
_________________
BLaCkShaDoW Production @ WwW.TclScripts.Net
Back to top
View user's profile Send private message Send e-mail Visit poster's website
blake
Master


Joined: 23 Feb 2009
Posts: 201

PostPosted: Fri Dec 04, 2009 8:26 am    Post subject: Reply with quote

Superb exacly what i need
_________________
Blake
UKEasyHosting UKStormWatch
Back to top
View user's profile Send private message Visit poster's website
BLaCkShaDoW
Op


Joined: 11 Jan 2009
Posts: 115
Location: Romania

PostPosted: Sun Dec 06, 2009 4:32 pm    Post subject: Reply with quote

The TCL is done..try it

Code:
#######################################################################
#
# BadFullname vers 1.2
#
#
#                                    BLaCkShaDoW Productions
#######################################################################

#######################################################################
#
#On join, if a user`s realname contains any of the restricted words #that are written in this script, the BoT will ban the user :)
#Contains protection for users who have access on the boT :)
#
#Version 1.2
#
#Put the TCL rehash, then edit badfullname.txt from the main directory
#put in the text file like that :
# #channel1 *word1* *word2*..
# #channel2 *word3 *word4..
#And then rehash.
#You can put as many channels and words as you want.
#
#######################################################################



#Here you can set the reason for the kick / ban

set bad(reason) "Bad FULLNAME !"

#Here you can set the time for the ban (minutes)

set bad(time) "2"

#Here you can set the flags that are excepted

set bad(flags) "n|O"


########################################################################
#                         Here starts the config
#
#
#######################################################################

setudef flag badfullname
set Autor "BLaCkShaDoW"
set vers "1.1"

if {[file exists badfullname.txt] == 0} {
set afile [open badfullname.txt a]
close $afile
}

bind join -|- "* *" badrealname

proc badrealname {nickname hostname handle channel} {
global botnick
set dir "badfullname.txt"
set ::cchan $channel
set ::nnick $nickname
set ::hhost $hostname
set file [open $dir "r"]
set data [read -nonewline $file]
close $file
if {$data == ""} { return 0 }
set split [split $data "\n"]
foreach line $split {
set chanentry [lindex [split $line] 0]
if {[string match -nocase $channel $chanentry]} {
if {![botisop $channel]} { return 0 }
if {[onchan $nickname $channel]} {
putquick "WHOIS $nickname $nickname"
bind RAW - 311 badfullnames
}
}
}
}

proc badfullnames { from keyword arguments } {
global botnick bad
set channel $::cchan
set nickname $::nnick
set host $::hhost
set dir "badfullname.txt"
set handle "[nick2hand $nickname]"
set fullname [string range [join [lrange $arguments 5 end]] 1 end]
if {[onchan $nickname $channel]} {
          set banmask *!*@[lindex [split [getchanhost $nickname $channel] "@"] 1]
   }
set file [open $dir "r"]
set data [read -nonewline $file]
close $file
if {$data == ""} { return 0 }
set split [split $data "\n"]
foreach line $split {
set chanentry [lindex [split $line] 0]
if {[string match -nocase $channel $chanentry]} {
set fullnameentry [lrange [split $line] 1 end]
  foreach realname [string tolower $fullnameentry] {
if {[string match $realname [string tolower $fullname]]} {
if {[matchattr $handle $bad(flags) $channel]} { return 0 }
newchanban $channel $banmask $botnick $bad(reason) [expr $bad(time)]
}
}
}
}
unbind RAW - 311 badfullnames
}

putlog "Bad Fullname $vers by $Autor Loaded !"


Just apply the steps that i wrote on the first lines..
_________________
BLaCkShaDoW Production @ WwW.TclScripts.Net
Back to top
View user's profile Send private message Send e-mail Visit poster's website
blake
Master


Joined: 23 Feb 2009
Posts: 201

PostPosted: Tue Dec 08, 2009 8:32 am    Post subject: Reply with quote

Thanks for this BLaCkShaDoW works a treat superb script. I have a few more i need writing if your interested
_________________
Blake
UKEasyHosting UKStormWatch
Back to top
View user's profile Send private message Visit poster's website
BLaCkShaDoW
Op


Joined: 11 Jan 2009
Posts: 115
Location: Romania

PostPosted: Tue Dec 08, 2009 10:06 am    Post subject: Reply with quote

Your welcome. Of course post your idea on Script Requests and i will see what i can do, or send me an email.
_________________
BLaCkShaDoW Production @ WwW.TclScripts.Net
Back to top
View user's profile Send private message Send e-mail Visit poster's website
blake
Master


Joined: 23 Feb 2009
Posts: 201

PostPosted: Wed Dec 09, 2009 9:00 pm    Post subject: Reply with quote

Have sent you an email with the script request`s

Many Thanks
_________________
Blake
UKEasyHosting UKStormWatch
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 -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
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