With this you can use the cmds putnotice, putmsg etc instead of msg and notice..
It will keep the bot safe from getting flooded out from some cmds.
Dont know the original author of it but ill release it anyways.
- Code: Select all
alias putnotice {
if (!$isid) {
putcmd notice $1-
}
}
alias putmsg {
if (!$isid) {
putcmd msg $1-
}
}
alias putaction {
if (!$isid) {
putcmd describe $1-
}
}
alias putcmd {
var %a = putcmd. $+ $cid, %c = $1
!tokenize 32 $2-
if ($2 == $null) {
if ($show) {
!echo -ac $+ $iif($active == status window,e) info * /put $+ %c $+ : insufficient parameters
}
!halt
}
if (!$timer(%a)) {
!hadd -m %a index -1
!hadd -m %a current 0
!.timer $+ %a -m 0 1500 putcmd.exec $cid
}
!hinc -m %a index
!hadd -m %a $hget(%a,index) ! $+ %c $1-
if ($calc($ticks - $hget(%a,last)) > 2000) {
putcmd.exec $cid
}
!hadd -m %a last $ticks
}
alias putcmd.exec {
var %a = putcmd. $+ $1, %c = $hget(%a,current)
!scid -r $hget(%a,%c)
!hdel %a %c
!hinc %a current
if ($hget(%a,0).item == 3) {
!.timer $+ %a off
!hfree -w %a
}
}