This script is similar to Lindrian's snippet for /findip, but I completely rewrote it my own way and with different features.
What it does: You can add/delete a nick and their IP in an ini file, then type !getip to search the ini. (This is for when a person is offline) Or, you can type !findip to search anyone on IRC at the time.
Also, you can type !getnick to find a nick used for an IP.
To find the nick a saved user's IP is using, type !getnickip.
Examples:
!addip/!delip sharpknife - Adds/deletes sharp|knife from ips.ini
!getip sharpknife - Searches ips.ini for sharpknife's IP
!findip sharpknife - Searches your IRC server for sharpknife's IP
!getnick Swift-65B870F1.sip.rdu.bellsouth.net - Searches your IRC server for a user with that address
!getnickip sharpknife - Searches ips.ini for sharpknife's IP, then uses that to find the nick sharpknife is on.
on *:TEXT:!addip *:#:{
if ($address($nick,2)) == (your address here) {
writeini ips.ini $2 IP $3-
notice $nick IP for $2 added.
}
}
on *:TEXT:!delip *:#:{
if ($address($nick,2)) == (your address here) {
remini ips.ini $2
notice $nick IP for $2 deleted.
}
}
on *:TEXT:!getip *:#:{
if ($address($nick,2)) == (your address here) {
notice $nick $2- $+ 's IP is: $readini(ips.ini,$2,IP)
}
}
on *:TEXT:@getip *:#:{
if ($address($nick,2)) == (your address here) {
msg $chan $2- $+ 's IP is: $readini(ips.ini,$2,IP)
}
}
on *:TEXT:!findip *:#:{
if ($address($nick,2)) == (your address here) {
notice $nick $2- $+ 's IP is: $ial($2).host
}
}
on *:TEXT:@findip *:#:{
if ($address($nick,2)) == (your address here) {
msg $chan $2- $+ 's IP is: $ial($2).host
}
}
on *:TEXT:!getnick *:#:{
if ($address($nick,2)) == (your address here) {
notice $nick Nick associated with $2 is: $ial($2).nick
}
}
on *:TEXT:@getnick *:#:{
if ($address($nick,2)) == (your address here) {
msg $chan Nick associated with $2 is: $ial($2).nick
}
}
on *:TEXT:!getnickip*:#:{
if ($address($nick,2)) == (your address here) {
notice $nick Nick being used by $readini(ips.ini,$2,IP) $+ : $ial(*!*@ $+ $readini(ips.ini,$2,IP)).nick
}
}
on *:TEXT:@getnickip*:#:{
if ($address($nick,2)) == (your address here) {
msg $chan Nick being used by $readini(ips.ini,$2,IP) $+ : $ial(*!*@ $+ $readini(ips.ini,$2,IP)).nick
}
}
make one variable and you only have to declare your ip once.
but tbh I dont see how this is helpful when on most networks your host is 1) cloaked and 2) your cloak changes... and 3) you have vhosts on off... w/e dont bash me just a suggestion. I made one just to log joins/parts/quits/connects/nickchanges/bans/kicks/serverbannes/kills... etc...