What I'm trying to do is to add the users IP address after the nick. Like this
Code: Select all
nick - 255.255.255.0
nick2 - 192.168.1.100
etc
Code: Select all
set ver "1.1-opp"
set dumpfile "/nicklist.txt"
set channel "#channelname"
# Bind Events we want to catch...
# Note: Remove the following 6 lines for timer only update. Reccomended for larger channels.
bind sign - "$channel %" nicklist:make
bind part - "$channel %" nicklist:make
bind splt - "$channel %" nicklist:make
bind join - "$channel %" nicklist:make
bind kick - "$channel %" nicklist:make
bind nick - "$channel %" nicklist:make
bind mode - "$channel %" nicklist:make
bind raw - "353" nicklist_opp:make
proc nicklist:make {args} {
global channel
putserv "NAMES $channel"
}
proc nicklist_opp:make {from keyword argz} {
global dumpfile channel botnick
set nicklist [split [lindex [split [string trim $argz] ":"] 1] " "]
set templist ""
set ownerlist ""
set protlist ""
set oplist ""
set hoplist ""
set voicelist ""
set userlist ""
foreach user $nicklist {
if {[string first "~" $user] == 0} {
lappend ownerlist $user
} elseif {[string first "!" $user] == 0} {
lappend protlist $user
} elseif {[string first "@" $user] == 0} {
lappend oplist $user
} elseif {[string first "%" $user] == 0} {
lappend hoplist $user
} elseif {[string first "+" $user] == 0} {
lappend voicelist $user
} else {
lappend userlist $user
}
}
set ownerlist [lsort -dictionary $ownerlist]
set protlist [lsort -dictionary $protlist]
set oplist [lsort -dictionary $oplist]
set hoplist [lsort -dictionary $hoplist]
set voicelist [lsort -dictionary $voicelist]
set userlist [lsort -dictionary $userlist]
foreach user $ownerlist {
lappend templist $user
}
foreach user $protlist {
lappend templist $user
}
foreach user $oplist {
lappend templist $user
}
foreach user $hoplist {
lappend templist $user
}
foreach user $voicelist {
lappend templist $user
}
foreach user $userlist {
lappend templist $user
}
set outputfile [open $dumpfile w]
foreach user $templist {
puts $outputfile $user
}
close $outputfile
putlog "Saving $channel NickList..."
return 1
}
if {![info exists nicklist_running]} {
timer 60 nicklist:make
set nicklist_running 1
}
nicklist:make
putlog "Write Channel Nicklist to File v$ver by SpOoK loaded."
Regards,
Martin