mIRC Homepage

What is the join raw number? Can't fint it.

Posted By: Deep3D

What is the join raw number? Can't fint it. - 11/02/08 10:33 PM

I can't find the raw for join.

I'm going to make:
* nick (identd@host) has joined #channel and is an clone of clonenick

If there is no clone:
* nick (identd@host) has joined #channel

but whats the raw? I tryed many, but no.
Posted By: RoCk

Re: What is the join raw number? Can't fint it. - 11/02/08 10:37 PM


There is no raw for it.

/help on join
Posted By: Deep3D

Re: What is the join raw number? Can't fint it. - 11/02/08 10:42 PM

Thanks for fast reply.

But how to replace the nick han joined with the new nick has joined and is a clone?

like

on join
if nick is clone { Replace join message }
else nothing
Posted By: RoCk

Re: What is the join raw number? Can't fint it. - 11/02/08 10:47 PM

Use the ^ prefix with the haltdef command.

on ^!*:JOIN:#: {
if nick is clone {
haltdef
Replace join message
}
}

But do your own routine for clone checking as that one isn't real. Also, the ! prefix prevents it from being triggered when you join.

You could do...

Code:

on ^!*:JOIN:#: {
  if ($ialchan($mask($fulladdress,2),#,2)) {
    haltdef
    Replace join message
  }
}



Also you could replace $mask($fulladdress,2) with $wildsite
Posted By: Deep3D

Re: What is the join raw number? Can't fint it. - 11/02/08 11:00 PM

I had this:

