Username:
Password:
  Home About Us Articles Rules Script Library FAQ Help
Not logged in (register
Selective amsg/ame for mIRC

Last Modified: Oct 27 2:06pm

I made this script since I am idling on alot of chans on different networks that has /amsg and /ame as a ban reason. I find those to pretty usefull at times so that is the reason for me to write the script.

Actually it is pretty simple by entering the dialog(right click in a chan -> click AMSG/AME Settings) you can see the list of chans and choose if you wish to block that chan from amsg's/ame's.

The script is firendly towards users on multiply networks as it places the blocked chans in a var with the network in it.
note: the dialog might not be the most beautifull you have seen but it can be redone if there is a desire for it.
alias amsg {
  var %x = 1
  while (%x <= $chan(0)) {
    if (!$istok(%blockedchans. [ $+ [ $network ] ],$chan(%x),32)) {
      msg $chan(%x) $1-
    }
    inc %x
  }
}
alias ame {
  var %x = 1
  while (%x <= $chan(0)) {
    if (!$istok(%blockedchans. [ $+ [ $network ] ],$chan(%x),32)) {
      describe $chan(%x) $1-
    }
    inc %x
  }
}

menu channel {
  AMSG/AME Settings:/dialog -m amsg-ame amsg-ame
}

dialog amsg-ame {
  title "Settings for amsg/ame"
  size -1 -1 120 100
  option dbu
  text "Chans:",1,2 2 50 9
  check "Don't post amsg/ame",3,53 40 60 9
  list 4,2 10 50 98
  button "Ok",5,75 85 20 12, ok
}

on *:dialog:amsg-ame:init:0: {
  var %i = 1
  while (%i <= $chan(0)) {
    did -a amsg-ame 4 $chan(%i)
    inc %i
  }
}

on *:dialog:amsg-ame:sclick:3: {
  if ($did(3).state == 0) {
    set %blockedchans. [ $+ [ $network ] ] $remove(%blockedchans. [ $+ [ $network ] ],$did(4).seltext)
  }
  else {
    set %blockedchans. [ $+ [ $network ] ] %blockedchans. [ $+ [ $network ] ] $did(4).seltext
  }
}

on *:dialog:amsg-ame:sclick:4: {
  if ($istok(%blockedchans. [ $+ [ $network ] ],$did(4).seltext,32)) {
    did -c amsg-ame 3
  }
  else {
    did -u amsg-ame 3
  }
}

Comments
 
All content Copyright © 2004 - 2008 UtoNet IRC Network
UtoNet is sponsored and hosted by Datinix Systems