This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Old posts that have not been replied to for several years.
r
rantanplan
Post
by rantanplan » Fri Mar 11, 2005 11:29 am
Hello,i'm looking for a small script that writes the IP adress of peoples nick to a text file when they join my channel.. And then when they part/quit, their IP adress is removed from the file..
Any help?
greenbear
Owner
Posts: 733 Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway
Post
by greenbear » Fri Mar 11, 2005 12:03 pm
To resolve the host you can use the dns module.
Here's an example..
Code: Select all
bind join - * jip
proc jip {n u h c} {
set uh [lindex [split $u @] 1]
set ip [dnslookup $uh resip]
# ...
}
proc resip {i h s} {
if {$i!="0.0.0.0"} {
return $i
} {
return $h
}
}
You'll find more info about reading/writing to a file
here .
Good Luck!
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Fri Mar 11, 2005 12:56 pm
you better maintain those hosts/IPs in a list, saving it periodically in a file