mIRC Home    About    Download    Register    News    Help

Print Thread
#193752 25/01/08 02:31 AM
Joined: Oct 2007
Posts: 36
A
asmodeo Offline OP
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Oct 2007
Posts: 36
Hi all!
I´m looking for a code but I need some help.

The result of code was this:
* bill4ever (BILL@7CE5D45C.BCBC22D.41D03C39.IP) has joined in #myroom ( before joined like bill_4 )

The Code notify me if one user has joined #myroom before with different nick.
Is possible? confused

Thanks smile

Last edited by asmodeo; 25/01/08 02:32 AM.

·´¯`·.¸¸“Jã¢k øf ãll ‡rãÐ꧅„…Mã§têR øf Nønꔸ¸.·´¯`·
asmodeo #193760 25/01/08 08:09 AM
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
You looking for a clone scanner?
Code:
on *:join:#: {
  if (%clones == on) {
    if ($ial($wildsite,0) != 1) {
      if (($ial($wildsite,1).nick ison $chan) && ($ial($wildsite,2).nick ison $chan)) {
        echo -i21 # $timestamp Clone join $ial($wildsite,1).nick - $ial($wildsite,2).nick - $address : $+($chan,.)
        if ($ial($wildsite,5) != $null) { 
          set %clones off | .timer 1 6 set %clones on
        }
      }
    }
  }
}

something like this? the %clones are used to prevent flooding off, if you want to disable the scanner, then type: /set %clones off


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
sparta #193770 25/01/08 02:14 PM
Joined: Oct 2007
Posts: 36
A
asmodeo Offline OP
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Oct 2007
Posts: 36
Hi all!
Hi sparta,
Thanks you, but I don´t looking for a clone scanner. shocked

The Code notify me if one user has joined #myroom before with different nick.
The result of code was this:
* bill4ever (BILL@7CE5D45C.BCBC22D.41D03C39.IP) has joined in #myroom ( before joined like bill_4 )

Imagine that bill_4 was joined 1 hour ago, and parted. After, the same user, but with different nick, has joined again.

I´m sorry, but my english´s not very good. blush I hope you understand me. smile

Thanks very much


·´¯`·.¸¸“Jã¢k øf ãll ‡rãÐ꧅„…Mã§têR øf Nønꔸ¸.·´¯`·
asmodeo #193777 25/01/08 04:21 PM
Joined: Jan 2004
Posts: 509
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
Yes, declare a variable for every nick on join event to a matching $address($nick,N). Then, if the user joins with a different nick but same host, loop for all the variables with the same matching $address($nick,N), then if the nick of the variable is different, echo it for the on join.

And then there should be alternate methods like hash tables and such.

The problem is, how long do you want mIRC to store every nick and host? For example, if you stored it for 30 seconds, then someone part/joining on a new nick, within 30 seconds, your mIRC can detect. And what would be the point for storing them forever.

Joined: Oct 2007
Posts: 36
A
asmodeo Offline OP
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Oct 2007
Posts: 36
Hi all!
Hi LostShadow,
yeah, there´s the idea. laugh I want that mIRC stored it for 1 hour. And the registry in .txt file Writing host and nick

I try with $read and $address($nick,2)in part & join event, but doesn´t work good.

Some example code, please? This isn´t easy to do... frown What else?

Thanks very much.



·´¯`·.¸¸“Jã¢k øf ãll ‡rãÐ꧅„…Mã§têR øf Nønꔸ¸.·´¯`·
asmodeo #193788 25/01/08 06:35 PM
Joined: Jan 2004
Posts: 509
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
Okay, I will write this script since I want it to myself.

What annoys me is if someone parts the channels I'm in, then pms me. Then I have to scroll at what channels this person parted from. So storing the variables for an hour should do it. I've always wanted to write a script for that.

The only option is when a user parts/quits all channels you're in, mIRC removes them from your IAL. If there is a way to prevent that, that would be great. But I got no response.

Be back.

Joined: Dec 2002
Posts: 2,033
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,033

No there is no way to prevent that.

Joined: Jan 2004
Posts: 509
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
So this is untest.

Code:
on *:part:#: {
  /set -u3600 %jnick $+ $nick $address
}

on *:join:#: {
  var %i = 0
  while (%i <= $var($eval(% $+ jnick $+ $nick $+ *),0)) {
    inc %i
    if ($address == $var($eval(% $+ jnick $+ $nick $+ *),%i).value) {
      if ($nick !iswm $remove($var($eval(% $+ jnick $+ $nick $+ *),%i),$chr(37),jnick)) && ($remove($var($eval(% $+ jnick $+ $nick $+ *),%i),$chr(37),jnick) !iswm $nick) {
        /echo $chan $nick joined previously as $remove($var($eval(% $+ jnick $+ $nick $+ *),%i),$chr(37),jnick) $+ .
      }
    }
  }
}


