mIRC Homepage
Posted By: sparta on 1:OPEN:=: { - 29/02/04 05:00 PM
I have been asking this befor.. but didnt get any good answer on it, so here we go again. If i open a DCC chat with somone, then i can echo that users nick by $nick.. but how can i do a check that if $nick == $true command .. and with $true i mean if i have a chat open with that nick, then i want to trigger a command, i couldent find anything about this in the help file.. and not on this forum.. "i never know what nick the $nick would be".. any suggestions?
Posted By: tye Re: on 1:OPEN:=: { - 29/02/04 06:50 PM
Use $chat to check if you have a DCC chat open with somebody. Example:
Code:
if ($chat(Tye)) { echo -a I have a DCC Chat window with Tye } 


Posted By: sparta Re: on 1:OPEN:=: { - 29/02/04 06:55 PM
if ($chat( $+ $nick $+ ) != $null) { Echo -a You have a chat open with $nick $+ . }

dont work.. cos you get that chat window you just opened as if you allready had a chat open with that nick smirk
Posted By: Adrenalin Re: on 1:OPEN:=: { - 29/02/04 07:34 PM

Code:
on 1:OPEN:=:{ 
  if ($NickChats($nick) >= 2) echo You already have a chat window with $nick !
}

Alias NickChats {
  var %total = $chat(0)
  var %c = 0
  while (%total) {
    if ($1 == $chat(%total)) inc %c
    dec %total
  }
  return %c
}
Posted By: Online Re: on 1:OPEN:=: { - 29/02/04 08:44 PM
This one should do the trick...
https://forums.mirc.com/showthreaded.php?...o=&vc=1
Posted By: Adrenalin Re: on 1:OPEN:=: { - 01/03/04 12:41 PM
My alias do same think $window(=$nick,0).. So use $window(=$nick,0)
© mIRC Discussion Forums