Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 02, 2016, 06:26:12 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Auto Key-Exchange in Query?  (Read 5862 times)

thede

  • Participant
  • Joined in 2007
  • *
  • default avatar
  • Posts: 4
    • View Profile
    • Donate to Member
Auto Key-Exchange in Query?
« on: October 12, 2007, 04:22:20 PM »
Hi guys,
I have a little Question/Request.

Is it possible to somehow have an Auto Key-Exchange for Queries if theres no key for the Chat Partner yet?
(or something like that in FiSH)

If not... is it possible to add that to the next version please?  :)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,405
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Auto Key-Exchange in Query?
« Reply #1 on: October 12, 2007, 04:30:13 PM »
i'm trying to remember if anyone made a little script for this.. it would be a good assignment for anyone learning basic mirc scripting, not very hard.

thede

  • Participant
  • Joined in 2007
  • *
  • default avatar
  • Posts: 4
    • View Profile
    • Donate to Member
Re: Auto Key-Exchange in Query?
« Reply #2 on: October 13, 2007, 04:47:11 AM »
yeah, you are right mouser, its a very simple script ;)
i though i would need to use more complex stuff but hey, this is all:
on *:SIGNAL:MircryptionSignalAll: {
  if ($1 = query) {
    ;; if ($2 = -sBNC) { halt } <-if youre using sbnc
    if ($4 = $false) {
      /mckeyx $3
    }
    if ($4 = $true) {
    }
  }
}

thx for your help

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,405
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Auto Key-Exchange in Query?
« Reply #3 on: October 13, 2007, 05:17:50 AM »
nice first try!
a problem is that if you speak to someone without mircryption or fish it's going to try to do a key exchange with them every time they say anything.

a nice solution would be to set a persistent variable (or hash entry) like %autokeyx_USERNAME (where USERNAME is the name of the person, i.e. $3) whenever you do the mckeyx in your routine, and only try they mckeyx if the variable for the user is not set yet.  that way, it will only ever try it once per user.