Several things.

So in your variables sheet, you will see things like:

%jnickNeal $address
%jnickasmodeo <Your $address>

I understand a lot of peole may use %variables for nicks, so this won't cause that duplication confusion.

I also use the %bnickNick $banmask, so... a jnick works perfect for me.

Also, I didn't want to have something like..

Someone-Away has joined channel.
Someone-Away previously joined as Someone.

Or even Someone`.

Or Someone``.

So, I used the !iswm check for sure.

So it will only work if the new nick is not in the old and the old is not in the new - so totally random new nick.

Now I'll use this for my own p.m. event to check if no comchans, then for part chans. May even store one for on quit event. smirk

Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
If I used that I would have hundreds of variables with hundreds of timers going at once.

I have chosen to log nicks on join in a hash table,ini file or MySql db. Then I can reference their gate and see what nickname they used. If it is different they are a clone!

DJ_Sol #193794 25/01/08 07:20 PM
Joined: Jan 2004
Posts: 509
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
Intresting concept of saying the -u<Number> is a timer. That true guys?

Joined: Oct 2007
Posts: 36
A
asmodeo Offline OP
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Oct 2007
Posts: 36
Hi all! smile

I´m test and not work good.
After, I try with this code but, Why wasn´t ok?

Code:
on *:KICK:#:{
  set -u3600 %jnick $+ $site $knick
}
on *:PART:#:{
  set -u3600 %jnick $+ $site $nick
}
on *:QUIT:{
  set -u3600 %jnick $+ $site $nick
}
;=========
on *:JOIN:#:{
  if $site == $remove($var($eval(% $+ jnick $+ $site),1),$chr(37),jnick) && $nick != $var($eval(% $+ jnick $+ $site),1).value {
   echo $chan *** $nick joined previously as $var($eval(% $+ jnick $+ $site),1).value
  }
}


Some Idea?

Thanks very much smile



·´¯`·.¸¸“Jã¢k øf ãll ‡rãÐ꧅„…Mã§têR øf Nønꔸ¸.·´¯`·
asmodeo #193801 25/01/08 10:03 PM
Joined: Jan 2004
Posts: 509
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
Had to test.

Perfect.

Got it all fixed.

Had to to debug a lot.

[January 25 2008 Friday 04:02:57 PM] * testtest (Laptop@PurpleSurge-33290AF8.fld-bsr1.chi-fld.il.cable.rcn.com) has left #mIRC
[January 25 2008 Friday 04:03:01 PM] * testtest (Laptop@PurpleSurge-33290AF8.fld-bsr1.chi-fld.il.cable.rcn.com) has joined #mIRC
add Laptop@PurpleSurge-33290AF8.fld-bsr1.chi-fld.il.cable.rcn.com var Laptop@24-148-19-135.fld-bsr1.chi-fld.il.cable.rcn.com
add Laptop@PurpleSurge-33290AF8.fld-bsr1.chi-fld.il.cable.rcn.com var user@worst.vhost.ever
add Laptop@PurpleSurge-33290AF8.fld-bsr1.chi-fld.il.cable.rcn.com var ~ohiostate@cpe-65-25-6-203.neo.res.rr.com
add Laptop@PurpleSurge-33290AF8.fld-bsr1.chi-fld.il.cable.rcn.com var GoPJirc@Wood.Raptors.own.everything
add Laptop@PurpleSurge-33290AF8.fld-bsr1.chi-fld.il.cable.rcn.com var Yeti@c-76-104-160-116.hsd1.wa.comcast.net
add Laptop@PurpleSurge-33290AF8.fld-bsr1.chi-fld.il.cable.rcn.com var thomasmoor@PurpleSurge-3DF4C379.freedom2surf.net
add Laptop@PurpleSurge-33290AF8.fld-bsr1.chi-fld.il.cable.rcn.com var SPPGuest61@PurpleSurge-DFB169D3.dsl.alice.nl
add Laptop@PurpleSurge-33290AF8.fld-bsr1.chi-fld.il.cable.rcn.com var POGEYMANZ@I.leik.chickenz
add Laptop@PurpleSurge-33290AF8.fld-bsr1.chi-fld.il.cable.rcn.com var SPPGuest87@D96113C0.71BC860E.FBC68ECF.IP
add Laptop@PurpleSurge-33290AF8.fld-bsr1.chi-fld.il.cable.rcn.com var CallOnMe@PurpleSurge-A0CED28D.kntncmtc01.kstnnc.ab.dh.suddenlink.net
add Laptop@PurpleSurge-33290AF8.fld-bsr1.chi-fld.il.cable.rcn.com var Ebola@rawr.rawr.fight.the.power
add Laptop@PurpleSurge-33290AF8.fld-bsr1.chi-fld.il.cable.rcn.com var Laptop@PurpleSurge-33290AF8.fld-bsr1.chi-fld.il.cable.rcn.com
yes4
testtest joined previously as Neal`.

