The following nippet of code is giving me headaches
Typing "ban *!*stardust@* 2d Test" in the channel, for instance, gives me a ban of 1 day and not the 2 days I want and a ban of 5d gives me 4.if {![regexp -- {^([0-9]*[dhm])([0-9]*[dhm])?([0-9]*[dhm])?$} $expire]} {
set expire -1
set index 2
} else {
set e $expire
if {![regexp -- {([0-9]*)m} $e -> min] || ($min == "")} {set min 0}
if {![regexp -- {([0-9]*)h} $e -> hour] || ($hour == "")} {set hour 0}
if {![regexp -- {([0-9]*)d} $e -> day] || ($day == "")} {set day 0}
set expire [expr ($min)+($hour*60)+($day*1440)]
set index 3
}
-----
newchanban $channel $target_hostmask $nick $reason $expire none
Any help will definitely be appreciated.