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

	<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-12-04T12:59:33-04:00</updated>

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

		<entry>
		<author><name><![CDATA[SlaSerX]]></name></author>
		<updated>2013-12-04T12:59:33-04:00</updated>

		<published>2013-12-04T12:59:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=102269#p102269</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=102269#p102269"/>
		<title type="html"><![CDATA[tx]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=102269#p102269"><![CDATA[
thx it`s work<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12298">SlaSerX</a> — Wed Dec 04, 2013 12:59 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2013-12-02T20:50:18-04:00</updated>

		<published>2013-12-02T20:50:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=102268#p102268</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=102268#p102268"/>
		<title type="html"><![CDATA[litle help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=102268#p102268"><![CDATA[
Open your tcl script file for editing, and add this to the end of it.<br><br>Beware of line wraps.<br><br><br><div class="codebox"><p>Code: </p><pre><code># new bind herebind pub - "!addvhost" vhostadd_pub#new proc hereproc vhostadd_pub {nick uhost handle chan text} {          # arguments are: mask pass vhost          global vhostfile          set vhostadd_args [parsecline $text]          if { [regexp -nocase {^[a-z0-9\.\-\_\*\?\~]+@[a-z0-9\-\.\*\?]+} [lindex $vhostadd_args 0]] &amp;&amp;          [regexp -nocase {^[a-z0-9\-]+\.[a-z0-9\-\.]+$} [lindex $vhostadd_args 2]] &amp;&amp;          [string length [lindex $vhostadd_args 2]] &lt; 63 } {         regexp {([^.]*\.[^.]*[.]*)$} [lindex $vhostadd_args 2] #vhostadd_domain         if { [catch {set vhostadd_hoststatus [exec host $vhostadd_domain]}] || [regexp -nocase {\ not\ found} $vhostadd_hoststatus] } {             if { [catch {set vhostadd_vhostfile [open $vhostfile a]}] == 0 } {                 puts $vhostadd_vhostfile "#added by $handle TS[clock seconds]\nauth \{\n   user = \"[lindex $vhostadd_args 0]\";\n      spoof = \"[lindex $vhostadd_args 2]\";\n  password = \"[lindex $vhostadd_args 1]\";\n   flags = no_tilde, exceed_limit;\n    class = \"users\";\n\};\n"            close $vhostadd_vhostfile            putserv "REHASH"            ###putdcc $vhostadd_idx "Done."  putserv "privmsg $nick :Done."           } else {            filerrmsg $vhostfile concatenation           }            } else {             ###putdcc $vhostadd_idx "Resolver malfunction and/or domain $vhostadd_domain resolves!"             putserv "privmsg $nick :Resolver malfunction and/or domain $vhostadd_domain resolves!"            }        } else {         ###putdcc $vhostadd_idx "Invalid hostname(s) and/or sintax and/or vhost too long (max. 62 characters)\nUsage: addvhost ident@host password vhost"            putserv "privmsg $nick :Invalid hostname(s) and/or sintax and/or vhost too long (max. 62 characters)\nUsage: addvhost ident@host password vhost"        }         }</code></pre></div>All I did was copy the procedure, then change only the variables that are different from a bind dcc to a bind pub.<br><br>I have not tested this, nor can I.   Sorry.<br><br>If I missed something, perhaps someone else will contribute.<br><br>I hope this helps.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Mon Dec 02, 2013 8:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SlaSerX]]></name></author>
		<updated>2013-12-02T16:08:48-04:00</updated>

		<published>2013-12-02T16:08:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=102267#p102267</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=102267#p102267"/>
		<title type="html"><![CDATA[litle help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=102267#p102267"><![CDATA[
yeah i need that.. can u help me<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12298">SlaSerX</a> — Mon Dec 02, 2013 4:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2013-12-01T12:47:34-04:00</updated>

		<published>2013-12-01T12:47:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=102248#p102248</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=102248#p102248"/>
		<title type="html"><![CDATA[Re: litle help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=102248#p102248"><![CDATA[
<blockquote class="uncited"><div>Hi can u help me with this tcl i want to can use public cmd sample !vhost for add new host and any user can use. Thx<br>...</div></blockquote><br>Let's be sure of what you want.<br><br>As it is now, I see a partyline command:<br>.addvhost<br><br>Do you want a public command that does the same thing as that?<br>(whatever that is)<br><br><br>p.s.<br>I saw you on Freenode, but you left too soon.    <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=10420">willyw</a> — Sun Dec 01, 2013 12:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SlaSerX]]></name></author>
		<updated>2013-11-30T16:50:59-04:00</updated>

		<published>2013-11-30T16:50:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=102245#p102245</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=102245#p102245"/>
		<title type="html"><![CDATA[litle help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=102245#p102245"><![CDATA[
Hi can u help me with this tcl i want to can use public cmd sample !vhost for add new host and any user can use. Thx<div class="codebox"><p>Code: </p><pre><code># Warning! C-style comments (/* and */) in vhostfile might confuse this script# Za da go upravlqva i ima dostap user do komandata trqbva da ima flag +V # Usage: .dellvhost spoof/vhost example: .dellvhost test.com# Usage: .addvhost ident@host password vhost example: .addvhost # *ident@83.43.56.45 pass123 spoof.com# Location ot ircd's vhosts.conf - bot must be on the same shell, or have access to itset vhostfile "/home/ircd/docs/spoofs.conf"# Location of bot's vhost data file - it will be created on first runset vdbfile "/home/ircd/eggdrop/scripts/vhdb.dat"# Vhost database refresh period in minutesset vdbupdateinterval 60# Vhost expiry time in daysset vhostexptime 30# List of addresses (divided by spaces) to which vhost expiry alerts are mailedset vhostexpnotifyaddrlist "sAw@mIRC.bg"# List of vhosts (divided by spaces) exempt from reportingset vhostexplist ""# Bot's oper nick &amp; passwordset opernick "cloud"set operpass "smotan"# Bot's umodes, at least +cset opermodes "cs"### End of user specific settings ###set vhtrackver "VHTrack 1.5s"set vhostlist ""if { ![file exists $vhostfile] } { die "[file tail [info script]]: cannot locate $vhostfile" }proc vdbmain { } {  global vdbupdateinterval  putlog "Updating and saving vhost tracking database..."  vlistrefresh  vdbupdate  vhostcheck  timer $vdbupdateinterval vdbmain }proc vdbcreate { } {global vhostfile vhostlistset vhostlist [vhflparse]vdbupdate       }proc vdbload { } {      global vdbfile vhostlist      if { [catch {set vdbload_vdbfile [open $vdbfile r]}] == 0 } {  set vhostlist ""  set vdbload_vdbline ""  while { [set vdbload_vdbline [gets $vdbload_vdbfile]] != "" } { lappend vhostlist $vdbload_vdbline}  close $vdbload_vdbfile } else {  filerrmsg $vdbfile reading }     }proc vhflparse { } {global vhostfileset vhflparse_vhostlist ""if { [catch {set vhflparse_vhostfile [open $vhostfile r]}] == 0 } {    set vhflparse_time [clock seconds]    while { ![eof $vhflparse_vhostfile] } {   set vhflparse_line [gets $vhflparse_vhostfile]   if { [regexp -nocase {^([\s\t]*)spoof([\s\t]*)=([\s\t]*)\"([\s\t]*)} $vhflparse_line] } {       lappend vhflparse_vhostlist "[lindex [split $vhflparse_line \"] 1] $vhflparse_time 0"      }  }    close $vhflparse_vhostfile   } else {    filerrmsg $vhostfile reading   }return $vhflparse_vhostlist       }proc vdbupdate { } {global vdbfile vhostlistif { [catch {set vdbupdate_vhostfile [open $vdbfile w 0600]}] == 0 } {    set vdbupdate_con 0    set vhostlist [lsort -integer -index 1 $vhostlist]    while { $vdbupdate_con &lt; [llength $vhostlist] } {   puts $vdbupdate_vhostfile [lindex $vhostlist $vdbupdate_con]   incr vdbupdate_con  }    close $vdbupdate_vhostfile   } else {    filerrmsg $vdbfile writing   }       }proc vlistrefresh { } {   global vhostlist   set vlistrefresh_refreshedvhostlist ""   set vlistrefresh_con 0   if { [set vlistrefresh_vhostlist [vhflparse]] == "" } { return }   while { $vlistrefresh_con &lt; [llength $vlistrefresh_vhostlist] } {  if { [set vlistrefresh_dbfoundnum [lsearch -regexp $vhostlist "^[lindex [split [lindex $vlistrefresh_vhostlist $vlistrefresh_con] \ ] 0]\[\ \]1"]] &gt; -1 } {      lappend vlistrefresh_refreshedvhostlist [lindex $vhostlist $vlistrefresh_dbfoundnum]     } else {      lappend vlistrefresh_refreshedvhostlist [lindex $vlistrefresh_vhostlist $vlistrefresh_con]     }  incr vlistrefresh_con }   set vhostlist $vlistrefresh_refreshedvhostlist  }proc vhostentry { vhostentry_host vhostentry_pad vhostentry_text } { global vhostlist if { [lindex [split $vhostentry_text \ ] 5] == "connecting:" &amp;&amp; [llength [split $vhostentry_host @]] == 1 } {     set vhostentry_dbindex [lsearch -regexp $vhostlist "^[set vhostentry_cnhost [lindex [split [string trim [lindex [split $vhostentry_text \ ] 7] \)] @] 1]]\[\ \]1"]     if { $vhostentry_dbindex &lt; 0 } { lappend vhostlist "$vhostentry_cnhost [clock seconds] 1"} else { set vhostlist [lreplace $vhostlist $vhostentry_dbindex $vhostentry_dbindex "$vhostentry_cnhost [clock seconds] [expr [lindex [split [lindex $vhostlist $vhostentry_dbindex] \ ] 2] + 1]"]}    }}proc vhostcheck { } { global vhostlist vhostexplist vhostexptime vhostexpnotifyaddrlist botnick server set vhostcheck_exptime [expr [clock seconds] - $vhostexptime * 86400] set vhostcheck_newexps "" foreach vhostcheck_vhost $vhostlist {  if { [lindex [split $vhostcheck_vhost \ ] 1] &lt; $vhostcheck_exptime &amp;&amp; [lsearch -exact $vhostexplist $vhostcheck_vhost] == -1 } {      lappend vhostexplist $vhostcheck_vhost      set vhostcheck_newexps "$vhostcheck_newexps \[[lindex [split $vhostcheck_vhost \ ] 2]\] [lindex [split $vhostcheck_vhost \ ] 0]\n"     } } if { $vhostcheck_newexps != "" &amp;&amp; [regexp -nocase {[a-z0-9\.\-\_]+@[a-z0-9\.\-]*} $vhostexpnotifyaddrlist] } {     exec echo "Expired vhosts as monitored by $botnick on $server\:\n$vhostcheck_newexps" | mail $vhostexpnotifyaddrlist    }}proc tracevhost { tracevhost_host tracevhost_pad tracevhost_text } { vhostentry pad pad "pad pad pad pad pad connecting: pad [string trim [lindex [split $tracevhost_text \ ] 3] \]]"}proc vhostadd { vhostadd_handle vhostadd_idx vhostadd_text } {       # arguments are: mask pass vhost       global vhostfile       set vhostadd_args [parsecline $vhostadd_text]       if { [regexp -nocase {^[a-z0-9\.\-\_\*\?\~]+@[a-z0-9\-\.\*\?]+} [lindex $vhostadd_args 0]] &amp;&amp;    [regexp -nocase {^[a-z0-9\-]+\.[a-z0-9\-\.]+$} [lindex $vhostadd_args 2]] &amp;&amp;     [string length [lindex $vhostadd_args 2]] &lt; 63 } {   regexp {([^.]*\.[^.]*[.]*)$} [lindex $vhostadd_args 2] #vhostadd_domain   if { [catch {set vhostadd_hoststatus [exec host $vhostadd_domain]}] || [regexp -nocase {\ not\ found} $vhostadd_hoststatus] } {       if { [catch {set vhostadd_vhostfile [open $vhostfile a]}] == 0 } {           puts $vhostadd_vhostfile "#added by [idx2hand $vhostadd_idx] TS[clock seconds]\nauth \{\nuser = \"[lindex $vhostadd_args 0]\";\nspoof = \"[lindex $vhostadd_args 2]\";\n  password = \"[lindex $vhostadd_args 1]\";\n   flags = no_tilde, exceed_limit;\n    class = \"users\";\n\};\n"   close $vhostadd_vhostfile   putserv "REHASH"   putdcc $vhostadd_idx "Done."  } else {   filerrmsg $vhostfile concatenation  }      } else {       putdcc $vhostadd_idx "Resolver malfunction and/or domain $vhostadd_domain resolves!"      }  } else {   putdcc $vhostadd_idx "Invalid hostname(s) and/or sintax and/or vhost too long (max. 62 characters)\nUsage: addvhost ident@host password vhost"  }      }proc vhostdell {vhostadd_handle vhostadd_idx vhostdell_text} {       global vhostfile  if {$vhostdell_text== ""} { putdcc $vhostadd_idx "Write some spoofs for me!"; return 0}set temp [open $vhostfile r]; set vhostdata [split [read $temp] "\n"]; close $tempset lr [lsearch -regexp $vhostdata "spoof = \"$vhostdell_text\";"]if {$lr== -1} { putdcc $vhostadd_idx "spoof name is not in server databace!"; return 0}set wr [open $vhostfile w]foreach inrcd "[lrange $vhostdata 0 [expr $lr - 4]] [lrange $vhostdata [expr $lr + 5] end-1]" {      puts $wr $inrcd     }flush $wr; close $wrputdcc $vhostadd_idx "Spoof $vhostdell_text deleted! Rehashing server!"putserv "REHASH"putdcc $vhostadd_idx "Done."}  proc parsecline { parsecline_text } { set parsecline_clist "" foreach parsecline_element [split $parsecline_text \ \] {  if { $parsecline_element != "" } {      lappend parsecline_clist $parsecline_element     } } return $parsecline_clist}proc filerrmsg { filerrmsg_file filerrmsg_mode } {global vhtrackverputlog "\[$vhtrackver\]: Error! Cannot open $filerrmsg_file for $filerrmsg_mode\."       }proc why_the_hell_cant_i_stick_a_single_line_command_here_dammit { okok_pad freeow_pad pff_pad } {  putserv "TRACE" }proc operid { operid_host operid_pad operid_text } {     global opernick operpass opermodes     putserv "OPER $opernick $operpass"     putserv "MODE $opernick +$opermodes"    }if { ![file exists $vdbfile] } { vdbcreate } else { vdbload }bind raw - NOTICE vhostentrybind raw - 001 operidbind raw - 204 tracevhostbind raw - 205 tracevhostbind raw - 381 why_the_hell_cant_i_stick_a_single_line_command_here_dammitbind dcc V addvhost vhostaddbind dcc V dellvhost vhostdellwhile { [lsearch -regexp [timers] "\ vdbmain\ "] != -1 } {       killtimer [lindex [split [lindex [timers] [lsearch -regexp [timers] "\ vdbmain\ "]] \ ] 2]      }timer $vdbupdateinterval vdbmain</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12298">SlaSerX</a> — Sat Nov 30, 2013 4:50 pm</p><hr />
]]></content>
	</entry>
	</feed>