Wohoo!

Joined: Jan 2004
Posts: 509
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
This is not supposed to happen.

[January 25 2008 Friday 04:04:33 PM] * testtest (Laptop@PurpleSurge-33290AF8.fld-bsr1.chi-fld.il.cable.rcn.com) has left #mIRC
[January 25 2008 Friday 04:04:39 PM] * testtest (Laptop@PurpleSurge-33290AF8.fld-bsr1.chi-fld.il.cable.rcn.com) has joined #mIRC
testtest joined previously as Neal`.
[January 25 2008 Friday 04:05:01 PM] * testtest (Laptop@PurpleSurge-33290AF8.fld-bsr1.chi-fld.il.cable.rcn.com) has left #mIRC
[January 25 2008 Friday 04:05:08 PM] * Nealtest (Laptop@PurpleSurge-33290AF8.fld-bsr1.chi-fld.il.cable.rcn.com) has joined #mIRC
Nealtest joined previously as Neal`.

Not sure why the 2nd echo's.

But I'll fix it later.

Code:
on *:part:#: {
  /set -u3600 %jnick $+ $nick $address
}

on *:join:#: {
  var %i = 0
  while (%i <= $var($eval(% $+ jnick $+ *),0)) {
    inc %i
    if ($address == $var($eval(% $+ jnick $+ *),%i).value) {
      if ($nick !iswm $remove($var($eval(% $+ jnick $+ *),%i),$chr(37),jnick)) && ($remove($var($eval(% $+ jnick $+ *),%i),$chr(37),jnick) !iswm $nick) {
        /echo $chan $nick joined previously as $remove($var($eval(% $+ jnick $+ *),%i),$chr(37),jnick) $+ .
      }
    }
  }
}


Edit: And the flip side of this script is, it will show you your previous nick when *you* join the channel. Heh.

Last edited by LostShadow; 25/01/08 10:08 PM.
Joined: Oct 2007
Posts: 36
A
asmodeo Offline OP
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Oct 2007
Posts: 36
It´s perfect. Nice code LostShadow smile Thanks you very much.

Quote:
Not sure why the 2nd echo's.

Becouse code must unset previously nick ´s variable when it finish.

Code:
on *:join:#: {
  var %i = 0
  while (%i <= $var($eval(% $+ jnick $+ *),0)) {
    inc %i
    if ($address == $var($eval(% $+ jnick $+ *),%i).value) {
      if ($nick !iswm $remove($var($eval(% $+ jnick $+ *),%i),$chr(37),jnick)) && ($remove($var($eval(% $+ jnick $+ *),%i),$chr(37),jnick) !iswm $nick) {
        /echo $chan $nick joined previously as $remove($var($eval(% $+ jnick $+ *),%i),$chr(37),jnick) $+ .
;I think so
      unset %jnick $+ $remove($var($eval(% $+ jnick $+ *),%i),$chr(37),jnick)
      }
    }
  }
}


Thanks again

Nice day smile


·´¯`·.¸¸“Jã¢k øf ãll ‡rãÐ꧅„…Mã§têR øf Nønꔸ¸.·´¯`·
Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
Originally Posted By: LostShadow
Intresting concept of saying the -u<Number> is a timer. That true guys?


/set [-snzeuN] <%var> [value]

This sets the value of %var to the specified value.

If you specify the -uN switch, %var is unset after N seconds, assuming it is not set again by another script. If you specify a zero for N, the variable is unset when the script finishes.


DJ_Sol #193834 26/01/08 04:59 PM
Joined: Jan 2004
Posts: 509
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
Yea, but the way I understand is, /.timers are off-track with time.

If mIRC does a /.timer for every -uN switch then I guess they are just as much off-track in duration.

Joined: Jan 2004
Posts: 509
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
Okay here's what I got.

Code:
on *:part:#: {
  /set -u3600 %jnick $+ $nick $address
  if ($comchan($nick,0) == 1) {
    /set -u3600 %pnick $+ $nick $comchan($nick,1)
  }
}

