mIRC Home    About    Download    Register    News    Help

Print Thread
#111012 12/02/05 02:25 PM
Joined: Feb 2005
Posts: 11
N
Nizzle Offline OP
Pikka bird
OP Offline
Pikka bird
N
Joined: Feb 2005
Posts: 11
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
Joined: Jan 2005
Posts: 31
C
Ameglian cow
Offline
Ameglian cow
C
Joined: Jan 2005
Posts: 31
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: 145
G
Vogon poet
Offline
Vogon poet
G
Joined: Dec 2002
Posts: 145
$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
Joined: Feb 2005
Posts: 11
N
Nizzle Offline OP
Pikka bird
OP Offline
Pikka bird
N
Joined: Feb 2005
Posts: 11
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
Joined: Jan 2005
Posts: 31
C
Ameglian cow
Offline
Ameglian cow
C
Joined: Jan 2005
Posts: 31
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
Joined: Feb 2005
Posts: 11
N
Nizzle Offline OP
Pikka bird
OP Offline
Pikka bird
N
Joined: Feb 2005
Posts: 11
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: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
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,


Mentality/Chris
#111019 12/02/05 03:49 PM
Joined: Feb 2005
Posts: 11
N
Nizzle Offline OP
Pikka bird
OP Offline
Pikka bird
N
Joined: Feb 2005
Posts: 11
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: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
That is your hostname. You cannot obtain the IP address without performing a /DNS lookup. You may wish to see /help ON DNS.

Regards,


Mentality/Chris
#111021 12/02/05 03:51 PM
Joined: Jan 2005
Posts: 31
C
Ameglian cow
Offline
Ameglian cow
C
Joined: Jan 2005
Posts: 31
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
Joined: Feb 2005
Posts: 11
N
Nizzle Offline OP
Pikka bird
OP Offline
Pikka bird
N
Joined: Feb 2005
Posts: 11
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,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
If the server masks hostnames then you won't have any way of getting the users ip address other than asking them for it.


New username: hixxy
#111024 13/02/05 11:11 AM
Joined: Jun 2003
Posts: 56
G
Babel fish
Offline
Babel fish
G
Joined: Jun 2003
Posts: 56
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.)


- Andrew Berquist, Windfyre Network

Link Copied to Clipboard