Version Reply System

By blackvenomm666 on May 12, 2011

Image
This dialog allows you to easily change your version reply's open a new remotes file paste it there and save it. It has three settings on/off if off when someone versions you they won't get a reply at all when on you can choose from random reply or have a set reply.
Add your version replies to the txt file via the edit box at the top then if you want to just have it use one reply click a version reply from the list area and click set vreply. if you want random just turn random . This works on both chatspace and ircd chats. It's best if you load this when your not connected to a server/network. If you do decide to load it while connected to a server/network you must disconnect from the server/network then reconnect for it to work after you have saved it in a remotes file

Menu Menubar,Nicklist,Channel {
  .Venom Version Reply Changer: dialog $iif($dialog(versionreply.system),-v,-md versionreply.system) versionreply.system
}
Dialog versionreply.system {
  Title " Version Reply System"
  Size -1 -1 212 82
  Option dbu
  edit "", 1, 02 02 178 10, autohs
  button "Add Vreply",2, 182 02 29 10 , flat
  list 3, 02 15 208 60, hsbar vsbar
  button "Del Vreply ",4, 02 70 29 10 , flat
  button "Set Vreply ",5, 33 70 29 10 , flat
  check "System on", 6, 64 70 33 9
  check "System off", 7, 99 70 34 9
  check "Random on", 8, 135 70 35 9
  check "Random off", 9, 174 70 36 9

}
on *:Dialog:versionreply.system:*:*: {
  if ($devent == init) {
    if (%versionreply == on ) {
      did -c versionreply.system 6
    }
    elseif (%versionreply == off ) { did -c versionreply.system 7
    }
    if ( %randversion == on ) { did -c versionreply.system 8
    }
    if ( %randversion == off ) { did -c versionreply.system 9
    }
    versionreplys
  }

  if ($devent == sclick) { 
    if ($did == 6) {
      set %versionreply on
      did -u versionreply.system 7
    }
    if ($did == 7) {
      set %versionreply off
      did -u versionreply.system 6
    }
    if ($did == 8) { 
      set %randversion on
      did -u versionreply.system 9
    }
    if ($did == 9) {
      set %randversion off
      did -u versionreply.system 8
    }
    if ($did == 2) {
      write versionreply.txt $did(1).text
      did -r versionreply.system 3
      versionreplys
    }
    if ($did == 4) {
      if (!$did(3).sel) { noop $input(Please select a VersionReply from the list to delete from your VersionReply list,uwo,Error!) }
      else { write -dl $+ $did(3).sel versionreply.txt
        did -r versionreply.system 3
        versionreplys
      }
    }
    if ($did == 5) {
      .set %versionreply2 $did(3).seltext
    }
  }
}

alias versionreplys {
  var %a = 1, %b = $lines(versionreply.txt)
  while (%a <= %b) {
    did -az versionreply.System 3 $read(versionreply.txt, %a)
    inc %a
  }
}

on *:connect: {
  ignore -tw *
  debug -i aux Vreply
}
alias Vreply {
  tokenize 32 $1-
  if (%versionreply == on) {
    if ($1 == <-) && ($3 == PRIVMSG) {
      if (:* iswm $5-) {
        if (%randversion == on) && ($mid($5-,3,-1) == VERSION) { ctcpreply $mid($gettok($2,1,33),2) $v1 $read $mircdir\versionreply.txt
        }
        if (%randversion == off) && ($mid($5-,3,-1) == VERSION) { ctcpreply $mid($gettok($2,1,33),2) $v1 %versionreply2
        }
      }
    }
  }
}
on *:Input:#: {
  if ($1 == +ver) { if (!$2) { echo -a specify something to set as a reply
    }
    else { .set %versionreply2 $2-
    }
  }
  if ($1 == +addver) { if (!$2) { echo -a specify something to set as a reply
    }
    else { write versionreply.txt $2-
    }
  }
  if ($1 == -dever) { if (!$2) { echo -a specify something to set as a reply
    }
    else { write -d versionreply.txt $2-
    }
  }

  if ($1 == +rand) { .set %randversion on
  }
  if ($1 == -rand) { .set %randversion off
  }
  if ($1 == +veron) { .set %versionreply on
  }
  if ($1 == +veroff) { .set %versionreply off
  }
  if ($1 == +viewreply) { versionreplys2
  }
}
alias versionreplys2 {
  var %a = 1, %b = $lines(versionreply.txt)
  while (%a <= %b) {
    echo -a $read(versionreply.txt, %a)
    inc %a
  }
}

Comments

Sign in to comment.
blackvenomm666   -  Jun 20, 2012

yea instead of just doing write versionreply.txt $did(1).text you would need to add the full path to it you'd then need to change the read path as well

 Respond  
ArcticWerewolf   -  Jun 17, 2012

There a way to change where it creates the .txt file containing the versions?

 Respond  
blackvenomm666   -  May 13, 2011

small update just went in and cleaned up the coding a bit looks nicer now:D

 Respond  
blackvenomm666   -  May 13, 2011

haha yea yea yea saw your dialog and decided to make one. i wasnt gonna do a dialog version was just gonna make it with a bunch of vars and crap but saw ur dialog and had to do one of my own darn you desoto haha

 Respond  
xdesoto   -  May 12, 2011

What no props to me giving you an idea or a dialog design :O <3

 Respond  
blackvenomm666   -  May 12, 2011

as per sharky's request i added input commands for this i may change and add a right click menu option as well

 Respond  
Sharky_Dude   -  May 12, 2011

Works great, I'm only going to keep using mine for now cause it's simpler for me. I do have an idea for you to add to this I'll tell you on my server. +10 and like.

 Respond  
Lucius   -  May 12, 2011

I'm using this already. Excellent stuff and it halts the standard irc reply too.
I especially like the random choice.
I do so love a good random.
+like

 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.