|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
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,.) }
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
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,.) }
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
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,.) }
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
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.
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
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,.) }
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
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.
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
dont work, it echos to everything that i have a connection open to the nick..
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,.) }
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
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 alias dcc_chk {
if $chat($1) { echo -a Open already }
else dcc chat $1
} So does this if it is called from an event. alias dcc_chk {
if $chat($nick) { echo -a Open already }
else dcc chat $nick
}
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
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,.) }
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
Uh, "on *:open:=:" triggers when a dc chat window opens. A bit late to check then.
|
|
|
|
Joined: Dec 2002
Posts: 1,922
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,922 |
On *:open:=: if $window(=$nick,0) > 1 { echo -s A chat with $nick is open already. }
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
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?
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
stoping my self
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
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. alias dcc_chat {
; /dcc_chat NickToChat
if $chat($1) { echo -s You already have a chat open with $1 }
else dcc chat $$1
}
|
|
|
|
|