Amsg Script w. Dialog

By DarkCoder on Feb 16, 2010

Amsg script, works over servers, has a channel ignore list and i even made it with a dialog so its idiot proof :). /Ad or click background to start.

dialog amsg {
  option dbu
  title "Amsg Script V1.0"
  Size -l -l 100 75
  list 1, 5 40 90 35,
  edit "#Channel" 2, 50 5 40 10,autohs
  button "Add" 3, 5 5 40 10
  Text "Channels not to message with amsg" 4, 7 30 90 10
  edit "Message" 5, 50 20 40 10,autohs
  Button "Amsg" 6, 5 20 40 10
}
alias -l dupdate {
  var %x $gettok(%nc,0,32)
  while (%x) {
    did $+(-,$iif(%x == $gettok(%nc,0,32),ra,a)) amsg 1 $gettok(%nc,%x,32)
    dec %x 
  }
}
on *:dialog:Amsg:*:*: {
  if ($devent == sclick) {
    if ($did == 3) { 
      if (!$istok(%nc,$did(2).text,32)) {
        set %nc %nc $did(2).text
        dupdate 
      }
      else dupdate
    }
    if ($did == 6) amsg $did(5).text
    if ($did == 1) { $iif($?!"Delete Channel",set %nc $remtok(%nc,$did(1).seltext,32)) | dupdate }
  }
  if ($devent == init) dupdate
}
alias ad dialog -mo amsg amsg
alias amsg {
  var %x $scon(0)
  while (%x) {
    scid $scon(%x)
    var %b $chan(0)
    while (%b) {
      if (!$istok(%nc,$chan(%b),32)) { var %cd $chan(%b) $+ , $+ %cd | echo $chan(%b) $timestamp < $+ $me $+ > $1- }
      else var %cx %cx $chan(%b)      
      dec %b
    }
    if (%cd) .msg $v1 $1-
    unset %cd
    dec %x
  }
}

Comments

Sign in to comment.
Battlemonkey   -  Feb 16, 2010

The amsg alias is useless+taking over a built-in alias and can be replaced with:

scid -a amsg $did(5).txt
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.