Page 1 of 1

putmsg etc

PostPosted: Wed Jul 01, 2009 4:55 pm
by zNigel-
Hello..

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
  }
}

Re: putmsg etc

PostPosted: Tue Nov 24, 2009 5:37 pm
by Patty
reminds a little of PUTMODE, but all in all this script is good for most people..

How ever it lacks some "stops" if your are lets say kicked, muted and something else like that..

maybe check out Myggan's Putmode its a good and reliable script with no leftovers.

good job