on *:quit:#: {
  /set -u3600 %qnick $+ $nick $address
}

(My kick event)
  if ($knick != $me) && ($nick != $me) && ($nick != ChanServ) {
    /set -u3600 %knick $+ $nick $chan
  }

on *:open:?:*: {
  if ($comchan($nick,0) > 0) {
    var %x = 1, %y 
    while (%x <= $comchan($nick,0)) { 
      %y = %y $comchan($nick,%x)
      if ($nick($comchan($nick,%x),0) == 2) && ($me isop $comchan($nick,%x)) && ($nick isreg $comchan($nick,%x)) && (m !isincs $chan($comchan($nick,%x)).mode) && ($left($1,1) != $chr(33)) {
        if (!$istok(%friend,$nick,44)) { /ban -u250 $comchan($nick,%x) $nick 2 | /kick $comchan($nick,%x) $nick Considering you have pm'd me while we are in this empty channel (just me an you), there was no need to p.m. me. Problem solved. }
      }
      inc %x 
    }
    if ($comchan($nick,1)) { /echo $nick $address %y }
  }
  if ($comchan($nick,0) == 0) {
    var %i = 0
    while (%i <= $var($eval(% $+ pnick $+ *),0)) {
      inc %i
      if ($nick == $remove($var($eval(% $+ pnick $+ *),%i),$chr(37),jnick)) {
        /echo $chan $nick parted previously at $var($eval(% $+ pnick $+ *),%i).value $+ .
      }
    }
    while (%i <= $var($eval(% $+ qnick $+ *),0)) {
      inc %i
      if ($nick == $remove($var($eval(% $+ qnick $+ *),%i),$chr(37),jnick)) {
        /echo $chan $nick quit previously at $var($eval(% $+ qnick $+ *),%i).value $+ .
      }
    }
    while (%i <= $var($eval(% $+ knick $+ *),0)) {
      inc %i
      if ($nick == $remove($var($eval(% $+ knick $+ *),%i),$chr(37),jnick)) {
        /echo $chan $nick quit previously kicked at $var($eval(% $+ knick $+ *),%i).value $+ .
      }
    }
  }
  /splay BatteryLow
}


My question is for the 3 while loops, checking for pnick, qnick, and knick. Will the while loops go 1 by 1 consecutively (wait for the 1st to finish, then start the 2nd), or will it perform all 3 at once? Meaning, the 3rd will start before the 1st will finish?

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
mIRC can only do one thing at a time... you cannot loop 3 different loops simultaneously.


Invision Support
#Invision on irc.irchighway.net
asmodeo #193909 27/01/08 05:15 AM
Joined: Oct 2007
Posts: 36
A
asmodeo Offline OP
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Oct 2007
Posts: 36
Hi all!
This´s "my" final Code. It´s Ok, perfect!
Thanks for all! wink

Code:
on *:part:#:{
   if *.MindForge.org !iswm $site {
     set -eu3600 %Previous $+ $nick $site
  }
}
on *:QUIT:{
   if *.MindForge.org !iswm $site {
     set -eu3600 %Previous $+ $nick $site
  }
}
on *:KICK:#:{
   if *.MindForge.org !iswm $gettok($address($knick,1),2,64) {
     set -eu3600 %Previous $+ $knick $gettok($address($knick,1),2,64)
  }
}
;========================================================
ON ^*:JOIN:#:{
  If $nick == $me { echo $chan $timestamp * Join on $chan | haltdef | halt }
  else {
    var %i = 0
    while (%i <= $var($eval(% $+ Previous $+ *),0)) {
      inc %i
      if ($site == $var($eval(% $+ Previous $+ *),%i).value) {
        if ($nick != $remove($var($eval(% $+ Previous $+ *),%i),$chr(37),Previous)) {
          echo $chan $timestamp * $nick ( $replace( $+ $address $+ ,@,12@) 12) has joined (14joined previously as $remove($var($eval(% $+ Previous $+ *),%i),$chr(37),Previous) $+ )
          splay Notify
          goto end 
        }
      }
    }
  echo $chan $timestamp * $nick ( $replace( $+ $address $+ ,@,12@) ) has joined
 }
 :end
 haltdef
}
;========================================================
on *:DISCONNECT:{ 
   unset %Previous*
}


Thanks very much again cool

Nice day smile


·´¯`·.¸¸“Jã¢k øf ãll ‡rãÐ꧅„…Mã§têR øf Nønꔸ¸.·´¯`·

Link Copied to Clipboard