mIRC Home    About    Download    Register    News    Help

Print Thread
#111012 12/02/05 02:25 PM
N
Nizzle
Nizzle
N
Hi,

I made my very first bot in IRC and I was wondering how to returns someones IP adress. I now have something like this but it obviously doesnt work.

on @[IP][*:TEXT:!ip *:#: {
$ip $nick
}

I iam stuck from the $ip variable. Dont know how to continue... any help?

#111013 12/02/05 02:43 PM
C
Chris2015
Chris2015
C
unless you have groups setup in your userlist for @[IP][..
you do not need @[IP][*:text:...etc..

on *:text:!ip:#:msg $chan My ip is $ip
this will msg the channel with your IP (or your bots ip...)

on *:text:!ip *:#:{ if $2 !ison $chan {
msg $chan you got the nickname wrong
}
else { msg $chan $2 host is $address($2,2)
}
}
this will return the host of $2..example...
!ip Chris2015
that will get my hostmask and msg it to the channel


hope this helps

#111014 12/02/05 02:44 PM
Joined: Dec 2002
Posts: 143
G
Vogon poet
Offline
Vogon poet
G
Joined: Dec 2002
Posts: 143
$ip - returns your IP address.

Are you really looking for the user's IP or are you looking for the portion of address after " @ "?

For a starter look at $site

#111015 12/02/05 03:33 PM
N
Nizzle
Nizzle
N
I'm looking for the IP address of the user.

So when I do !ip nickname it has to return the users IP address.

I tried

on *:text:!ip *:#:{ if $2 !ison $chan {
/msg $chan you got the nickname wrong
}
else { /msg $chan $2 host is $address ($2,2)
}
}

But for some reason it doesnt work.

#111016 12/02/05 03:39 PM
C
Chris2015
Chris2015
C
are you typing !ip on the SAME mirc that you put the script on?
if so then it wont work..previously you said that you had a bot..
so put the code on your bot, not YOUr client.

#111017 12/02/05 03:41 PM
N
Nizzle
Nizzle
N
I miight be an IRC noob but I know that :tongue:

I'm in the channel with my bot but it just doesnt sho wanything confused

#111018 12/02/05 03:47 PM
Joined: Jun 2003
Posts: 4,670
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 4,670
on *:text:!ip *:#:{
if ($2 !ison $chan) {
msg $chan you got the nickname wrong
}
else {
msg $chan $2 host is $address($2,2)
}
}


You had a space between $address and ($2,2). I tested the above in my own mIRC so it should work okay smile

Regards,

#111019 12/02/05 03:49 PM
N
Nizzle
Nizzle
N
Nizzle host is *!*@g9113.upc-g.chello.nl

it does work now tho but it shows my erm well it isnt my IP address of is it?

Anyway thx for all ur help I didnt mention that in all my otehr posts shocked

#111020 12/02/05 03:51 PM
Joined: Jun 2003
Posts: 4,670
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 4,670
That is your hostname. You cannot obtain the IP address without performing a /DNS lookup. You may wish to see /help ON DNS.

Regards,

#111021 12/02/05 03:51 PM
C
Chris2015
Chris2015
C
you will have to resolve that..that is jsut as good as an ip address..

/dns *!*@---------

also..sorry about the space
<--is half asleep

happy scriptin'

#111022 12/02/05 03:52 PM
N
Nizzle
Nizzle
N
ok thx guys I'll see what I can do on my own now smile

Cheers!

#111023 12/02/05 04:58 PM
Joined: Nov 2003
Posts: 2,321
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,321
If the server masks hostnames then you won't have any way of getting the users ip address other than asking them for it.

#111024 13/02/05 11:11 AM
G
Gamersad
Gamersad
G
Yeah, if there is a mode protecting the users IP you cant do it... I dont really see a use for this command unless your an IRCop and its in an oper channel.. or something even then *shrugs* ip addresses are quit pointless to an everyday IRC user... (we mask ours at our network.. +x on unreal.)


Link Copied to Clipboard