ameC v1.0 by ^WeSt

By ^WeSt on Jun 02, 2009

This snippet can not send an /ame command into a exception channel(s) that you have putted!

; Full download the snippet with the following image's at:
; http://ircs.ucoz.com/remotes/ameC.rar
; take a tour here >>
; contact: irc.chatnet.gr -j #Scripting

on *:LOAD: {
  if ($version >= 6.0) { 
    .amec_set
  }
  else { .amec_load_error_ver }
}

on *:UNLOAD: { .amec_unload }

on *:DIALOG:amec_set:*:*: {
  if ($devent == init) {
    if ($group(#amec) == on) { did -ra $dname 19 Disable (/ame) | did -ra $dname 21 Status : ON - Enabled }
    if ($group(#amec) == off) { did -ra $dname 19 Enable (/ame) | did -ra $dname 21 Status : OFF - Disabled }
    set %amec_owner ^WeSt
    set %amec_home_page http://IRCS.ucoz.com 
    set %amec_more_remotes http://IRCS.ucoz.com/forum/5
    dialog -t $dname /AME Command v $+ $amec_ver menu by %amec_owner
    amechan_list
  }
  elseif ($devent == sclick) {
    if ($did == 7) {
      url -n %amec_home_page
      did -b $dname $did
    }
    elseif ($did == 8) {
      url -n %amec_more_remotes
      did -b $dname $did
    }
    elseif ($did == 9) {
      run mailto:westor7@gmail.com?subject=Something about ameC v $+ $amec_ver ( $+ $me $+ )
      did -b $dname $did
    }
    elseif ($did == 13) {
      var %e = $input(Enter the channel that you don't want to use the /AME command,e,Enter the text)
      if ($chr(35) !isin $left(%e,1)) { var %e $chr(35) $+ %e }
      if ($istok(%amec_not,%e,44)) { var %error = $input(This channel is already in the main /AME command except channel's list!,houd,Error - ameC) | halt }
      if (%e) {
        did -e $dname 15,18
        set %amec_not $addtok(%amec_not,%e,44)
        did -a $dname 12 %e
        did -r $dname 12
        amechan_list
      }
    }
    elseif ($did == 14) {
      did -r $dname 12
      amechan_list
    }
    elseif ($did == 15) {
      if (!$did(12).seltext) { var %error = $input(Select first the channel that you want to delete from the /AME command except channel's list.,houd,Error - ameC) | halt }
      set %amec_not $remtok(%amec_not,$did(12).seltext,44)
      did -r $dname 12
      amechan_list
    }
    elseif ($did == 18) {
      unset %amec_not
      did -r $dname 12
      amechan_list
    }
    elseif ($did == 20) {
      unset %amec_not
      .disable #amec
      dialog -x $dname 
      .timer -m 1 1 amec_set
    }
    elseif ($did == 19) {
      if ($group(#amec) == on) {
        .disable #amec
        did -b $dname $did
        did -ra $dname $did Saved.
        amechan_list
      }
      elseif ($group(#amec) == off) {
        .enable #amec
        did -b $dname $did
        did -ra $dname $did Saved.
        amechan_list
      }
    }
  }
}

; ---------------- >>> END EVENTS <<< ----------------

; ---------------- >>> START DIALOGS <<< ----------------

dialog -l amec_set {
  title "N/A"
  size -1 -1 149 83
  option dbu
  tab "Informations", 1, 1 1 147 63
  box "General informations", 10, 2 15 144 47, tab 1
  text "This remote can message your text on DESCRIBE command to any currently connected channels that you are in , try using /AME <text> for adding an except channel just go into the settings menu from this help dialog to add/remove a channel from the currently settings.", 11, 3 24 142 33, tab 1 center
  tab "Settings", 2
  list 12, 96 15 51 45, tab 2 size vsbar
  button "Add", 13, 72 16 23 9, tab 2
  button "List", 14, 72 29 23 9, tab 2
  button "Del", 15, 72 41 23 9, tab 2
  button "Del all", 18, 72 50 23 9, tab 2
  tab "About", 3
  icon 6, 89 15 56 46, $scriptdirIRCS.jpg, 0, tab 3
  button "Home page", 7, 3 22 45 9, tab 3
  button "More remotes", 8, 3 34 45 9, tab 3
  button "Report bugs", 9, 3 46 45 9, tab 3
  button "Close this window", 4, 29 70 91 11, ok default
  button "N/A (/ame)", 19, 2 18 49 12, tab 2
  button "Restore all defaults", 20, 2 51 64 12, tab 2
  text "Status : N/A", 21, 2 37 63 8, tab 2
}

; ---------------- >>> END DIALOGS <<< ----------------

; ---------------- >>> START ALIASES <<< ----------------

alias -l amechan_list {
  if (%amec_not == $null) { did -a $dname 12 empty list. | did -b $dname 15,18 | halt }
  if ($group(#amec) == on) { did -ra $dname 21 Status : ON - Enabled }
  elseif ($group(#amec) == off) { did -ra $dname 21 Status : OFF - Disabled }
  did -r $dname 12
  var %i = 1, %n = $numtok(%amec_not,44)
  while (%i <= %n) {
    did -a $dname 12 $gettok(%amec_not,%i,44)
    inc %i
  }
  inc %i
}

alias -l amec_load_error_ver {
  var %error = $input(This version of mIRC that you are using is too old and this remote can't work on it $+ $chr(44) Download and install the latest mIRC version from the web and retry to install this remote!,houd,Error - ameC)
  url -n http://www.mirc.com/get.html
  unload -rs " $+ $script $+ "
  halt
}

alias -l amec_unload {
  if ($dialog(amec_set)) { .dialog -x $v1 }
  .var %ty $input(Successfully unloaded. Thanks for using the ameC v $+ $amec_ver $+ $chr(44) Created by %amec_owner for the mIRC program (First version release) more informations visit our site : %amec_home_page $+ $chr(44) Have a nice day!,oid,Thank you for using!)
  .unset %amec_*
  .unload -rs " $+ $script $+ "
  .halt
}

alias amec_set {
  if ($dialog(amec_set)) {
    var %error $input(This window is already in use!,houd,Error - ameC)
    halt
  }
  else { dialog -m amec_set amec_set }
}

alias amec_ver return 1.0

#amec off
alias ame {
  if (!$server) { echo $color(info) -a - | echo $color(info) -a * /ame: not connected to a server | echo $color(info) -a - | halt }
  if (!$1-) { echo $color(info) -a - | echo $color(info) -a * /ame: insufficient parameters | echo $color(info) -a - | halt }
  if ($chan(0) == 0) { .echo $color(info) -a - | echo $color(info) -a * /ame: no channel windows open | echo $color(info) -a - | halt }
  var %i = 1
  while (%i <= $chan(0)) {
    if (!$istok(%amec_not,$comchan($me,%i),44)) {
      describe $chan(%i) $1-
    }
    inc %i
  }
}
#amec end

; ---------------- >>> END ALIASES <<< ----------------

menu menubar {
  -
  « $+ $chr(149) $+ » ameC - (/ame) command « $+ $chr(149) $+ »:.amec_set
  -
}

Comments

Sign in to comment.
Aucun50   -  Jun 03, 2009

Or:

*/
Full download the snippet with the following image's at:

http://ircs.ucoz.com/remotes/ameC.rar

take a tour here >>
/*
 Respond  
miniCruzer   -  Jun 02, 2009

All of this:

Full download the snippet with the following image's at:

http://ircs.ucoz.com/remotes/ameC.rar

take a tour here >>

Needs to be like this:

;Full download the snippet with the following image's at:

;http://ircs.ucoz.com/remotes/ameC.rar

;take a tour here >>
 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.