hi, i will really apprecite if someone can help me, here is the problem, i was trying to add a "handle, and a Date) to the kick message, so user will know who kicked, and date, for example
Eggdrop sets mode: +b *!*Russ@*.aol.com
Russ was kicked by Eggdrop( June 07 Aw: get out), so it worked fine, but the problem is when i ban someone let say default time is 2 hour, n somehow someone else had unban "Russ" now when Russ will join, bot will kickban him again, cos its in bots banlist, but this time bot kicks like this
Russ was kicked by Eggdrop(banned:get out)<-- now date n handle is not showing
i will really really apprecite for ur help, here are the 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
}
advance thanks
best regards
AW