mIRC Home    About    Download    Register    News    Help

Print Thread
#71320 13/02/04 09:41 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
How do i in the simplest way check if a DCC is open with a nick i trying to DCC chat with? i havent ben able to figure this one out :tongue:


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#71321 13/02/04 10:51 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
/help $chat

#71322 14/02/04 12:35 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
$chat(0) returns the total number of open dcc chats

that i know.. but how do i make mirc see if i have lets say 5 chats open, then number 4 is the nick Test .. somone that know how i can make it react automatic if i have a open DCC chat with a nick i allready have a chat open, i cant figure it out :tongue: i must cycle true all DCC chats open.. but how do i make it in a simple way? :tongue:


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#71323 14/02/04 05:25 PM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
$chat(<NICK>)

#71324 14/02/04 05:48 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I dont know what nick that user will have.. thats my prob, i need somthing that cycle true my DCC chats if i have any open.. if it only was about 1 nick, then it would be simple..


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#71325 14/02/04 05:59 PM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
I'm confused, how are you going to know if it's the right nick if you don't know what the nick is?

Remember you can use $chat($nick), $chat(%nick), $chat($N) or whatever. "<nick>" is simply the field you have to check.

#71326 14/02/04 06:04 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
if $chat some_nick == $true { echo -a You allready have a chat open with $nick }
else dcc chat $nick
, i want to make so i cant DCC the same nick two times, i have som problems with a DCC with my bots, if i dont see i allready have a DCC open with it, then DCC it again then my pass gets out to the partyline.. "my sheme that doing it", but if i could halt it, then it wouldent be any prob..


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#71327 14/02/04 06:09 PM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
if $chat($nick) { echo -a You allready have a chat open with $nick }
; ^^ It won't be $true, it will be "Nick" or "$null"
else dcc chat $nick

Last edited by Iori; 14/02/04 06:11 PM.
#71328 14/02/04 06:19 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
i try it.. thnx


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#71329 14/02/04 07:13 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
dont work, it echos to everything that i have a connection open to the nick..
Code:
  if ($chat($nick) == $null) { echo -a You allready have a chat open with $nick | haltdef }
  ;same with
  if ($chat($nick) != $null) { echo -a You allready have a chat open with $nick | haltdef }


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#71330 14/02/04 07:32 PM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
If this is an alias you're using outside of an event it will be $1 and not $nick.
This works fine here if I'm using /dcc_chk nick
Code:
alias dcc_chk {
  if $chat($1) { echo -a Open already }
  else dcc chat $1
}


So does this if it is called from an event.
Code:
alias dcc_chk {
  if $chat($nick) { echo -a Open already }
  else dcc chat $nick
}

#71331 14/02/04 08:54 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
i using it on:

on *:OPEN:=: {

so its not an alias..


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#71332 14/02/04 09:04 PM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Uh, "on *:open:=:" triggers when a dc chat window opens. A bit late to check then. wink

#71333 14/02/04 09:36 PM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
On *:open:=: if $window(=$nick,0) > 1 { echo -s A chat with $nick is open already. }

#71334 14/02/04 10:33 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
is this what you want?

CTCP ^*:DCC CHAT *:?: { if ($chat($nick) != $null) { echo -s I SAY BLAH TO A SECOND CHAT ATTEMPT | halt } }

no one can dcc chat to you twice,

or is it your trying to stop yourelf dcc chatting to someone twice?

#71335 14/02/04 11:35 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
stoping my self smile


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#71336 15/02/04 12:06 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Well, use what I posted hours ago, but don't try using it from an on open:=: event. :tongue: It WILL stop you from opening more than one chat per nick.
Code:
alias dcc_chat {
  ; /dcc_chat NickToChat
  if $chat($1) { echo -s You already have a chat open with $1 }
  else dcc chat $$1
}



Link Copied to Clipboard