<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/16532" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2013-06-01T08:53:52-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/16532</id>

		<entry>
		<author><name><![CDATA[hayuto]]></name></author>
		<updated>2013-05-31T22:21:43-04:00</updated>

		<published>2013-05-31T22:21:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101610#p101610</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101610#p101610"/>
		<title type="html"><![CDATA[[SOLVED] Nickname/Uhost tracker script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101610#p101610"><![CDATA[
anyone know a script that could tell if someone uses a nick of a person from text file? i mean i would put known hosts and nock they uses to text file the script would alert the channel, not even kick, that this isnt really the peron we know?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12239">hayuto</a> — Fri May 31, 2013 10:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[kingkong]]></name></author>
		<updated>2013-06-01T08:53:52-04:00</updated>

		<published>2013-03-30T09:12:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101311#p101311</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101311#p101311"/>
		<title type="html"><![CDATA[[SOLVED] Nickname/Uhost tracker script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101311#p101311"><![CDATA[
<blockquote class="uncited"><div>I believe this is much closer to what you were looking for.<br>Will monitor all channels the bot is on, for joins and nick changes.<br>Will then report all other nicks that uhost has also been know as,<br>to all channels and/or nicks listed in the 'report_to' setting.<br><br>Script is completely untested, so let me know how it works out.<br><div class="codebox"><p>Code: </p><pre><code># Nickname/Uhost tracker script # Egghelp version, donations to slennox are welcomed. :P # Revised version by SpiKe^^ (5 Mar 2013) ## set your filename set filename "nicklist.txt" # set the channel(s) and/or nick(s) to report the nick info to# space separated list# example:  set report_to {#chanadmin}# example:  set report_to {#admin #chan2 bart ted}set report_to {#somechannel}# set the number of seconds not to report on the same nickset nk_recent "15"# set the maximum number of lines to keep in the file# the oldest last seen uhosts/nicks will be deleted from the fileset file_max "100"# set the maximum number of chars to use for a line of textset char_max "350"# set the text to use for the beginning of each line sentset txt_pre "%nick% is also known as :"# set the text to use for the separator between the nicksset txt_sep ", "################### END OF SETTINGS ###################bind nick - * nick_nickchange bind join - * join_onjoin # make sure the file exists before we go to read it # this initializes the file if it doesn't already exist # and makes it blank to start with. if {![file exists $filename]} {    set file [open $filename "w"]    close $file } set report_to [split $report_to]# check for nick changes proc nick_nickchange {nick uhost hand chan newnick} {    join_onjoin $newnick $uhost $hand $chan    return 0} # check for joins proc join_onjoin {nick uhost hand chan} {    global filename report_to nk_recent file_max char_max txt_pre txt_sep nktrack   # see if this nick has been reported in last $nk_recent seconds   set nklow [string tolower $nick]   if {[llength [set recent [array names nktrack]]]&gt;"0"} {      set old [expr {[unixtime]-$nk_recent}]      set fnd 0      foreach ename $recent {        if {$nktrack($ename)&lt;$old} {  unset nktrack($ename)        } elseif {$ename eq $nklow} {  set fnd 1  }      }      if {$fnd=="1"} {  return 0  }   }   set nktrack($nklow) [unixtime]   # keep uhost lowercase for simplicity.    set uhost [string tolower $uhost]   # read the file    set file [open $filename "r"]    set text [split [read $file] \n]    close $file    # locate a duplicate host    set found [lsearch -glob $text "*&lt;$uhost"]   if {$found &lt; 0} {       # host isn't found in the file       set nlist [list $nick]   } else {       # the host exists, so set our list of nicks for that host       set nicks [lindex [split [lindex $text $found] "&lt;"] 0]      set nlslow [split [string tolower $nicks] ","]      set nlist [split $nicks ","]       # remove the found line from the text      set text [lreplace $text $found $found]      # is the nick already known for that host?       if {[set pos [lsearch $nlslow $nklow]]&gt;"-1"} { set nlist [lreplace $nlist $pos $pos] }      # if nick is also known as someone else, say so      if {[llength $nlist]&gt;"0"} {        set pre [string map [list %nick% $nick] $txt_pre]        set tmp $pre[join $nlist $txt_sep]        if {[string length $tmp]&lt;=$char_max} {          foreach tgt $report_to {  putserv "privmsg $tgt :$tmp"  }        } else {  set tmp $pre[lindex $nlist 0]          foreach nk [lrange $nlist 1 end] {            set nx $tmp$txt_sep$nk            if {[string length $nx]&gt;$char_max} {              foreach tgt $report_to {  putserv "privmsg $tgt :$tmp"  }              set tmp $pre$nk            } else {  set tmp $nx  }          }          foreach tgt $report_to {  putserv "privmsg $tgt :$tmp"  }        }      }      lappend nlist $nick   }    # write the new file, this uhost and nicks first   set file [open $filename "w"]   puts $file [join $nlist ","]&lt;$uhost  ;  set cnt 1   foreach line $text {     if {[string length $line]} {  puts $file "$line"  ;  incr cnt  }     if {$cnt==$file_max} {  break  }   }    close $file    return 0} putlog "Nickname/Uhost tracker enabled."</code></pre></div></div></blockquote><br><br>Hello. Thanks a lot SpiKe^^ for this patch. it works nice and solves the ex problems indeed. i was testing it enough of time and saw some needs or minor issues which i will state here now.<br><br>-script should have an exempt flags setting...  so it doesnt try to track the bots or known users. it would be nice if i will not need to add this user on bot's .user file but script may creates it's own exempt file for this purpose maybe. or the better option is to point the user on nicklist.text file on source without create another file. for my opinion, if i ran "!exempt ip" command in the channel, the script will add # sign at the beginning of line in nicklist.text for this nick's ip. so, it will not match or announce it on nick changes or joins. if you have better idea, it's ok too. (i am using only ip numbers to catch users. no idents included on my edited script, so, just cloaked ip's as *!*@ip.here on each nick is assigned on nicklist.text at my own patched script) if i will use !exempt nick then it may cause problem coz some users not registered their nicks and it will exempt to other users who used same nick too. i meant, so many different users can use the same nick. it may cause problem. that's why ip exempt better way. it shouldn't track exempted ip.<br><br>-!forget ip same as mentioned !exempt ip on above.<br><br>-if nick begins with [ sign then output being wrong. maybe it's having problem with ^ or ' and other signs, i'm not sure but sometimes outputs seems as weird and not alphanumeric. showing just random unrecognized signs. sometimes my nicklist.txt file being delete and lost. it begins from zero. i don't know why happens so, but i'm suspecting from those kinds of signs maybe creates problem while reading or writing?<br><br>-it would be nice if we can add some nicks to be exempted as Guest_997 Guest_998 Guest_999 etc. coz some users using only as Guest nicknames and they're having 200 old nicknames to be seen.<br><br>-use lreverse to show it the other direction. it would be better as like "NewNick &lt; BeforeTheNewNick | blah2 | blah1" because now it's showing latest nick as in the end of list. oldest is on the beginning. On view it would be better if nicks will be shown from left to right. on left side, the latest nick will seem better.<br><br>-the commands would be able to run by bot ops. not by everyone.<br><br>- if {[isbotnick $nick]} {  return 0  } so that bot should ignore his own joins. yeah and other bots joins etc? now bot announce repeats his own nick X times in a row on restarts or his own joins. bot should not announce hiw own and maybe owner|botops nicknames. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>- i don't know why but nicklist.txt file starts from zero by itself on sometimes and i can't know when it happens. deletes the whole file and begins from zero. i need a backup system and automatic deletion to this backup files. ( i already wrote a script to make backups but need an automation to delete them. also, i can't know when the file returns to zero, that's the problem )<br><br>- there is biggest problem is that;<br><br>IP: 0E57D4.321A87.81A6DF.C1410C Realname: (BB1831196912)  and IP: 0E57D4.321A87.81A6DF.A9F7A2 Realname: (BB1831196912)<br><br>those are two different ips and different users. but script shows them as same user. it's incorrect. if it's because of Realname part? can fix this please?<br><br>thanks a lot for all and script. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11957">kingkong</a> — Sat Mar 30, 2013 9:12 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2013-03-06T01:48:44-04:00</updated>

		<published>2013-03-06T01:48:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101181#p101181</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101181#p101181"/>
		<title type="html"><![CDATA[[SOLVED] Nickname/Uhost tracker script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101181#p101181"><![CDATA[
I believe this is much closer to what you were looking for.<br>Will monitor all channels the bot is on, for joins and nick changes.<br>Will then report all other nicks that uhost has also been know as,<br>to all channels and/or nicks listed in the 'report_to' setting.<br><br>Script is completely untested, so let me know how it works out.<br><div class="codebox"><p>Code: </p><pre><code># Nickname/Uhost tracker script # Egghelp version, donations to slennox are welcomed. :P # Revised version by SpiKe^^ (5 Mar 2013) ## set your filename set filename "nicklist.txt" # set the channel(s) and/or nick(s) to report the nick info to# space separated list# example:  set report_to {#chanadmin}# example:  set report_to {#admin #chan2 bart ted}set report_to {#somechannel}# set the number of seconds not to report on the same nickset nk_recent "15"# set the maximum number of lines to keep in the file# the oldest last seen uhosts/nicks will be deleted from the fileset file_max "100"# set the maximum number of chars to use for a line of textset char_max "350"# set the text to use for the beginning of each line sentset txt_pre "%nick% is also known as :"# set the text to use for the separator between the nicksset txt_sep ", "################### END OF SETTINGS ###################bind nick - * nick_nickchange bind join - * join_onjoin # make sure the file exists before we go to read it # this initializes the file if it doesn't already exist # and makes it blank to start with. if {![file exists $filename]} {    set file [open $filename "w"]    close $file } set report_to [split $report_to]# check for nick changes proc nick_nickchange {nick uhost hand chan newnick} {    join_onjoin $newnick $uhost $hand $chan    return 0} # check for joins proc join_onjoin {nick uhost hand chan} {    global filename report_to nk_recent file_max char_max txt_pre txt_sep nktrack   # see if this nick has been reported in last $nk_recent seconds   set nklow [string tolower $nick]   if {[llength [set recent [array names nktrack]]]&gt;"0"} {      set old [expr {[unixtime]-$nk_recent}]      set fnd 0      foreach ename $recent {        if {$nktrack($ename)&lt;$old} {  unset nktrack($ename)        } elseif {$ename eq $nklow} {  set fnd 1  }      }      if {$fnd=="1"} {  return 0  }   }   set nktrack($nklow) [unixtime]   # keep uhost lowercase for simplicity.    set uhost [string tolower $uhost]   # read the file    set file [open $filename "r"]    set text [split [read $file] \n]    close $file    # locate a duplicate host    set found [lsearch -glob $text "*&lt;$uhost"]   if {$found &lt; 0} {       # host isn't found in the file       set nlist [list $nick]   } else {       # the host exists, so set our list of nicks for that host       set nicks [lindex [split [lindex $text $found] "&lt;"] 0]      set nlslow [split [string tolower $nicks] ","]      set nlist [split $nicks ","]       # remove the found line from the text      set text [lreplace $text $found $found]      # is the nick already known for that host?       if {[set pos [lsearch $nlslow $nklow]]&gt;"-1"} { set nlist [lreplace $nlist $pos $pos] }      # if nick is also known as someone else, say so      if {[llength $nlist]&gt;"0"} {        set pre [string map [list %nick% $nick] $txt_pre]        set tmp $pre[join $nlist $txt_sep]        if {[string length $tmp]&lt;=$char_max} {          foreach tgt $report_to {  putserv "privmsg $tgt :$tmp"  }        } else {  set tmp $pre[lindex $nlist 0]          foreach nk [lrange $nlist 1 end] {            set nx $tmp$txt_sep$nk            if {[string length $nx]&gt;$char_max} {              foreach tgt $report_to {  putserv "privmsg $tgt :$tmp"  }              set tmp $pre$nk            } else {  set tmp $nx  }          }          foreach tgt $report_to {  putserv "privmsg $tgt :$tmp"  }        }      }      lappend nlist $nick   }    # write the new file, this uhost and nicks first   set file [open $filename "w"]   puts $file [join $nlist ","]&lt;$uhost  ;  set cnt 1   foreach line $text {     if {[string length $line]} {  puts $file "$line"  ;  incr cnt  }     if {$cnt==$file_max} {  break  }   }    close $file    return 0} putlog "Nickname/Uhost tracker enabled."</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Wed Mar 06, 2013 1:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[kingkong]]></name></author>
		<updated>2013-03-03T03:39:29-04:00</updated>

		<published>2013-03-03T03:39:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101163#p101163</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101163#p101163"/>
		<title type="html"><![CDATA[[SOLVED] Nickname/Uhost tracker script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101163#p101163"><![CDATA[
thanks SpiKe^^ you're very quick <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> i have edited my post to mention somethings important too. i hope, announces will be able to set different than monitored channels. thanks for quick response and help <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11957">kingkong</a> — Sun Mar 03, 2013 3:39 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2013-03-03T02:55:55-04:00</updated>

		<published>2013-03-03T02:55:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101162#p101162</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101162#p101162"/>
		<title type="html"><![CDATA[[SOLVED] Nickname/Uhost tracker script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101162#p101162"><![CDATA[
Here's a channel specific version of the script, using 'setudef flag nicktrack'<div class="codebox"><p>Code: </p><pre><code># Nickname/Uhost tracker script # Egghelp version, donations to slennox are welcomed. :P # should duplicate nicknames be allowed? # 0 = no, 1 and above = yes set dupes 0 #your filename set filename "nicklist.txt" bind nick - * nick_nickchange bind join - * join_onjoin setudef flag nicktrack# make sure the file exists before we go to read it # this initializes the file if it doesn't already exist # and makes it blank to start with. if {![file exists $filename]} {    set file [open $filename "w"]    close $file } # check for nick changes proc nick_nickchange {nick uhost hand chan newnick} {    if {![channel get $chan "nicktrack"]} {  return 0  }   join_onjoin $newnick $uhost $hand $chan    return 0} # check for joins proc join_onjoin {nick uhost hand chan} {    global filename dupes    if {![channel get $chan "nicktrack"]} {  return 0  }   # keep everything lowercase for simplicity.    set nick [string tolower $nick]    set uhost [string tolower $uhost]    # read the file    set file [open $filename "r"]    set text [split [read $file] \n]    close $file    # locate a duplicate host    set found [lsearch -glob $text "*&lt;$uhost"]    if {$found &lt; 0} {       # host isn't found so let's append the nick and host to our file       set file [open $filename "a"]       puts $file "$nick&lt;$uhost"       close $file    } else {       # the host exists, so set our list of nicks for that host       set nicks [lindex [split [lindex $text $found] "&lt;"] 0]       # is the nick already known for that host?       set nlist [split $nicks ","]       if {[set pos [lsearch $nlist $nick]] != -1} { set nlist [lreplace $nlist $pos $pos] }       # MAKE SURE TO READ THE COMMENTS BELOW       # To make it output to channel remove the # the begins the line below.       #if {[string length [join $nlist]]} { putserv "privmsg $chan :$nick is also known as :[join $nlist ", "]." }       # To make it output to partyline remove the # the begins the line below.       #if {[string length [join $nlist]]} { putloglev d * "*** $nick on $chan is also known as :[join $nlist ", "]." }       set known [lsearch -exact [split $nicks ","] $nick]       if {($known != -1) &amp;&amp; ($dupes &lt; 1)} {          # if the nick is known return          return       } else {          # otherwise add the nick to the nicks for that host          set text [lreplace $text $found $found "$nicks,$nick&lt;$uhost"]       }       # now lets write the new list to the file       set file [open $filename "w"]       foreach line $text {          if {[string length $line]} { puts $file "$line" }       }       close $file    }    return 0} putlog "Nickname/Uhost tracker enabled."</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Sun Mar 03, 2013 2:55 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[kingkong]]></name></author>
		<updated>2013-03-03T03:36:38-04:00</updated>

		<published>2013-03-03T02:36:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101161#p101161</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101161#p101161"/>
		<title type="html"><![CDATA[[SOLVED] Nickname/Uhost tracker script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101161#p101161"><![CDATA[
<blockquote class="uncited"><div>...</div></blockquote><br>hi. on this last code, i have been experienced some issue on my needs. as first, i want to use outputs in one specific channel and/or make a udef channel flag to enable announces. i don't want script will announce in all channels. i want that will announce only in 1 channel or in some channels the bot is in. it should not repeat the output if it's working in one channel but user joins more than one common channels with the bot. and another fork is it doesn't trim the message lenghts on max char limits. for example, if max char as 250 per msg, it doesn't care this. continues till the end of line and ends up at there. it should trim and continue from the second line. it would be fine if there will be !forget nick function to delete a nick on the txt too. and only allowed persons would use this !forget function. i hope, it's not much <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Plus that the post channel should be able to set different than the monitored channel. simply, it will monitor in all bot channels but announce will be for example in specified channel only (it will no repeat the output if user will join more than one bot channels in that case, it will give 1 output if so). or if we set the announces for more than one channel, it will work in this same way too. saves from all monitored channels but announce will be in flagged channel(s) only.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11957">kingkong</a> — Sun Mar 03, 2013 2:36 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2012-07-05T06:55:52-04:00</updated>

		<published>2012-07-05T06:55:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99672#p99672</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99672#p99672"/>
		<title type="html"><![CDATA[[SOLVED] Nickname/Uhost tracker script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99672#p99672"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code># Nickname/Uhost tracker script# Egghelp version, donations to slennox are welcomed. :P# should duplicate nicknames be allowed?# 0 = no, 1 and above = yesset dupes 0#your filenameset filename "nicklist.txt"bind nick - * nick_nickchangebind join - * join_onjoin# make sure the file exists before we go to read it# this initializes the file if it doesn't already exist# and makes it blank to start with.if {![file exists $filename]} {   set file [open $filename "w"]   close $file}# check for nick changesproc nick_nickchange {nick uhost hand chan newnick} {   join_onjoin $newnick $uhost $hand $chan}# check for joinsproc join_onjoin {nick uhost hand chan} {   global filename dupes   # keep everything lowercase for simplicity.   set nick [string tolower $nick]   set uhost [string tolower $uhost]   # read the file   set file [open $filename "r"]   set text [split [read $file] \n]   close $file   # locate a duplicate host   set found [lsearch -glob $text "*&lt;$uhost"]   if {$found &lt; 0} {      # host isn't found so let's append the nick and host to our file      set file [open $filename "a"]      puts $file "$nick&lt;$uhost"      close $file   } else {      # the host exists, so set our list of nicks for that host      set nicks [lindex [split [lindex $text $found] "&lt;"] 0]      # is the nick already known for that host?      set nlist [split $nicks ","]      if {[set pos [lsearch $nlist $nick]] != -1} { set nlist [lreplace $nlist $pos $pos] }      # MAKE SURE TO READ THE COMMENTS BELOW      # To make it output to channel remove the # the begins the line below.      #if {[string length [join $nlist]]} { putserv "privmsg $chan :$nick is also known as :[join $nlist ", "]." }      # To make it output to partyline remove the # the begins the line below.      #if {[string length [join $nlist]]} { putloglev d * "*** $nick on $chan is also known as :[join $nlist ", "]." }      set known [lsearch -exact [split $nicks ","] $nick]      if {($known != -1) &amp;&amp; ($dupes &lt; 1)} {         # if the nick is known return         return      } else {         # otherwise add the nick to the nicks for that host         set text [lreplace $text $found $found "$nicks,$nick&lt;$uhost"]      }      # now lets write the new list to the file      set file [open $filename "w"]      foreach line $text {         if {[string length $line]} { puts $file "$line" }      }      close $file   }}putlog "Nickname/Uhost tracker enabled."</code></pre></div>Thanks for the compliments... <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>Try the script above. It should announce the alternate nicknames used, on join and nick changes. I haven't tested it but I see no reason why it wouldn't work.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Thu Jul 05, 2012 6:55 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[manipulativeJack]]></name></author>
		<updated>2012-07-05T01:10:28-04:00</updated>

		<published>2012-07-05T01:10:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99671#p99671</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99671#p99671"/>
		<title type="html"><![CDATA[[SOLVED] Nickname/Uhost tracker script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99671#p99671"><![CDATA[
Let me first say how much I really appreciate the work that you do here for all of us. I can not speak for others but looking at the hundreds of comments I know others really appreciate your work as well. I myself use one or another of your scripts nearly every day.<br><br>That said... <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><br><br>[04:06:24] Tcl error [nick_nickchange]: wrong # args: should be "set varName ?newValue?"<br>[04:06:30] Tcl error [nick_nickchange]: wrong # args: should be "lreplace list first last ?element element ...?"<br><br>has been popping up upon nick changes and nothing at all happens on join<br><br>edit: This happens on join in the bot logs (still nothing in channel):<br>[04:19:57] Tcl error [join_onjoin]: wrong # args: should be "lreplace list first last ?element element ...?"<br><br>The script also seems to only be showing one of the many possible nicks someone has used ... starting to wonder if I pasted/edited something wrong, though I have checked multiple times!<br><br>I by no means expect you to just jump up and fix this but I do wonder what is going on. I have been poking at it myself but am just making it worse. I have been looking over some tcl learning sources as I would really love to be able to give back to the community in the way you have.<br><br>That said again, any ideas? <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>(I also noticed that the nick case is not saved or relayed, is that a major change or just a little tweak?)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10503">manipulativeJack</a> — Thu Jul 05, 2012 1:10 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2012-07-03T22:45:18-04:00</updated>

		<published>2012-07-03T22:45:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99664#p99664</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99664#p99664"/>
		<title type="html"><![CDATA[[SOLVED] Nickname/Uhost tracker script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99664#p99664"><![CDATA[
<blockquote class="uncited"><div>Been trying for hours now and I am unable to determine a way to use this to display nicks in channel (or pm, or dcc) ...I would like something like this:<br><br>!nicks joe<br><br>&lt;bot&gt; joe has also been joe1, joe2 and sam32<br><br>or maybe something on the partyline when someone joins a channel?<br><br>joe has joined #channel<br>&lt;bot partyline&gt; joe has joined #channel - joe has also been joe1,joe2<br><br>...anyone willing to help?</div></blockquote><div class="codebox"><p>Code: </p><pre><code># is the nick already known for that host?set known [lsearch -exact [split $nicks ","] $nick]</code></pre></div>Change that part above to look like it is.. below<div class="codebox"><p>Code: </p><pre><code># is the nick already known for that host?set nlist [split $nicks ","]if {[set pos [lsearch $nlist $nick]] != -1} { set nlist [lreplace $nlist $pos $pos] }putserv "privmsg $chan :$nick is also known as :[join $nlist ", "]."set known [lsearch -exact [split $nicks ","] $nick]</code></pre></div>That should announce in channel. To do it thru partyline would require an idx channel, or you can putlog it if your console is +d for debug. Change the putserv to putlog and remove the privmsg $chan : part.<br><br>I enjoy retouching scripts I made long ago giving them new breath of life.. haw<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Tue Jul 03, 2012 10:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[manipulativeJack]]></name></author>
		<updated>2012-07-03T19:06:37-04:00</updated>

		<published>2012-07-03T19:06:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99663#p99663</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99663#p99663"/>
		<title type="html"><![CDATA[[SOLVED] Nickname/Uhost tracker script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99663#p99663"><![CDATA[
Been trying for hours now and I am unable to determine a way to use this to display nicks in channel (or pm, or dcc) ...I would like something like this:<br><br>!nicks joe<br><br>&lt;bot&gt; joe has also been joe1, joe2 and sam32<br><br>or maybe something on the partyline when someone joins a channel?<br><br>joe has joined #channel<br>&lt;bot partyline&gt; joe has joined #channel - joe has also been joe1,joe2<br><br>...anyone willing to help?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10503">manipulativeJack</a> — Tue Jul 03, 2012 7:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ipone]]></name></author>
		<updated>2009-01-10T11:24:43-04:00</updated>

		<published>2009-01-10T11:24:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86832#p86832</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86832#p86832"/>
		<title type="html"><![CDATA[[SOLVED] Nickname/Uhost tracker script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86832#p86832"><![CDATA[
Well now it works! and i really love it! cannot thank you enough!<br><br>Can mark it as [SOLVED] <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br><br>edit: and i renamed it.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7525">ipone</a> — Sat Jan 10, 2009 11:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2009-01-10T11:16:20-04:00</updated>

		<published>2009-01-10T11:16:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86831#p86831</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86831#p86831"/>
		<title type="html"><![CDATA[[SOLVED] Nickname/Uhost tracker script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86831#p86831"><![CDATA[
<blockquote class="uncited"><div>But sadly its still duplicating the nicks, But there are not any blank lines, that one works now. So just one problem left and thats the duplicate.</div></blockquote>Try the edited script above. Had a slight bug with lindex positions.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Sat Jan 10, 2009 11:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ipone]]></name></author>
		<updated>2009-01-10T11:03:47-04:00</updated>

		<published>2009-01-10T11:03:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86830#p86830</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86830#p86830"/>
		<title type="html"><![CDATA[[SOLVED] Nickname/Uhost tracker script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86830#p86830"><![CDATA[
Really loves your fast answers. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> <br><br>But sadly its still duplicating the nicks, But there are not any blank lines, that one works now. So just one problem left and thats the duplicate.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7525">ipone</a> — Sat Jan 10, 2009 11:03 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2009-01-10T11:15:05-04:00</updated>

		<published>2009-01-10T10:19:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86828#p86828</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86828#p86828"/>
		<title type="html"><![CDATA[[SOLVED] Nickname/Uhost tracker script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86828#p86828"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code># Nickname/Uhost tracker script# Egghelp version, donations to slennox are welcomed. :P# should duplicate nicknames be allowed?# 0 = no, 1 and above = yesset dupes 0#your filenameset filename "nicklist.txt"bind nick - * nick_nickchangebind join - * join_onjoin# make sure the file exists before we go to read it# this initializes the file if it doesn't already exist# and makes it blank to start with.if {![file exists $filename]} {   set file [open $filename "w"]   close $file}# check for nick changesproc nick_nickchange {nick uhost hand chan newnick} {   join_onjoin $newnick $uhost $hand $chan}# check for joinsproc join_onjoin {nick uhost hand chan} {   global filename dupes   # keep everything lowercase for simplicity.   set nick [string tolower $nick]   set uhost [string tolower $uhost]   # read the file   set file [open $filename "r"]   set text [split [read $file] \n]   close $file   # locate a duplicate host   set found [lsearch -glob $text "*&lt;$uhost"]   if {$found &lt; 0} {      # host isn't found so let's append the nick and host to our file      set file [open $filename "a"]      puts $file "$nick&lt;$uhost"      close $file   } else {      # the host exists, so set our list of nicks for that host      set nicks [lindex [split [lindex $text $found] "&lt;"] 0]      # is the nick already known for that host?      set known [lsearch -exact [split $nicks ","] $nick]      if {[expr {($known != -1) &amp;&amp; ($dupes &lt; 1)}]} {         # if the nick is known return         return      } else {         # otherwise add the nick to the nicks for that host         set text [lreplace $text $found $found "$nicks,$nick&lt;$uhost"]      }      # now lets write the new list to the file      set file [open $filename "w"]      foreach line $text {         if {[string length $line]} { puts $file "$line" }      }      close $file   }}putlog "Nickname/Uhost tracker enabled."</code></pre></div>For dupes I had it backwards my bad. It will now work correctly. Also added detection for blank lines when rewriting the file. This should strip blank lines out when rewriting. Try the script above let me know how that works. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Edit: Corrected duplicate nick issue, hopefully.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Sat Jan 10, 2009 10:19 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ipone]]></name></author>
		<updated>2009-01-10T03:25:56-04:00</updated>

		<published>2009-01-10T03:25:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86823#p86823</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86823#p86823"/>
		<title type="html"><![CDATA[[SOLVED] Nickname/Uhost tracker script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86823#p86823"><![CDATA[
now i feel like a pain in the ass, <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> but it still dosent work, updated with the script you edited. and det txt still looks like this.<br><br><br>Heres a part of the txt file, just so you know how it looks for me. Note for example the user 'nibbb' has the same nick three times on the same line. That user join/parted the channel.<blockquote class="uncited"><div>mrlolrofl,nizzleeee&lt;~user@77.21.226.112<br>nibbb,nibbb,nibbb&lt;~danielsen@84.53.42.196<br><br>psykos-&lt;~<a href="mailto:fack71@c83-252-252-215.bredband.comhem.se">fack71@c83-252-252-215.bredband.comhem.se</a><br>winc123,winc,winc123,winc&lt;~<a href="mailto:fcdwsv@cpc2-pete1-0-0-cust845.pete.cable.ntl.com">fcdwsv@cpc2-pete1-0-0-cust845.pete.cable.ntl.com</a><br><br>dmitri&lt;~<a href="mailto:for@hst-155-42.telelanas.lt">for@hst-155-42.telelanas.lt</a><br><br><br><br>mlvs,mlvs,mlvs&lt;~<a href="mailto:lsybrandt@084202108242.customer.alfanett.no">lsybrandt@084202108242.customer.alfanett.no</a><br>haydenn&lt;<a href="mailto:shader__@cable-vlk-fef6f900-119.dhcp.inet.fi">shader__@cable-vlk-fef6f900-119.dhcp.inet.fi</a><br><br>dartik&lt;<a href="mailto:dart@taisya.adsl.kis.ru">dart@taisya.adsl.kis.ru</a><br><strong class="text-strong">man1339&lt;~<a href="mailto:bjorkman_@h178n1c1o1038.bredband.skanova.com">bjorkman_@h178n1c1o1038.bredband.skanova.com</a><br>fischaaaa&lt;~<a href="mailto:suosdouf@81-233-122-169-no79.tbcn.telia.com">suosdouf@81-233-122-169-no79.tbcn.telia.com</a><br>cajan^pea&lt;~<a href="mailto:next17@cpc2-pete1-0-0-cust845.pete.cable.ntl.com">next17@cpc2-pete1-0-0-cust845.pete.cable.ntl.com</a><br>gp|extreme&lt;~<a href="mailto:seekandde@d54c69a80.access.telenet.be">seekandde@d54c69a80.access.telenet.be</a><br><br>asknakd&lt;~<a href="mailto:kakd@78-69-59-136-no153.tbcn.telia.com">kakd@78-69-59-136-no153.tbcn.telia.com</a><br><br>digydigy1d,cocoricco,ayouhou&lt;nila@86.123.210.234<br><br><br><br><br>replaayy&lt;<a href="mailto:replaayy@c-40bce255.09-295-6c756c10.cust.bredbandsbolaget.se">replaayy@c-40bce255.09-295-6c756c10.cust.bredbandsbolaget.se</a><br>medved&lt;~<a href="mailto:medvedjke@79-126-51-134.dynamic.mts-nn.ru">medvedjke@79-126-51-134.dynamic.mts-nn.ru</a><br>dare&lt;~<a href="mailto:krille_al@90-230-131-62-no130.tbcn.telia.com">krille_al@90-230-131-62-no130.tbcn.telia.com</a><br>[old]spenan&lt;<a href="mailto:spenan@pc193.net114.koping.net">spenan@pc193.net114.koping.net</a><br>fafa&lt;~<a href="mailto:bollon252@90-231-213-39-no124.tbcn.telia.com">bollon252@90-231-213-39-no124.tbcn.telia.com</a><br>himkhjell[cb]&lt;<a href="mailto:1839messo@cpc1-flit2-0-0-cust146.lutn.cable.ntl.com">1839messo@cpc1-flit2-0-0-cust146.lutn.cable.ntl.com</a><br>zlaktarn^&lt;~zlaktarn^@c-808be155.329-1-64736c12.cust.bredbandsbolaget.se<br>sniper87&lt;<a href="mailto:sniper@sniper87.users.quakenet.org">sniper@sniper87.users.quakenet.org</a><br>vessia|jozzika&lt;~<a href="mailto:niko_holl@ccbb9bf51.dhcp.bluecom.no">niko_holl@ccbb9bf51.dhcp.bluecom.no</a><br>fixnix^&lt;~<a href="mailto:christerc@ti0011a380-dhcp1050.bb.online.no">christerc@ti0011a380-dhcp1050.bb.online.no</a><br>outrage&lt;~outrage3@77.125.161.39<br><br>henken,henken&lt;<a href="mailto:jonte_____@c-44-178-255-94.3.cust.bredband2.com">jonte_____@c-44-178-255-94.3.cust.bredband2.com</a><br>ailton&lt;<a href="mailto:tapav@184-18-124-91.pool.ukrtel.net">tapav@184-18-124-91.pool.ukrtel.net</a><br>gamerteam&lt;~mandrut_j@79.118.146.195</strong><br></div></blockquote><strong class="text-strong"><br><br><br>Ive tryed to set dupes to 0 but it still will duplicate nicks :S <br>im really confused at this moment.<br><br>I dont know if this have anything to do with the problem, but the channel that the bot is in, have alot of traffic. its like on 5min there are like 15 new users in the channel, then 5mins after that theres 15-20 new users<br><br>And how the script is, that is exactly what i have been looking for, exept that the database works. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><br>Cheers!</strong><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7525">ipone</a> — Sat Jan 10, 2009 3:25 am</p><hr />
]]></content>
	</entry>
	</feed>
