<?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/9381" />

	<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>2005-04-13T11:05:01-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Thunderdome]]></name></author>
		<updated>2005-04-13T11:05:01-04:00</updated>

		<published>2005-04-13T11:05:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48102#p48102</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48102#p48102"/>
		<title type="html"><![CDATA[Make Join count for ALL users]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48102#p48102"><![CDATA[
maybe it would be better to post the whole code changed, all the changes I try to do won't work... :\<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6079">Thunderdome</a> — Wed Apr 13, 2005 11:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Thunderdome]]></name></author>
		<updated>2005-04-11T12:29:29-04:00</updated>

		<published>2005-04-11T12:29:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48013#p48013</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48013#p48013"/>
		<title type="html"><![CDATA[Make Join count for ALL users]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48013#p48013"><![CDATA[
I did it, but now nothing appears, not even the regular stuff... <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_neutral.gif" width="15" height="15" alt=":|" title="Neutral"><br>I want to appear for everyuser the last time he was i nthe channel and number of joins... get my point? :\<br>Am I doing somehting wrong?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6079">Thunderdome</a> — Mon Apr 11, 2005 12:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[greenbear]]></name></author>
		<updated>2005-04-11T12:04:43-04:00</updated>

		<published>2005-04-11T12:04:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48012#p48012</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48012#p48012"/>
		<title type="html"><![CDATA[Make Join count for ALL users]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48012#p48012"><![CDATA[
remove it, along with the ending brace (all the way down, almost at the end of the proc)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=24">greenbear</a> — Mon Apr 11, 2005 12:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Thunderdome]]></name></author>
		<updated>2005-04-11T11:19:08-04:00</updated>

		<published>2005-04-11T11:19:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48010#p48010</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48010#p48010"/>
		<title type="html"><![CDATA[Make Join count for ALL users]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48010#p48010"><![CDATA[
hello! Not quite sure, I've noticed the line before posting the script, but I dunno how to change it.... I don't know much tcl I am afraid...<br>What shall I do exactly?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6079">Thunderdome</a> — Mon Apr 11, 2005 11:19 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[YooHoo]]></name></author>
		<updated>2005-04-11T08:04:08-04:00</updated>

		<published>2005-04-11T08:04:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48002#p48002</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48002#p48002"/>
		<title type="html"><![CDATA[Make Join count for ALL users]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48002#p48002"><![CDATA[
i believe this is the line of code that you seek:<div class="codebox"><p>Code: </p><pre><code> if {[validuser $hand] == 1} { </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2706">YooHoo</a> — Mon Apr 11, 2005 8:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Thunderdome]]></name></author>
		<updated>2005-04-10T22:47:06-04:00</updated>

		<published>2005-04-10T22:47:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=47978#p47978</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=47978#p47978"/>
		<title type="html"><![CDATA[Make Join count for ALL users]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=47978#p47978"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code># Join counter by Turbo-# Version 2.4# DCC Commands:# .+join &lt;number&gt; - (Owner) To increase the amount of joins.# .-join &lt;number&gt; - (Owner) To decrease the amount of joins.# .joins [nick] - (Friends) To see the current count. And see counts of others# .countnotice &lt;on/off&gt; - (Masters) To turn the on-join notice on/off.# Pub Commands:# !joins [nick] - (Friends) To see the current count. And see counts of others# EMail milesp@connect.ab.ca, and tell me some bugs or fixes.  hell, send# comments if ya want. you can find me in #Consortium on EFNet too by the# way...my bot is proof this script works :P### Fixed from 1.0:# -Everything got fixed!  Nothing worked!### Fixed from 1.1:# -The conformation didnt work quite right### Fixed from 1.2:# -.+join and .-join are fixed# -Only notices you if you join the channel specified in countchan### Fixed from 1.3:# -That annoying can't find 'startcountdate' error### Changed from 1.4:# -The conformation looks nicer### Added from 1.5:# -Now counts how many times each user has joined# -Its still only, a single channel TCL =(### Fixed from 2.0:# -It used to add 2 joins for the first join, its fixed now### Added from 2.1:# -You can use !joins, and .joins to view others join stats# -The conformation said that version 2.1 was 2.0, its fixed now### Added from 2.2:# -You can use the .+join and .-join to change certain users stats### Fixed from 2.3:# -The user-get and user-set and all that stuff is fixed# As far as I've tested, this script works for eggdrop1.0x, eggdrop1.1.x,# eggdrop1.2.x, and eggdrop1.3.x, I have recently updated it it and made# v2.4, it works with 1.3.x now, I tested it on a bot owned by george11,# thanx man.#### VARIABLES, GO AHEAD, CHANGE EM, BUT READ THE QUOTES ABOVE THEM #### # Your eggdrop's main version.  If your bot is 1.1.5, the ver is 1.1# 1.1.x is 1.1 --- 1.2.x is 1.2 --- 1.3.x is 1.3set eggver "1.3"# File to save the join number tooset what_file "joins.dat"# If you change 'what_file', make sure that filename is the same in start_var is the same!set start_var "[open joins.dat r]"# Wether or not to send a notice with the current count to the person joiningset donotice "on"# Date you start this scriptset startcountdate "April 11th 2004"# The channel this bot rests on, damn TCL, only one channel tho # (NO CAPITALS)set countchan "#thunderdome"###### BINDS ## DONT TOUCH ######bind dcc n -join take_joinsbind dcc n +join add_joinsbind dcc f joins how_manybind join - "*" counterjbind pub f !joins pub_manybind dcc m countnotice on_off_notice######## ACTUAL SCRIPT! DONT CHANGE! ######### If you eggdrop1.2 or 1.3, you probably dont have user-getif {[lsearch -exact [strlwr [info commands]] [strlwr user-get]] == -1} {proc user-get {handle key} {  set xtra [getxtra $handle]  for {set i 0} {$i &lt; [llength $xtra]} {incr i} {    set this [lindex $xtra $i]    if {[string compare [lindex $this 0] $key] == 0} {      return [lindex $this 1]    }  }  return ""   }}# If you are eggdrop1.2 or 1.3, you probably dont have user-set eitherif {[lsearch -exact [strlwr [info commands]] [strlwr user-set]] == -1} {proc user-set {handle key data} {  set xtra [getxtra $handle]  # is key already there?  for {set i 0} {$i &lt; [llength $xtra]} {incr i} {    set this [lindex $xtra $i]    if {[string compare [lindex $this 0] $key] == 0} {      set this [list $key $data]      setxtra $handle [lreplace $xtra $i $i $this]      return     }  }  lappend xtra [list $key $data]  setxtra $handle $xtra}}# If the join file doesnt exist, make oneif {![file exists $what_file]} {    set WhatFile [open $what_file w]    puts $WhatFile "1"    close $WhatFile}# The join section for counting joinsproc counterj {nick uhost hand chan} {global what_file donotice startcountdate countchan monthj eggver    # Change the main file    set joinedchan "[string tolower $chan]"    if {$countchan != $joinedchan} {      return 0    }    set WhatFile "[open $what_file r]"    while {![eof $WhatFile]} {set joinsnum "[gets $WhatFile]"    close $WhatFile    set WhatFile "[open $what_file w]"    puts $WhatFile "[expr $joinsnum + 1]"    close $WhatFile    set WhatFile "[open $what_file r]"    while {![eof $WhatFile]} {set joinsnum "[gets $WhatFile]"    close $WhatFile    # Single user statistics    if {[validuser $hand] == 1} {     if {$eggver == "1.1" || $eggver == "1.2"} {      if {[user-get $hand joins] == ""} {        user-set $hand joins 0      }}     if {$eggver == "1.3" } {      if {[getuser $hand xtra joins] == ""} {        setuser $hand xtra joins 0      }}     }      if {$eggver == "1.1" || $eggver == "1.2"} {        if {[user-get $hand date] == ""} {        # I'm a perfectionist :P  Gotta get that damn date right! =)        set joindate "[date]"        set datej "[lindex $joindate 0]"        set monthj "[lindex $joindate 1]"        set yearj "[lindex $joindate 2]"        if {$monthj=="Jan"} { set monthj "January" }        if {$monthj=="Feb"} { set monthj "February" }        if {$monthj=="Mar"} { set monthj "March" }        if {$monthj=="Apr"} { set monthj "April" }        if {$monthj=="May"} { set monthj "May" }        if {$monthj=="Jun"} { set monthj "June" }        if {$monthj=="Jul"} { set monthj "July" }        if {$monthj=="Aug"} { set monthj "August" }        if {$monthj=="Sep" || $monthj=="Sept"} { set monthj "September" }        if {$monthj=="Oct"} { set monthj "October" }        if {$monthj=="Nov"} { set monthj "November" }        if {$monthj=="Dec"} { set monthj "December" }        set jdate "$monthj $datej $yearj"        }        if {$eggver == "1.3"} {        if {[getuser $hand xtra date] == ""} {        # I'm a perfectionist :P  Gotta get that damn date right! =)        set joindate "[date]"        set datej "[lindex $joindate 0]"        set monthj "[lindex $joindate 1]"        set yearj "[lindex $joindate 2]"        if {$monthj=="Jan"} { set monthj "January" }        if {$monthj=="Feb"} { set monthj "February" }        if {$monthj=="Mar"} { set monthj "March" }        if {$monthj=="Apr"} { set monthj "April" }        if {$monthj=="May"} { set monthj "May" }        if {$monthj=="Jun"} { set monthj "June" }        if {$monthj=="Jul"} { set monthj "July" }        if {$monthj=="Aug"} { set monthj "August" }        if {$monthj=="Sep" || $monthj=="Sept"} { set monthj "September" }        if {$monthj=="Oct"} { set monthj "October" }        if {$monthj=="Nov"} { set monthj "November" }        if {$monthj=="Dec"} { set monthj "December" }        }        if {$eggver == "1.1" || $eggver == "1.2"} {          user-set $hand date $jdate        }        if {$eggver == "1.3"} {          setuser $hand xtra date $jdate               }      }      if {$eggver == "1.1" || $eggver == "1.2"} {      if {[user-get $hand date] != "" &amp;&amp; [user-get $hand joins] != ""} {        set pjoins [user-get $hand joins]        set njoins [expr $pjoins + 1]        user-set $hand joins $njoins        set newjoins [user-get $hand joins]        set ldate [user-get $hand date]        if {$donotice=="on"} {          putserv "NOTICE $nick :5(INFO): 4,5You are gabber number0,5 $joinsnum 4,5to join $chan since $startcountdate, and you've joined0,5 $newjoins 4,5times since $ldate"          return 0        }      }}      if {$eggver == "1.3"} {      if {[getuser $hand xtra date] != "" &amp;&amp; [getuser $hand xtra joins] != ""} {        set pjoins [getuser $hand xtra joins]        set njoins [expr $pjoins + 1]        setuser $hand xtra joins $njoins        set newjoins [getuser $hand xtra joins]        set ldate [getuser $hand xtra date]        if {$donotice=="on"} {          putserv "NOTICE $nick :5(INFO): 4,5You are gabber number0,5 $joinsnum 4,5to join $chan since $startcountdate, and you've joined0,5 $newjoins 4,5times since $ldate"          return 0        }      }}    }    # Non-user join    if {$donotice=="on"} {      putserv "NOTICE $nick :5(INFO): 4,5You are gabber number0,5 $joinsnum 4,5to join $chan since $startcountdate"      return 0    }    return 0  } }}# The dcc .joins command sectionproc how_many {hand idx arg} {global what_file countchan startcountdate eggverif {$arg==""} {putlog "#$hand# joins"set WhatFile [open $what_file r]    while {![eof $WhatFile]} {        set dccjoinsnum "[gets $WhatFile]"    close $WhatFileif {$eggver == "1.1" || $eggver == "1.2"} {set dccnewjoins [user-get $hand joins]set dccldate [user-get $hand date]}if {$eggver == "1.3"} {set dccnewjoins [getuser $hand xtra joins]set dccldate [getuser $hand xtra date]}putdcc $idx "There have been $dccjoinsnum joins in $countchan since $startcountdate, and you've joined $dccnewjoins times since $dccldate"return 0} }if {$arg != ""} {  if {[validuser $arg] == 0} {    putdcc $idx "$arg is an invalid username"    return 0  }  putlog "#$hand# joins $arg"  set WhatFile [open $what_file r]  while {![eof $WhatFile]} {    set dccjoinsnum "[gets $WhatFile]"  close $WhatFileif {$eggver == "1.1" || $eggver == "1.2"} {set dccnewjoins [user-get $arg joins]set dccldate [user-get $arg date]}if {$eggver == "1.3"} {set dccnewjoins [getuser $arg xtra joins]set dccldate [getuser $arg xtra date]}putdcc $idx "There have been $dccjoinsnum joins in $countchan since $startcountdate, and $arg has joined $dccnewjoins times since $dccldate"return 0} }}# The public !joins command sectionproc pub_many {nick uhost hand chan rest} {global what_file startcountdate countchan eggver    set joinedchan2 [string tolower $chan]    if {$countchan != $joinedchan2} {      return 0    }if {$rest == ""} {set WhatFile [open $what_file r]    while {![eof $WhatFile]} {        set pubjoinsnum "[gets $WhatFile]"    close $WhatFileif {$eggver == "1.1" || $eggver == "1.2"} {set pubnewjoins [user-get $hand joins]set publdate [user-get $hand date]}if {$eggver == "1.3"} {set pubnewjoins [getuser $hand xtra joins]set publdate [getuser $hand xtra date]}putserv "NOTICE $nick :There have been $pubjoinsnum joins in $chan since $startcountdate, and you've joined $pubnewjoins times since $publdate"putcmdlog "&lt;&lt;$nick&gt;&gt; !$hand! !joins"return 0} }if {$rest != ""} {if {[validuser $rest] == 0} {putserv "NOTICE $nick :$rest is an invalid username"return 0}set WhatFile [open $what_file r]    while {![eof $WhatFile]} {        set pubjoinsnum "[gets $WhatFile]"    close $WhatFileif {$eggver == "1.1" || $eggver == "1.2"} {set pubnewjoins [user-get $rest joins]set publdate [user-get $rest date]}if {$eggver == "1.3"} {set pubnewjoins [getuser $rest xtra joins]set publdate [getuser $rest xtra date]}putserv "NOTICE $nick :There have been $pubjoinsnum joins in $chan since $startcountdate, and $rest has joined $pubnewjoins times since $publdate"putcmdlog "&lt;&lt;$nick&gt;&gt; !$hand! !joins $rest"return 0} }}# Adds joins to total count, and other user statsproc add_joins {hand idx arg} {global what_file eggver    if {$arg==""} {      putdcc $idx "Usage: +join \[user\] &lt;# to add&gt;"      return 0    }    set a1 "[lindex $arg 0]"    set a2 "[lindex $arg 1]"    if {$a2 == ""} {    putlog "#$hand# +join"    if {$arg&lt;0 || $arg&gt;100} {      putdcc $idx "$arg is out of my range, sorry!"      return 0    }    set amntadd "$arg"    set WhatFile [open $what_file r]    while {![eof $WhatFile]} {        set addjoinsnum "[gets $WhatFile]"    close $WhatFile    putdcc $idx "Old total $addjoinsnum"    putdcc $idx "Adding $amntadd"    set WhatFile [open $what_file w]    puts $WhatFile [expr $addjoinsnum + $amntadd ]    close $WhatFile    set WhatFile [open $what_file r]    while {![eof $WhatFile]} {          set addjoinsnum "[gets $WhatFile]"    close $WhatFile       putdcc $idx "New total is $addjoinsnum"    return 0   }  } }    if {$a2 != ""} {      if {$a1 != ""} {        if {[validuser $a1] == 0} {        putdcc $idx "$a1 is an invalid username"        return 0      }      if {$a2&lt;0 || $a2&gt;100} {      putdcc $idx "$a2 is out of my range, sorry!"      return 0    }      putlog "#$hand# +join $a1"      if {$eggver == "1.1" || $eggver == "1.2"} {      set oldj "[user-get $a1 joins]"      putdcc $idx "Old total for $a1 $oldj"      putdcc $idx "Adding $a2 to $a1"      set newj "[expr $oldj + $a2]"      user-set $a1 joins $newj      set newj2 "[user-get $a1 joins]"      putdcc $idx "New total for $a1 is $newj2"      return 0      }      if {$eggver == "1.3"} {      set oldj "[getuser $a1 xtra joins]"      putdcc $idx "Old total for $a1 $oldj"      putdcc $idx "Adding $a2 to $a1"      set newj "[expr $oldj + $a2]"      setuser $a1 xtra joins $newj      set newj2 "[getuser $a1 xtra joins]"      putdcc $idx "New total for $a1 is $newj2"      return 0      }    }  }}# Removes joins from current count, and other users statsproc take_joins {hand idx arg} {global what_file eggver    if {$arg==""} {      putdcc $idx "Usage: -join \[user\] &lt;# to remove&gt;"      return 0    }    set a1 "[lindex $arg 0]"    set a2 "[lindex $arg 1]"    if {$a2 == ""} {    putlog "#$hand# -join"    if {$arg&lt;0 || $arg&gt;100} {      putdcc $idx "$arg is out of my range, sorry!"      return 0    }    set amnttake "$arg"    set WhatFile [open $what_file r]    while {![eof $WhatFile]} {        set takejoinsnum "[gets $WhatFile]"    close $WhatFile    putdcc $idx "Old total $takejoinsnum"    putdcc $idx "Taking $amnttake"    set WhatFile [open $what_file w]    puts $WhatFile [expr $takejoinsnum - $amnttake ]    close $WhatFile    set WhatFile [open $what_file r]    while {![eof $WhatFile]} {          set takejoinsnum "[gets $WhatFile]"    close $WhatFile       putdcc $idx "New total is $takejoinsnum"    return 0   }  } }     if {$a2 != ""} {      if {$a1 != ""} {        if {[validuser $a1] == 0} {        putdcc $idx "$a1 is an invalid username"        return 0      }      if {$a2&lt;0 || $a2&gt;100} {      putdcc $idx "$a2 is out of my range, sorry!"      return 0    }      putlog "#$hand# -join $a1"      if {$eggver == "1.1" || $eggver == "1.2"} {      set oldj "[user-get $a1 joins]"      putdcc $idx "Old total for $a1 $oldj"      putdcc $idx "Taking $a2 from $a1"      set newj "[expr $oldj - $a2]"      user-set $a1 joins $newj      set newj2 "[user-get $a1 joins]"      putdcc $idx "New total for $a1 is $newj2"      return 0      }      if {$eggver == "1.3"} {      set oldj "[getuser $a1 xtra joins]"      putdcc $idx "Old total for $a1 $oldj"      putdcc $idx "Taking $a2 from $a1"      set newj "[expr $oldj - $a2]"      setuser $a1 xtra joins $newj      set newj2 "[getuser $a1 xtra joins]"      putdcc $idx "New total for $a1 is $newj2"      return 0      }    }  } }# Turns the on-join notice on and offproc on_off_notice {hand idx arg} {global donotice eggverputlog "#$hand# countnotice"  if {$arg == ""} {    putdcc $idx "The on-join counter notice is currently $donotice"    return 0  }    set ansrep "[string tolower $arg]"    if {$ansrep=="on"} {      putdcc $idx "Now turning the on-join notice on"      set donotice "on"      return 0    }    if {$ansrep=="off"} {      putdcc $idx "Now turning the on-join notice off"      set donotice "off"      return 0    }    if {$ansrep != "on" &amp;&amp; $ansrep != "off"} {      putdcc $idx "Usage: .countnotice &lt;on/off&gt;"       return 0    }}# Your confirmation of this loading correctly.  set joinsnum2 "[gets $start_var]"  putlog "-----------Join Counter-----------"  putlog "Join Counter 2.4 by Turbo- loaded!"  putlog "Current count is $joinsnum2"  putlog "On-Join notice defaulted to $donotice"  putlog "Using Eggdrop v$eggver"  putlog "----------------------------------"##### EOF #####</code></pre></div>This script besises being a simple join counter, also says the number of times a specified user has joined a channel since a specified date....<br>But the script only does that for +users in the eggdrop. My channel is not that big, so I would like this script to count joins for all people that join my channel individually, no matter if they are +users or not.<br>How do I change the script to do this?<br>Must be simple, but I don't see how t do it...<br>Thanks and greetz  <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=6079">Thunderdome</a> — Sun Apr 10, 2005 10:47 pm</p><hr />
]]></content>
	</entry>
	</feed>