Code:
on ^!*:JOIN:#: {
  if ($address($me,2) == $address($nick,2)) {
    var %clone = $address($nick,2) | var %m = $nick(#,0) | var %i = 1 | haltdef
    while (%i <= %m) {
      if (%clone == $address($nick(#,%i) ,2)) {
        if ($nick != $nick(#, %i)) { echo 3 -lt $chan * $nick ( $+ $remove($address($nick,1),*!*) $+ ) has joined # and is an clone of $nick(#,%i) ( $+ $remove($address($nick(#,%i),1),*!*) $+ ) }
      }
      inc %i
    }
  }
}


but your is probably better. smile
Posted By: RoCk

Re: What is the join raw number? Can't fint it. - 11/02/08 11:04 PM


You're wanting to catch your own clones ?
Posted By: Deep3D

Re: What is the join raw number? Can't fint it. - 11/02/08 11:45 PM

I don't want to catch my own clones. smile

Code:
on ^!*:JOIN:#: {
  var %clone = $address($nick,2) | var %m = $nick(#,0) | var %i = 1
  while (%i <= %m) {
    if (%clone == $address($nick(#,%i),2)) {
      if ($nick != $nick(#, %i)) { echo -l $chan $nick(#,%i) ( $+ $remove($address($nick(#,%i),1),*!*) $+ ) is a clone of $nick }
    }
    inc %i
  }
}


This will reply:
Paven (balle@85.19.*) is a clone of Paven1
Paven2 (balle@85.19.*) is a clone of Paven1
(Feb 12 00:37:50) * Paven1 (balle@85.19.*) has joined #channel

How to get the last line (join) to be first?
Eg:
(Feb 12 00:37:50) * Paven1 (balle@85.19.*) has joined #channel
Paven (balle@85.19.*) is a clone of Paven1
Paven2 (balle@85.19.*) is a clone of Paven1


One last thing, how to get the clones in one line?
And then the replys will show:
(Feb 12 00:37:50) * Paven1 (balle@85.19.*) has joined #channel
Paven and Paven2 is clones of Paven1

If there is more than 3 clones:
Paven, Paven2 and Paven3 is clones of Paven1

And if just one clone:
Paven is a clone of Paven1
Posted By: Deep3D

Re: What is the join raw number? Can't fint it. - 13/02/08 09:02 AM

I'm going for this code, but how to get the <nick> has joined to come before the echo without using timer?

(Feb 13 09:57:38) * test (test@192.168.1.1) has joined #test
(Feb 13 09:57:39) * test (test@192.168.1.1) is clone of test2 (test2@192.168.1.1)

Code:
on ^!*:JOIN:#:{
  if %join.clone.scan == on {
    var %clone = $address($nick,2) | var %m = $nick(#,0) | var %i = 1
    while (%i <= %m) {
      if (%clone == $address($nick(#,%i),2)) && ($nick != $nick(#, %i)) { .timer 1 1 echo -lt $chan * $nick ( $+ $remove($address($nick,5),$nick,!) $+ ) is clone of $nick(#,%i) ( $+ $remove($address($nick(#,%i),5),$nick(#,%i),!) $+ ) }
      inc %i
    }
  }
}
Posted By: Deep3D

Re: What is the join raw number? Can't fint it. - 14/02/08 09:25 PM

bump.. the question above. please help out. =)
Posted By: Mpdreamz

Re: What is the join raw number? Can't fint it. - 14/02/08 10:07 PM

Im not sure i understand you correctly the nick has joined message should already come before the clone scan message smirk
Posted By: Collective

Re: What is the join raw number? Can't fint it. - 14/02/08 10:19 PM

Either use 0-delay timer or remove ^ from the event prefixes - it's not needed unless you intend to hide the default message.
Posted By: Damsulegna

Re: What is the join raw number? Can't fint it. - 15/02/08 05:32 PM

could u not have both on same line???

Code:
on ^!*:JOIN:#:{
  if %join.clone.scan == on {
    var %x_match = [[ $+ $ialchan($address($nick,2),#,0) Clone $+ $iif($ialchan($address($nick,2),#,0) > 1,s) $+ ]]
    var %x = $ialchan($address($nick,2),#,0) , %nicks
    if (%x > 1) { 
      while (%x) { %nicks = %nicks $ialchan($address($nick,2),#,%x).nick | dec %x }
    }
    %xnicks = [[ $+ %nicks $+ ]]
    echo $colour(join) $target *** [Join] $nick has joined # %x_match $iif( $ialchan($address($nick,2),#,0) > 1 , %xnicks )
    haltdef
  }
}


Code:
*** [Join] nick has joined #Scripting [3 Clones] [nick1 nick2 nick3]

Posted By: argv0

Re: What is the join raw number? Can't fint it. - 15/02/08 06:48 PM

Are you asking if you can? or are you showing us that you can? The answer is yes, as you showed.
Posted By: Damsulegna

Re: What is the join raw number? Can't fint it. - 15/02/08 07:16 PM

Originally Posted By: Damsulegna
could u not have both on same line???


It was a direct question to Deep3D asking if all details on one line was more suited.

REF:
Originally Posted By: Deep3D

(Feb 13 09:57:38) * test (test@192.168.1.1) has joined #test
(Feb 13 09:57:39) * test (test@192.168.1.1) is clone of test2 (test2@192.168.1.1)
Posted By: Deep3D

Re: What is the join raw number? Can't fint it. - 19/02/08 12:48 AM

I decide to use your script Damsulegna! It works great, thank you. smile

I changed the code alittle

Code:
on ^!*:join:#:{
  if %join.clone.scan == on {
    var %x_match = ( $+ $ialchan($address($nick,2),#,0) clone $+ $iif($ialchan($address($nick,2),#,0) > 1,s) $+ :
    var %x = $ialchan($address($nick,2),#,0) , %nicks
    if (%x > 1) { 
      while (%x) { %nicks = %nicks $ialchan($address($nick,2),#,%x).nick | dec %x }
    }
    %xnicks = %nicks $+ )
    echo $colour(join) -lt $target * $nick ( $+ $remove($address($nick,5),$nick,!) $+ ) has joined # %x_match $iif( $ialchan($address($nick,2),#,0) > 1 , %xnicks )
    haltdef
  }
}


If nick joins and has no clones, it displays:
* test (test@192.168.1.100) has joined #test (1 clone:

How to prevent it from using the echo when there is no clones?
Posted By: Riamus2

Re: What is the join raw number? Can't fint it. - 19/02/08 02:09 AM

Just use the $iif to check the number of clones that you already have, but stick the %x_match in there...

Code:
echo $colour(join) -lt $target * $nick ( $+ $remove($address($nick,5),$nick,!) $+ ) has joined # $iif( $ialchan($address($nick,2),#,0) > 1 , %x_match %xnicks )


Or, if I read your question wrong and you don't want the join echoed at all, just stick it all into the $iif.
© 2022 mIRC Discussion Forums