Hello how i can make script and when someone join in one specific channel if his nickname is at least 7 days register then will be ignored from bot and when the user with this nickname make part from channel will be unignore it..
ultralord wrote:Hello how i can make script and when someone join in one specific channel if his nickname is at least 7 days register then will be ignored from bot and when the user with this nickname make part from channel will be unignore it..
registered where? and how can we check if its 7 days registered or whatever?
### Many thanks to " user, nml and rosc without them I could not make this script.
### Just remove your channel where it says #channel.
### Event
bind join - "#channel *!*@*" join-ignore
bind part - * part-ignore
bind notc - "*is not a valid nickname*" notice-ignore
bind notc - "*Time registered*" notice-ignore
bind notc - "*Info for*" notice-ignore
### Command
proc join-ignore {nick uhost handle chan} {
global someone banmask
putquick "PRIVMSG nickserv :info $nick"
set someone $nick
set banmask "$nick*!*@[lindex [split $uhost "@"] 1]"
}
proc notice-ignore {nick uhost hand text dest} {
global banmask botnick someone
if {[string match "*is not a valid nickname*" $text]} {return}
if {[string match "*Time registered*" $text]} {
regsub -all {EDT} $text "EST" text
set then [split $text]
set then [lrange $text 2 end]
set then [clock scan "$then"]
set now [unixtime]
set secondsInADay 86400
set daysAgo [expr {($now-$then)/$secondsInADay}]
putlog "$someone registered $daysAgo Days ago"
set reason "Nickname registered $daysAgo days ago"
if {$daysAgo < 8} {
newignore $banmask $botnick $reason 0
}
}
}
proc part-ignore {nick uhost hand chan msg} {
set remove "$nick*!*@[lindex [split $uhost "@"] 1]"
killignore $remove
}
putlog "Nickname ignore tcl."
Let me know if you have any troubles.
Edited: Fixed, it should work on your network now. Edited: Once again, it should work now. Edited: Added: regsub to get rid of EDT. Edited: Ok, I have tested it on your server it should work. Edited: I have edited so it will ignore nick!*@host.
Last edited by iamdeath on Wed Oct 10, 2007 1:54 pm, edited 6 times in total.
Itwill definately ignore those who are 7 or less than 7 days old type .ignores in DCC. I have checked this script and it was working on Dalnet and also tell me did you change the channel name? also tell me if you want to ignore those who are less than 7 days or you want to ignore who are older than 7 days? clear this to me first
Last edited by iamdeath on Tue Oct 09, 2007 4:35 am, edited 1 time in total.