on *:JOIN:[color:blue]#channelname[/color]: {
;Checking to see if the person is already been checked within the last 300 seconds
if (% [ $+ [ $chan ] ] [ $+ [ $chr(46) ] ] [ $+ [ $gettok($gettok($address($nick,2),1,46),2,64) $+ . ] ] [ $+ [ $gettok($address($nick,2),2,46) ] ] != 1) {
;Setting the $nick to ignore list (for this script only)
set % [ $+ [ $chan ] ] [ $+ [ $chr(46) ] ] [ $+ [ $gettok($gettok($address($nick,2),1,46),2,64) $+ . ] ] [ $+ [ $gettok($address($nick,2),2,46) ] ] 1
;Check the time of the $nick
ctcp $nick Time
;Set this timer to message the $nick again ( you can change the timer to anything if u wish, i tested with 300 seconds and it worked :) )
timer 1 300 unset % [ $+ [ $chan ] ] [ $+ [ $chr(46) ] ] [ $+ [ $gettok($gettok($address($nick,2),1,46),2,64) $+ . ] ] [ $+ [ $gettok($address($nick,2),2,46) ] ]
}
}
on *:CTCPREPLY:TIME*: {
if (($5 >= 05:00:00) && ($5 <= 11:59:59)) {
msg [color:blue]#channelname[/color] Good morning $nick $+ .
}
elseif (($5 >= 12:00:00) && ($5 <= 17:59:59)) {
msg [color:blue]#channelname[/color] Good afternoon $nick $+ .
}
elseif (($5 >= 18:00:00) && ($5 <= 23:59:59)) {
msg [color:blue]#channelname[/color] Good evening $nick $+ .
}
elseif (($5 >= 00:00:00) && ($5 <= 04:59:59)) {
msg [color:blue]#channelname[/color] Good night $nick $+ .
}
else {
msg [color:blue]#channelname[/color] Hi $nick $+ .
}
}