Hi, i need help, any kind person?
here is a deal, took me few hours to figure out how do i set a date in a kick message, like Z was kicked by eggdrop(Apr 25 AW:ta ta), its worked fine, but if i kickban someone like .kb Z ta ta, its shows ok like Z was kicked by eggdrop(Apr 25 AW: ta ta), and if i do .bans, ban is there.
if someone unban the Z, since ban is still active, bot will kickban again, like Z was kicked by eggdrop(banned: ta ta), now my nick n date is not showing in a kick msg.
i will apprecite for the help, here r codes..
proc ban_command {nick host handle channel args1 flag} {
global bannick
if {[test_real $nick]} {
return 0
}
set args [split $args1 " "]
set bnick [lindex $args 0]
set knick $bnick
set btime "90"
if {[matchattr $handle m] || [matchattr $handle n]} {set btime "180"}
set reason [lrange $args 1 end]
if {$reason==""} {
puthelp "NOTICE $nick :Ban will not be set without a reason, provide a reason for banning $bnick!"
return 0
}
if {[string match "*@*" $bnick]==0} {
putserv "WHOIS $bnick"
set reason [lrange $args 1 end]
lappend bannick [list [string tolower $bnick] $handle $reason $btime $flag $channel $knick $nick 1]
return 1
}
if {$bnick==""} {
puthelp "NOTICE $nick :Usage: .b <nick|host> <reason>"
return 0
}
set badd [getchanhost $bnick $channel]
if {$badd!={}} {
set bhnick [maskhost $badd]
set bnick "*!*"
append bnick [string range $bhnick 2 end]
}
set date [clock format [clock seconds] -format "%b %d"]
if {[onchan $knick $channel]} {
putserv "MODE $channel +b $bnick"
putserv "KICK $channel $knick :$date $nick: $reason"
}
if {$flag} {
newchanban $channel $bnick
$handle $reason $btime
} else {
newban $bnick $handle $reason 0
}
return 1
}
thanks