| View previous topic :: View next topic |
| Author |
Message |
Reynaldo Halfop
Joined: 11 May 2005 Posts: 54
|
Posted: Sat Jan 02, 2010 11:15 pm Post subject: Please help with shitlist |
|
|
| Code: |
proc pub_+akick {nick uhost hand channel param} {
global botname botnick
set rest [lindex $param 0]
if {$rest == ""} {
puthelp "NOTICE $nick :Usage: +akick <nick/hostname>"
return 0
}
if {$rest == "*" || $rest == "*!*@*"} {
puthelp "NOTICE $nick :invalid hostname..!"
return 0
}
if {$rest == $botnick} {
puthelp "NOTICE $nick :DeNiEd..!"
return 0
}
if {[validuser $rest]} {
puthelp "NOTICE $nick :$rest is already on database with flags: [chattr $rest]"
return 0
}
if {![string match "*@*" $rest]} {
set rest "$rest!*@*"
}
if {[string match $rest $botname]} {
puthelp "NOTICE $nick :DeNiEd..!"
return 0
}
if {[finduser $rest] != "*"} {
if {[finduser $rest] != "AKICK"} {
puthelp "NOTICE $nick :That Host Belongs To [finduser $rest]"
}
puthelp "NOTICE $nick :That Host already in [finduser $rest]"
return 0
}
puthelp "NOTICE $nick :ADD \[$rest\] To KIcKLIsT..!"
utimer 1 [list setuser "AKICK" HOSTS $rest]
saveuser
foreach x [channels] {
if {[isop $botnick $x]} {
foreach c [chanlist $x K] {
if {![matchattr $c f]} {
akick_chk $c [getchanhost $c $x] $x
}
}
}
}
return 0
}
proc akick_chk {nick uhost chan} {
global bannick
foreach x [getuser "AKICK" HOSTS] {
if {[string match [string tolower $x] [string tolower "$nick!$uhost"]]} {
set bannick($nick) $x
putquick "KICK $chan $nick : Blacklist MaTcH FRoM $x]"
return 0
}
}
}
|
That's scripts for adding the shitlist, it working fine with a list without a special character like [,],{,},\ . it will return nothing when i added the shitlist with the special character like [user, [user], \user\. any idea hot to get it working with any shitlist like service of chanserv, [*]!@* or [test!*@*.
Here's the list in the cfgfile
| Code: |
AKICK - K
--HOSTS telnet!*@*
--HOSTS *!*@91.102.*
--HOSTS *!*HeliX@110.*
--HOSTS [Windows!*@*
|
so the scripts will not kick that nick [Windows, when it join to channel. i've already add the akick_chk in to lines of "bind join" aswell.
Please help with that code. Thankyou |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sun Jan 03, 2010 6:54 am Post subject: |
|
|
This behaviour is partly due to the fact that you use the lindex command on a string, rather than a proper list. Whenever you need to use lindex, and the data i not a valid list, atleast take the time to use split to convert it into a list.
Also, RFC1459 case mapping is rather different for extended characters than tcl's. This could also be a source for your issues.
Finaly, why don't you just use the internal banlist within eggdrop? Seems to me tbat you are simply trying to re-invent the wheel.. _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
|
|
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
|
|