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

	<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>2006-03-12T08:41:51-04:00</updated>

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

		<entry>
		<author><name><![CDATA[MMDollar]]></name></author>
		<updated>2006-03-12T08:41:51-04:00</updated>

		<published>2006-03-12T08:41:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=61004#p61004</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=61004#p61004"/>
		<title type="html"><![CDATA[Problem with ison.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=61004#p61004"><![CDATA[
Can someone help me with ison.tcl because it says who is online in the channel but the users who arent in the channel the eggdrop don't invite them.<br>here is the tcl:<div class="codebox"><p>Code: </p><pre><code>## File, where the list of the !ison-ed users are stored.set filename "nlist.txt"# Channel to whom the stuff goes.set nchan "#channel"# File exits ? if no then created!if {![file exists $filename]} {    set fh [open $filename w]    puts -nonewline $fh ""    close $fh}## Don't change anything below, unless you know what you are doing!# glob varsset tell "notell"set online ""### raw 303 (ISON)bind raw - 303 online:raw### raw 325 (NS Id)bind raw - 325 whois:identedproc whois:idented {* 325 arg} {global nchan  putserv "INVITE [lindex $arg 1] $nchan"}## ison is triggeredproc online:raw {* 303 arg} {  global online nchan tell  set nlist [getinfo]  string tolower $nlist  set arg [string trimleft [lrange $arg 1 end] ":"]  set arg [charfilter $arg]  if {$arg == ""} {set online1 $online    if {$tell == "tell"} {      puthelp "PRIVMSG $nchan :Noone's online."      set tell "notell"    }unset onlineset online [qonreport 1 $arg $online1]set quitted [qonreport 0 $online1 $online]set quitted [charfilter $quitted]set quitted [removespaces $quitted]if {$quitted == ""} {  return}    putserv "PRIVMSG $nchan: $quitted offline."    set online ""  } else {  if {$tell == "tell"} {  set arg [removespaces $arg]  set onchan [onlineon $arg]  set tell "notell"  set online $arg      puthelp "PRIVMSG $nchan :Online: $arg"      puthelp "PRIVMSG $nchan :Online total [llength $arg] of [llength $nlist]."      puthelp "PRIVMSG $nchan :On $nchan: [llength $onchan] of [llength $arg] online."  return}if {$online == ""} {  set arg [removespaces $arg]  set onchan [onlineon $arg]      set online $arg      puthelp "PRIVMSG $nchan :Online: $arg"      puthelp "PRIVMSG $nchan :Online total [llength $arg] of [llength $nlist]."      puthelp "PRIVMSG $nchan :On $nchan: [llength $onchan] of [llength $arg] online."      return}set foo [qonreport 0 $arg $online]if {$foo != ""} {  set foo [charfilter $foo]  set foo [removespaces $foo]  set onchan [onlineon $arg]      append online " $foo"      puthelp "PRIVMSG $nchan :Online: $foo"      puthelp "PRIVMSG $nchan :Online total [llength $arg] of [llength $nlist]."      puthelp "PRIVMSG $nchan :On $nchan: [llength $onchan] of [llength $arg] online."}set online1 $onlineunset onlineset online [qonreport 1 $arg $online1]set quitted [qonreport 0 $online1 $online]set quitted [charfilter $quitted]set quitted [removespaces $quitted]if {$quitted == ""} {  return}    putserv "PRIVMSG $nchan :$quitted offline."  }}### !isonbind pub n !ison ison:pubproc ison:pub {nick host hand chan arg} {  global nchan tell  if {[string tolower $chan] != [string tolower $nchan]} {return  }  set tell "tell"  set nlist "[getinfo]"  putserv "ISON :$nlist"}### !addison &lt;nickname(s)&gt;bind pub n !addison ison:addisonproc ison:addison {nick host hand chan arg} {  global nchan  if {[string tolower $chan] != [string tolower $nchan]} {return  }  if {[lindex $arg 0] == ""} {putserv "PRIVMSG $chan :$nick: Usage !addison &lt;nickname(s)&gt;"return  }  set nlist [getinfo]  set dontsay [dupZZ $nlist $arg 0]  if {$dontsay == ""} {set count [expr [llength $arg] + [llength $nlist]]set arg [charfilter $arg]set arg [removespaces $arg]putserv "PRIVMSG $chan :$nick: Done. Successfully added $arg. Total ($count)."writetof "$nlist $arg"set tell "tell"    putserv "ISON :$nlist"  } else {set dontsay [removespaces $dontsay]set dontsay [charfilter $dontsay]putserv "PRIVMSG $chan :There is a duplicate :$dontsay"set nlist [getinfo]        set list ""        foreach bla $arg {        if {[lsearch $list $bla] == -1} {          lappend list $bla            }        }        set final [$nlist $list 1]if {$final != ""} {  set count [expr [llength $final] + [llength $nlist]]  set final [removespaces $final]  set final [charfilter $final]  putserv "PRIVMSG $chan :$nick: Done. Successfully added $final. Total ($count)."}writetof "$nlist $final"    putserv "ISON :$nlist $final"set tell "tell"  }}## !delison &lt;nickname&gt;bind pub n !delison del_in_fdproc del_in_fd {nick uhost hand chan arg} {  global nchan  if {[string tolower $chan] != [string tolower $nchan]} {return  }  if {[llength $arg] != 1} {    puthelp "NOTICE $nick :Usage: !delison &lt;nickname|phone number&gt;"    return 0  }  set nicknames [getinfo]    set who [lindex $arg 0]  set who [charfilter $who]    if {[lsearch -exact $nicknames [lindex $arg 0]] == -1} {puthelp "NOTICE $nick :Nickname $who not found in the database!"return 0  }  regsub -all "\\\m$who\\\M" $nicknames "" nicknames  regsub -all {\s+} $nicknames { } nicknames  writetof $nicknames  puthelp "NOTICE $nick :Nickname $who erased from the database!"}## !list [nickname]bind pub n !list list_out_of_fdproc list_out_of_fd {nick uhost hand chan arg} {  global nchan  if {[string tolower $chan] != [string tolower $nchan]} {return  }  if {[llength $arg] == 0} {set nicknames [getinfo]set nicknames [charfilter $nicknames]set nicknames [removespaces $nicknames]if {$nicknames == ""} {  puthelp "NOTICE $nick :No one is added in the database!"} else {  puthelp "NOTICE $nick :Added in the database: $nicknames"}  } elseif {[llength $arg] == 1} {set nicknames [getinfo]set nicknames [string tolower $nicknames]if {[lsearch -exact $nicknames [lindex $arg 0]] == -1} {  puthelp "NOTICE $nick :[charfilter [lindex $arg 0]] not found in the database!"} else {  puthelp "NOTICE $nick :[charfilter [lindex $arg 0]] is in the database!"}  } else {puthelp "NOTICE $nick :Usage: !list \[nickname\]"  }}## The procproc notify {} {  set nlist [getinfo]  putserv "ISON :$nlist"  if {![string match *notify* [utimers]]} { utimer 30 notify }}proc charfilter {x {y ""} } {  for {set i 0} {$i &lt; [string length $x]} {incr i} {    switch -- [string index $x $i] {      "\"" {append y "\\\""}      "\\" {append y "\\\\"}      "\[" {append y "\\\["}      "\]" {append y "\\\]"}      "\}" {append y "\\\}"}      "\{" {append y "\\\{"}      default {append y [string index $x $i]}    }  }  return $y}proc getinfo {} {  global filename  set file [open $filename r]  set nlist ""  while {![eof $file]} {set chast [gets $file]    if {$chast != ""} {  append nlist $chast}  }  close $file  return $nlist}proc removespaces {arg} {  regsub {^\s+} $arg "" arg  return $arg}proc onlineon {arg} {  global nchan  set onchan ""  foreach tempchar $arg {    if {![onchan $tempchar $nchan]} {#      putserv "INVITE $tempchar $nchan"      putserv "WHOIS $tempchar"    } else {      append onchan " $tempchar"    }  }  return $onchan}proc qonreport {how arg online} {  set aq 0  set foo ""  foreach el $arg {    foreach el1 $online {  if {$el == $el1} {    set aq 1  }    }    if {$aq == $how} {  append foo " $el"}    set aq 0  }  return $foo}proc writetof {what} {  global filename  set fh [open $filename w]  puts $fh $what  close $fh}proc dupZZ {where what how} {  set dontsay ""  foreach el1 $what {if {[lsearch -exact $where $el1] != -1} {  if {$how == 0} {  append dontsay " $el1"  }    } else {  if {$how == 1} {append dontsay " $el1"  }}  }  return $dontsay}if {![string match *notify* [utimers]]} { utimer 30 notify }putlog "ISON TCL by IRCHelp.UniBG.Net+LHG Crew ++/++ Counter by V1p3r#TCL Loaded !!!"</code></pre></div>I just want the bot to invite the people i add that is all for more info my server ircd version is ratbox<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7449">MMDollar</a> — Sun Mar 12, 2006 8:41 am</p><hr />
]]></content>
	</entry>
	</feed>
