on *:connect:{
.timermood 0 3600 randmood
[color:red];3600 is 1hr [/color]
}
alias randmood {
var %a = $rand(1,3)
if (%a == 1) { %mood = happy }
if (%a == 2) { %mood = sad }
if (%a == 3) { %mood = angry }
}
alias -l brandtime {
var %lowtime = 100 | ; quickest duration between messages (in seconds)
var %hightime = 500 | ; longest duration between messages (in seconds)
return $rand(%lowtime,%hightime)
}
alias brandmsg {
if (%mood = happy) { var %rline = $read(happy.txt) }
if (%mood = angry) { var %rline = $read(angry.txt) }
if (%mood = sad) { var %rline = $read(sad.txt) }
if (/me* iswm %rline) /describe $1 $gettok(%rline,2-,32)
else /msg $1 %rline
.timer [ $+ [ $1 ] ] 1 $brandtime brandmsg $1-
}