Author Topic: Nick/IP Tracker  (Read 12447 times)

akemi

  • Newbie
  • *
  • Posts: 4
Nick/IP Tracker
« on: July 22, 2011, 04:49:05 AM »
I have been working and looking for some script/help to try and create a nick/IP tracker and I can't seem to find one, could someone help me?

Thanks!

Morio

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 256
Re: Nick/IP Tracker
« Reply #1 on: July 22, 2011, 07:16:17 AM »
I'm not sure if this is what you are looking for, but Dark`Star made this script a long time ago, and I still happen to have it.

Code: [Select]
Sub ONJOIN(Nickname,Host,Channel,ServerNumber)
  ident = lcase(Left(Host,instr(Host,"@")-1))
  Host = lcase(Mid(Host,instr(Host,"@")+1))
  hosts = getinifile("hosts.ini",Network,Host,"")
  idents = getinifile("idents.ini",Network,ident,"")
  if len(hosts) > 0 then
    if instr(hosts,lcase(nickname)) = 0 then
      SendCommand "/print " & Channel & " New host match; " & nickname & " matches host previously used by: " & replace(hosts,","," | "),ServerNumber
      hosts = hosts & "," & lcase(nickname)
    end if
  else
    hosts = lcase(nickname)
  end if
  if len(idents) > 0 and instr("~icechat7,~chatzilla,~icechat5,~icechat77",lcase(ident))=0 then
    if instr(idents,lcase(nickname)) = 0 then
      SendCommand "/print " & Channel & " New ident match; " & nickname & " matches ident previously used by: " & replace(idents,","," | "),ServerNumber
      idents = idents & "," & lcase(nickname)
    end if
  else
    idents = lcase(nickname)
  end if
  writeinifile "hosts.ini",Network,host,hosts
  writeinifile "idents.ini",Network,ident,idents
End Sub

When someone joins a channel, the script checks if the host/ident matches the one used by another nickname sometime in the past.
"I don't know what World War 3 will be fought with, but I know World War 4 with be fought with sticks and stones." - Albert Einstein

akemi

  • Newbie
  • *
  • Posts: 4
Re: Nick/IP Tracker
« Reply #2 on: July 22, 2011, 08:08:39 AM »
Yup that's what I want it to do, but I loaded the script and it's still not working. I saved it as a IceChat 5 script as well. Any other suggestions?

Thanks for your help!

akemi

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Nick/IP Tracker
« Reply #3 on: July 22, 2011, 01:38:06 PM »
Do you see nothing happening, any errors in the Console?
The IceChat God

akemi

  • Newbie
  • *
  • Posts: 4
Re: Nick/IP Tracker
« Reply #4 on: July 22, 2011, 01:44:48 PM »
Nothing, no errors, nada.

akemi

Morio

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 256
Re: Nick/IP Tracker
« Reply #5 on: July 22, 2011, 02:26:34 PM »
I just tried the script and it works fine.

Keep in mind that it needs to build up a database before it can tell which nicknames connect from the same host
"I don't know what World War 3 will be fought with, but I know World War 4 with be fought with sticks and stones." - Albert Einstein

akemi

  • Newbie
  • *
  • Posts: 4
Re: Nick/IP Tracker
« Reply #6 on: July 22, 2011, 05:53:14 PM »
So this does it from host, is it possible to get it to also do the following or another script do to the following:

I log in as John then I log in as Louise, to get a script that say "Louise has been seen as: John" before?

Thanks a bunch!

akemi

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Nick/IP Tracker
« Reply #7 on: July 22, 2011, 10:37:10 PM »
That is what the script does.
The IceChat God

Dan_B

  • Newbie
  • *
  • Posts: 1
Re: Nick/IP Tracker
« Reply #8 on: November 18, 2011, 03:14:10 AM »
I cant get it to work either, no errors or messages. A basic, quick step-by-step please? :)

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Nick/IP Tracker
« Reply #9 on: November 18, 2011, 07:35:18 PM »
One fault I see in it is this:

hosts = getinifile("hosts.ini",Network,Host,"")

Where is 'Network' defined? No where. So it will not work.

What should be in there is the network name, which needs to be extracted from an $identifier\


Network = GetIdentifier("$network", ServerNumber)

I added it right after the ONJOIN call.
No idea if it will make it work, but its certainly a start, because w/o it, it will surely NOT work, as "len(hosts)" will always equal 0, so the if statement fails.

Code: [Select]
Sub ONJOIN(Nickname,Host,Channel,ServerNumber)
  Network = GetIdentifier("$network", ServerNumber)
  ident = lcase(Left(Host,instr(Host,"@")-1))
  Host = lcase(Mid(Host,instr(Host,"@")+1))
  hosts = getinifile("hosts.ini",Network,Host,"")
  idents = getinifile("idents.ini",Network,ident,"")
  if len(hosts) > 0 then
    if instr(hosts,lcase(nickname)) = 0 then
      SendCommand "/print " & Channel & " New host match; " & nickname & " matches host previously used by: " & replace(hosts,","," | "),ServerNumber
      hosts = hosts & "," & lcase(nickname)
    end if
  else
    hosts = lcase(nickname)
  end if
  if len(idents) > 0 and instr("~icechat7,~chatzilla,~icechat5,~icechat77",lcase(ident))=0 then
    if instr(idents,lcase(nickname)) = 0 then
      SendCommand "/print " & Channel & " New ident match; " & nickname & " matches ident previously used by: " & replace(idents,","," | "),ServerNumber
      idents = idents & "," & lcase(nickname)
    end if
  else
    idents = lcase(nickname)
  end if
  writeinifile "hosts.ini",Network,host,hosts
  writeinifile "idents.ini",Network,ident,idents
End Sub

The IceChat God

Morio

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 256
Re: Nick/IP Tracker
« Reply #10 on: November 19, 2011, 12:52:46 PM »
'Network' actually returns your current network, and I never did any extensive testing of the script which is probably why I missed it.
"I don't know what World War 3 will be fought with, but I know World War 4 with be fought with sticks and stones." - Albert Einstein

Muttley9

  • Newbie
  • *
  • Posts: 3
Re: Nick/IP Tracker
« Reply #11 on: February 27, 2012, 03:12:28 PM »
How would I best access this script? I have it installed and have an alias to access it, but no result appears in the room I am in.

the alias I am using: /nc /! onjoin $1

I have also used: /nc /! ONJOIN $1

what am I doing wrong?  :?

Thank you

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Nick/IP Tracker
« Reply #12 on: February 27, 2012, 05:52:08 PM »
As was stated above, the script is broken, and the original author is not around to fix it.
You may just need to patch it as the 'Network' issue above states, but no certainty in this.
The IceChat God