K before you start wanting to multithread... make sure you know how to properly work with multiple threads... try using multiple copies of mIRC that communicate thru DDE. Use this code which will auto assign DDE server names and communicate with all the other mIRC clients loaded.

Code:
ALIAS dde_setup {
  var %rootname = smIRC
  var %i = 0

  while (1) {
    if (%i = 0) { var %ddename = %rootname }
    else { var %ddename = $+(%rootname,%i) }
    inc %i

    if $isnot($isdde(%ddename)) { /ddeserver ON %ddename | break }
    else { /hadd -ms DDE.SERVER.LIST $enum(%i) 0 }
    /dde_remote_announement %ddename -1 FOUND
  }
}

ALIAS dde_announce {
  if $isnot($hget(DDE.SERVER.LIST)) { /hmake DDE.SERVER.LIST 100 }

  var %sendstring = $1-

  var %i = 0
  var %n = 1

  while (%i < $hget(DDE.SERVER.LIST,0).item) {
    inc %i
    tokenize 32 $hget(DDE.SERVER.LIST,$enum(%n)) 

    if $isnot($len($1-)) { continue }

    var %sname = $1
    var %last.ticks = $2
    tokenize 32 $3-

    if $isnot($isdde(%sname)) {
      /hdel DDE.SERVER.LIST $enum(%n)
      continue 
    }

    inc %n

    /dde %sname command "" /dde_remote_announement $ddename $ticks %sendstring 
  }
}

alias /dde_remote_announement {
  if $isnot($hget(DDE.SERVER.LIST)) { /hmake DDE.SERVER.LIST 100 }

  var %argstring = $1-

  var %i = 0

  while (%i < $hget(DDE.SERVER.LIST,0)) {
    inc %i
    tokenize 32 $hget(DDE.SERVER.LIST,$enum(%i))
    if $isnot($len($1-)) { break }
    if ($1 === $gettok(%argstring,1,32)) { break }
  }

  if (%i == 0) { inc %i }

  /hadd DDE.SERVER.LIST $enum(%i) %argstring

  /debugmsg 09 -l543 /hadd DDE.SERVER.LIST $enum(%i) %argstring

  tokenize 32 %argstring
  if ($3 != RECIEVCED) { /dde $1 command "" /dde_remote_announement $ddename $ticks RECIEVCED $2 }
}


You may need to modify this a little bit.

Er $enum and $isnot are custom aliases.

ALIAS ENUM { return $+(n,[,$1,],) }
ALIAS ISNOT { return $iif($1,$false,$true) }

I'm sure there are some others I did not write this for distrubution.


Last edited by MeStinkBAD; 19/05/07 07:40 PM.

Beware of MeStinkBAD! He knows more than he actually does!