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

	<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>2004-08-23T03:16:49-04:00</updated>

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

		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-08-23T03:16:49-04:00</updated>

		<published>2004-08-23T03:16:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40050#p40050</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40050#p40050"/>
		<title type="html"><![CDATA[need some help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40050#p40050"><![CDATA[
<blockquote class="uncited"><div>if {$seq &gt; 00} {incr seq 1} else {set seq 01}</div></blockquote>To my concern this should be used as a while loop.<br><div class="codebox"><p>Code: </p><pre><code>while { #condition is true } { #do stuff } else { #do this }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Mon Aug 23, 2004 3:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MarlbMan]]></name></author>
		<updated>2004-08-23T02:07:21-04:00</updated>

		<published>2004-08-23T02:07:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40047#p40047</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40047#p40047"/>
		<title type="html"><![CDATA[need some help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40047#p40047"><![CDATA[
actually, I've made some changes and it KIND of works now. The problem I am having now however, is I cannot get it to incr correctly, I am wanting it to go to the last line, look at the first 2 characters (or bytes) and incr what it finds.(proc:vhost) Also, I need to find out how to get it to delete the line that starts with that number. (proc:reject) Here's the newest code.<br><div class="codebox"><p>Code: </p><pre><code># vhost.tcl by MarlbMan Aug-2004 (v1.0)set operid "vhost"set operpass "vhost5728"set nspass "vhost5728"set operchan "#Administrator"set stdchan "#militia"bind pub -|- !vhost pub:vhostbind pub O !approve pub:approvebind pub O !reject pub:rejectbind pub O !pending pub:pendingbind pub O !oper pub:operbind pub O !ident pub:identproc pub:oper {nick host hand chan text} {     global operid operpass operchan     putserv "OPER $operid $operpass"     putserv "PRIVMSG $operchan : Power Up!"     }proc pub:ident {nick host chan text} {     global nspass operchan     putserv "PRIVMSG NickServ : identify $nspass"     putserv "PRIVMSG $operchan : Identified!"     }proc pub:vhost {nick host hand chan text} {     global operchan     set hostdb [open hostdb.txt a+]     set seq [gets $hostdb 1]     set tme [strftime %d-%m-%Y@%H:%M]     if {$seq &gt; 00} {incr seq 1} else {set seq 01}     puts $hostdb "$seq $nick $text $tme"     close $hostdb     putserv "PRIVMSG $operchan : The user $nick has made a request for a vhost"     putserv "PRIVMSG $operchan : Request #: $seq Requested Host: $text Time of Request: $tme"     putserv "PRIVMSG $operchan : Please use !approve &lt;#&gt; to approve, or !reject &lt;#&gt; to reject"     return 0     }proc pub:pending {nick host chan text} {     set hostdb [open hostdb.txt r]     set pend [read hostdb.txt]     putserv "PRIVMSG $operchan : $pend"     close hostdb.txt     return 0     }proc pub:reject {nick host hand chan text} {     global operchan stdchan rjct     set hostdb [open hostdb.txt r+]     set finished 0     while {![eof $hostdb] &amp;&amp; !$finished} {     gets $hostdb line     set rjct [lrange $line 0 end]     set finished 1     putlog "0"     }     if {$rjct !=""} {          set rjnick [lindex $rjct 1]          set rjhost [lindex $rjct 2]          putserv "PRIVMSG $operchan : $rjct rejected"          putserv "PRIVMSG $stdchan : $rjnick :Your vhost of $rjhost has been rejected"#          puts $line "" } else { putserv "PRIVMSG $operchan :$text does not exist in my database"          }          return 0          close hostdb.txt          }proc pub:approve {nick host chan text} {     set hostdb [open hostdb.txt w+     set appr ""     set finished 0     while {!eof $hostdb $$ !finished} {     gets $hostdb line     if {[lindex $line o] == $text} {     set appr "[lrange $line 1 end]"     set finished 1     }     }     if {$appr != ""} {          set apnick [lindex $rjct 2]          set aphost [lindex $rjct 3]          putserv "PRIVMSG $operchan : $appr approved"          putserv "PRIVMSG $stdchan : $apnick : Your vhost of  $aphost hasbeen approved and will take effect next time you log in"          putserv "PRIVMSG HostServ : set $apnick $aphost"          puts $line ""          }          else { putserv "PRIVMSG $operchan :$text does not exist in mydatabase"          }          return 0          close hostdb.txt          }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3021">MarlbMan</a> — Mon Aug 23, 2004 2:07 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-08-23T01:56:22-04:00</updated>

		<published>2004-08-23T01:56:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40046#p40046</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40046#p40046"/>
		<title type="html"><![CDATA[need some help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40046#p40046"><![CDATA[
The +O flag denotes OPER only channels (only opers may join) like in bahamut, but this has no concern with the bots internal flags.<br><br>Also the +O flag in IRCd's denotes an (O:line) Global Oper. But it doesn't have any concern with the bot's internal flags, as they are totally different from the IRCd and have no concern between each other.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_mrgreen.gif" width="15" height="15" alt=":mrgreen:" title="Mr. Green"> <br><br>So for channel modes +O = IRCOPERATORS can only join those channels<br>and for user modes +O = Global IRC Operator<br>(I hope this is clear now!)<br><br>Both of these have no concern with the bots "O" flag still. If there is a flag named +O in the bots userfile and people with those flags are defined then its okay, otherwise not.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Mon Aug 23, 2004 1:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2004-08-23T01:52:31-04:00</updated>

		<published>2004-08-23T01:52:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40045#p40045</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40045#p40045"/>
		<title type="html"><![CDATA[need some help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40045#p40045"><![CDATA[
<blockquote class="uncited"><div>Is the bind "O" +O a user flag defined?? If not change to it to small 'o'.</div></blockquote>+O under some IRCD's is set for Oper only channels. So my guess is that it's a user defined flag. <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=3646">Alchera</a> — Mon Aug 23, 2004 1:52 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-08-23T00:23:06-04:00</updated>

		<published>2004-08-23T00:23:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40035#p40035</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40035#p40035"/>
		<title type="html"><![CDATA[need some help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40035#p40035"><![CDATA[
Well all of these are procedures some are big and some are quite simple and easy as the first few ones.<br><br>All the procedures you have listed here aren't working? or just some specific? Are they giving errors? or are they just not responding to the triggers??<br><br>Is the bind "O" +O a user flag defined?? If not change to it to small 'o'.<br>I know the bind "o" +o user flag is defined for ops.<br><br>For this to be easy:<br>[1] What you can do is use putlogs in each lines of the procedures which aren't working or giving any output to check where the errors are.<br><br>[2] If you get an [Tcl error:proc_name] in DCC (partyline) then you can paste it here so we maybe able to look at it.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Mon Aug 23, 2004 12:23 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MarlbMan]]></name></author>
		<updated>2004-08-22T19:21:37-04:00</updated>

		<published>2004-08-22T19:21:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=40019#p40019</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=40019#p40019"/>
		<title type="html"><![CDATA[need some help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=40019#p40019"><![CDATA[
I have some code here that isnt working, I'm sure there are tons of things wrong with it, if anyone wants to help me out and pick it apart, It'd be much appreciated.<br><div class="codebox"><p>Code: </p><pre><code>set operid "vhost"set operpass "vhost5728"set nspass "vhost5728"set operchan "#Administrator"set stdchan "#militia"bind pub -|- !vhost pub:vhostbind pub O !approve pub:approvebind pub O !reject pub:rejectbind pub O !pending pub:pendingbind pub O !oper pub:operbind pub O !ident pub:identproc pub:oper {nick host chan text} {     global operid operpass operchan     putserv "OPER $operid $operpass"     putserv "PRIVMSG $operchan : Power Up!"     }proc pub:ident {nick host chan text} {     global nspass operchan     putserv "PRIVMSG NickServ : identify $nspass"     putserv "PRIVMSG $operchan : Identified!"     }proc pub:vhost {nick host chan text min hour month day year} {     global operchan     set hostdb [open hostdb.txt w+]     set seq [read hostdb.txt 2]     if {$seq &gt; 00} {incr seq 01} else {set seq 01}     puts $hostdb "$seq $nick $text $hour : $min $month / $day / $year"     close hostdb.txt     return 0     }proc pub:pending {nick host chan text} {     set hostdb [open hostdb.txt r]     set pend [read hostdb.txt]     putserv "PRIVMSG $operchan : $pend"     close hostdb.txt     return 0     }proc pub:reject {nick host chan text} {     set hostdb [open hostdb.txt w+]     set rjct ""     set finished 0     while {![eof $hostdb] &amp;&amp; !$finished} {     gets $hostdb line     if {[lindex $line 0] == $text} {     set rjct "[lrange $line 1 end]"     set finished 1     }     }     if {$rjct != ""} {          set rjnick [lindex $rjct 2]          set rjhost [lindex $rjct 3]          putserv "PRIVMSG $operchan : $rjct rejected"          putserv "PRIVMSG $stdchan : $rjnick : Your vhost of  $rjhost hasbeen rejected"          puts $line ""          }          else { putserv "PRIVMSG $operchan :$text does not exist in mydatabase"          }          return 0          close hostdb.txt          }proc pub:approve {nick host chan text} {     set hostdb [open hostdb.txt w+     set appr ""     set finished 0     while {!eof $hostdb $$ !finished} {     gets $hostdb line     if {[lindex $line o] == $text} {     set appr "[lrange $line 1 end]"     set finished 1     }     }     if {$appr != ""} {          set apnick [lindex $rjct 2]          set aphost [lindex $rjct 3]          putserv "PRIVMSG $operchan : $appr approved"          putserv "PRIVMSG $stdchan : $apnick : Your vhost of  $aphost hasbeen approved and will take effect next time you log in"          putserv "PRIVMSG HostServ : set $apnick $aphost"          puts $line ""          }          else { putserv "PRIVMSG $operchan :$text does not exist in mydatabase"          }          return 0          close hostdb.txt          }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3021">MarlbMan</a> — Sun Aug 22, 2004 7:21 pm</p><hr />
]]></content>
	</entry>
	</feed>
