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

	<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-10-04T15:45:13-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-10-04T15:45:13-04:00</updated>

		<published>2004-10-04T15:45:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=41546#p41546</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=41546#p41546"/>
		<title type="html"><![CDATA[Help with READ/REPLACE Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=41546#p41546"><![CDATA[
Ok, I found a change to use so far for the variables at the beginning.  I first open the file with the variable responses to the .command scritps, and store all the data to var lines.  Then it when it actually sets the variables, it sets to whatever the updated clanbot.txt is stored too.  Next, I need to learn how to replace an entire certain line, read just a certain line, and output it.  Then that should be fine for what I need for that.  But also, my channel advertise protection isn't working still lol.  I had it working!!!!!!!! Now it won't work.  I'm so confused.  I don't think I changed anything.<br><div class="codebox"><p>Code: </p><pre><code>#Respond channelset my_chan "#&gt;-lo"# File name to read.set fname "clanbot.txt"# Open file for read access (note we're not catching errors, you# want to use catch {} if the file might not exist.set fp [open $fname "r"]# Here we read in all of the data.set data [read -nonewline $fp]# Cloes the file, since we're done reading.close $fp# Now we split the data into lines.set lines [split $data "\n"]### VARIABLES ###set commandv "lindex $lines 0"set rosterv "lindex $lines 1"set recordv "lindex $lines 2"set serversv "lindex $lines 3"set sponsorsv "lindex $lines 4"set websitev "lindex $lines 5"set ugsv "lindex $lines 6"set calv "lindex $lines 7"</code></pre></div>And it's not a game for IRC.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"> I Just named it that lols.  It's more of a clanbot command script, that allows channel ops to change the variables, and how I had it mIRC code, I made it so the ops could also change the method of output (channel message, or private notice) thru the code:<br><div class="codebox"><p>Code: </p><pre><code>$iif(%mode == /msg, $chan, $nick)</code></pre></div>Where it basically says:<br>If variable mode is set to /msg, then channel message the following... if not, if variable mode is not set to /msg (otherwise, the only other thing it could be set to is notice), private notice the nick triggering the event.<p>Statistics: Posted by Guest — Mon Oct 04, 2004 3:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[qwek]]></name></author>
		<updated>2004-10-04T00:00:46-04:00</updated>

		<published>2004-10-04T00:00:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=41527#p41527</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=41527#p41527"/>
		<title type="html"><![CDATA[Help with READ/REPLACE Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=41527#p41527"><![CDATA[
mil1i: what game is that? anyway i cant describe how to making a copy game from irc game into tcl eggdrop game, maybe someone will helping you to figure out this code <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy">. i'm a newbie too but i'm still learning.<br><br><br>Regards,<br>qwek<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5465">qwek</a> — Mon Oct 04, 2004 12:00 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-10-03T16:51:24-04:00</updated>

		<published>2004-10-03T16:51:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=41520#p41520</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=41520#p41520"/>
		<title type="html"><![CDATA[Help with READ/REPLACE Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=41520#p41520"><![CDATA[
Hi, I'm new to learning TCL, and I just got a new webhost for my website.  I got access to a shell account, so I figured I'd set up an eggdrop, but for all I knew, the codes had to be a different language than what IRC uses.  <br><br>Heres my IRC Code: <br><div class="codebox"><p>Code: </p><pre><code>*/     Gaming Script by Matt Milligan (mil1i)*/     September 26, 2004*/     */*/     Load script setting up var'son 1:load:{  if (!%chans) {  /set %chans $?="What's the channel you wish for this script to run in? (ex. #openfire)"  }  elseif (!%id) { /set %id $?="What prefix do you want to use to execute commands? (ex. @commands [or] ?commands)"  }  elseif (!%mode) { /set %mode /notice  }  elseif (!%adbanhistory) { /set %adbanhistory 0  }}*/*/    Auto-Join Channels bot is working in*/on 1:start:/j %chans*/*/     Unwanted advertising prevention*/*/on 1:text:*#*:%chans:{  if (($nick !isvoice $chan) &amp;&amp; ($nick !isop $chan)) {    /inc %adbanhistory 1    /ban -u240 %chans $nick 3    /kick $chan $nick Do NOT adverstise. ( $+ %adbanhistory $+  users.)  }}on 1:action:*#*:%chans:{  if (($nick !isvoice $chan) &amp;&amp; ($nick !isop $chan)) {    /inc %adbanhistory 1    /ban -u240 %chans $nick 3    /kick $chan $nick Do NOT adverstise. ( $+ %adbanhistory $+  users.)  }}*/*/    Public Commands*/*/on 1:text:*:%chans:{  if (($flood(chanflood, $nick, $chan, 4, 4, 1) == f) &amp;&amp; ($nick !isop $chan)) {    /ban -u350 $chan $nick 3    /mode $chan +m    /timerum 1 10 mode $chan -m  }  elseif ((%id == $left($1, $calc($len($1) - $calc($len($1) - 1)))) &amp;&amp; ($nick isop $chan)) {    if ($right($1, $calc($len($1) - 1)) == commands) {      /msg $chan Commands: $iif(%roster,  $+ %id $+ Roster), $iif(%record,  $+ %id $+ Record), $iif(%sponsors,  $+ %id $+ Sponsors), $iif(%website,  $+ %id $+ Website), $iif(%server,  $+ %id $+ Server), $iif(%cal,  $+ %id $+ CAL), $iif(%ugs,  $+ %id $+ UGS)      /timeradmin 1 1 notice $nick $chr(34) $+  $+ %id $+ Set &lt;cmd&gt; &lt;text&gt; $+ $chr(34) - To change any of the above responses. ( $+ %id $+ Set mode &lt;Pub/Priv&gt;) - Pub = msg chan - Priv = notice nick    }    elseif ($right($1, $calc($len($1) - 1)) == help) {      /msg $chan Commands: $iif(%roster,  $+ %id $+ Roster), $iif(%record,  $+ %id $+ Record), $iif(%sponsors,  $+ %id $+ Sponsors), $iif(%website,  $+ %id $+ Website), $iif(%server,  $+ %id $+ Server), $iif(%cal,  $+ %id $+ CAL), $iif(%ugs,  $+ %id $+ UGS)      /timeradmin 1 1 notice $nick  $chr(34) $+  $+ %id $+ Set &lt;cmd&gt; &lt;text&gt; $+ $chr(34) - To change any of the above responses. ( $+ %id $+ Set mode &lt;Pub/Priv&gt;) - Pub = msg chan - Priv = notice nick    }    elseif ($right($1, $calc($len($1) - 1)) == roster) {      %mode $iif(%mode == /msg, $chan, $nick) Roster: %roster    }    elseif ($right($1, $calc($len($1) - 1)) == sponsors) {      %mode $iif(%mode == /msg, $chan, $nick) Sponsors: %sponsors    }    elseif ($right($1, $calc($len($1) - 1)) == website) {      %mode $iif(%mode == /msg, $chan, $nick) Website: %website    }    elseif ($right($1, $calc($len($1) - 1)) == cal) {      %mode $iif(%mode == /msg, $chan, $nick) CAL: %cal    }    elseif ($right($1, $calc($len($1) - 1)) == ugs) {      %mode $iif(%mode == /msg, $chan, $nick) UGS: %ugs    }    elseif ($right($1, $calc($len($1) - 1)) == server) {      %mode $iif(%mode == /msg, $chan, $nick) Server: %server    }    elseif ($right($1, $calc($len($1) - 1)) == record) {      %mode $iif(%mode == /msg, $chan, $nick) Record: %record    }    elseif ($right($1, $calc($len($1) - 1)) == set) {      if ($2 == mode) {        if ($3 == pub) {          /set %mode /msg          /notice $nick Commands will now be displayed Publicly.        }        elseif ($3 == priv) {          /set %mode /notice          /notice $nick Commands will now be displayed Privately.        }        else {          /notice $nick Error: Must use "Pub" or "Priv" to change.  (ex. %id $+ set mode pub)        }      }      elseif (($2 == roster) || ($2 == record) || ($2 == sponsors) || ($2 == website) || ($2 == server) || ($2 == cal) || ($2 == ugs)) {        /set $chr(37) $+ $2 $3-        /notice $nick Changed to -  $+ $upper($left($2,1)) $+ $lower($right($2, $calc($len($2) - 1))) $+ : $3-      }      else {        /notice $nick  $+ $upper($left($2,1)) $+ $lower($right($2, $calc($len($2) - 1))) $+  - is not a command.      }    }  }  elseif ((%id == $left($1, $calc($len($1) - $calc($len($1) - 1)))) &amp;&amp; ($nick !isop $chan)) {    if ($right($1, $calc($len($1) - 1)) == commands) {      /msg $chan Commands: $iif(%roster,  $+ %id $+ Roster), $iif(%record,  $+ %id $+ Record), $iif(%sponsors,  $+ %id $+ Sponsors), $iif(%website,  $+ %id $+ Website), $iif(%server,  $+ %id $+ Server), $iif(%cal,  $+ %id $+ CAL), $iif(%ugs,  $+ %id $+ UGS)     }    elseif ($right($1, $calc($len($1) - 1)) == help) {      /msg $chan Commands: $iif(%roster,  $+ %id $+ Roster), $iif(%record,  $+ %id $+ Record), $iif(%sponsors,  $+ %id $+ Sponsors), $iif(%website,  $+ %id $+ Website), $iif(%server,  $+ %id $+ Server), $iif(%cal,  $+ %id $+ CAL), $iif(%ugs,  $+ %id $+ UGS)    }    elseif ($right($1, $calc($len($1) - 1)) == roster) {      %mode $nick Roster: %roster    }    elseif ($right($1, $calc($len($1) - 1)) == sponsors) {      %mode $iif(%mode == /msg, $chan, $nick) Sponsors: %sponsors    }    elseif ($right($1, $calc($len($1) - 1)) == website) {      %mode $iif(%mode == /msg, $chan, $nick) Website: %website    }    elseif ($right($1, $calc($len($1) - 1)) == cal) {      %mode $iif(%mode == /msg, $chan, $nick) CAL: %cal    }    elseif ($right($1, $calc($len($1) - 1)) == ugs) {      %mode $iif(%mode == /msg, $chan, $nick) UGS: %ugs    }    elseif ($right($1, $calc($len($1) - 1)) == server) {      %mode $iif(%mode == /msg, $chan, $nick) Server: %server    }    elseif ($right($1, $calc($len($1) - 1)) == record) {      %mode $iif(%mode == /msg, $chan, $nick) Record: %record    }  }};$flood 1.2 script;Elfrond - 2002;usage: $flood(&lt;description&gt;,&lt;nick|address&gt;,&lt;#channel|query|dcc&gt;,&lt;max&gt;,&lt;secs&gt;,&lt;inc&gt;)alias flood {  var %y = $+(f,$cid,,$$1,,$$2,,$$3)  hadd $+(-mu,$$5) %y $ticks $$6  var %i = $hget(%y,0).item  var %x  while (%i) {    inc %x $hget(%y,%i).data    dec %i  }  if (%x &gt;= $4) return f}</code></pre></div>Basically, it:<br>- kick/timebans someone from a channel for spamming their channel name<br>- bans (without kicking) and sets mode (+m) in chan for text spam of 5 lines in 2 secconds<br>- .command script (with a set command, to change the variables it displays, along with a different menu for channel ops)<br><br>I made an attempt to start this in TCL, but it's not working to well so far...<br>here is what I have:<br><div class="codebox"><p>Code: </p><pre><code>#Gaming Script for clans beta1 by mil1i.#Objective: to act as a spamblocker/channel advertisement stopper and clanbot.#Usage: !explain explination ### VARIABLES ###set commandv "?Roster ?Record ?Server ?Sponsors ?Webstie ?CAL ?UGS"set rosterv "socrat3s  tr!cky  sanct!on  abuse  mil1i  t!poff  muruko"set recordv "CAL-O S12 : 3-0-0  UGS-O S7 : 1-1-0  Overall : 4-1-0"set serversv "Nuclear Fallout Priv Server: happy.nuclearfallout.net:27015"set sponsorsv "www.abusegaming.com"set websitev "www.happy-gaming.com"set ugsv "http://ugsleague.com/?lid=0&amp;sid=clans&amp;cid=21074"set calv "http://caleague.com/?page=teams&amp;teamid=16038"### SCRIPT ### bind pub - ?commands pub:commands bind pub - ?roster pub:rosterbind pub - ?record pub:recordbind pub - ?servers pub:serversbind pub - ?sponsors pub:sponsorsbind pub - ?website pub:websitebind pub - ?ugs pub:ugsbind pub - ?cal pub:calbind pub - ?set pub:set### OUTPUTS ###proc pub:commands {nick uhost hand chan text} {  global botnick commandv putquick "PRIVMSG $chan :$commandv"; return 0 } proc pub:roster {nick uhost hand chan text} {  global botnick rosterv putquick "NOTICE $nick  :$rosterv"; return 0 } proc pub:record {nick uhost hand chan text} {  global botnick recordv putquick "NOTICE $nick  :$recordv"; return 0 } proc pub:servers {nick uhost hand chan text} {  global botnick serversv putquick "PNOTICE $nick  :$serversv"; return 0 } proc pub:sponsors {nick uhost hand chan text} {  global botnick sponsorsv putquick "NOTICE $nick :$sponsorsv"; return 0 } proc pub:website {nick uhost hand chan text} {  global botnick websitev putquick "NOTICE $nick  :$websitev"; return 0 } proc pub:ugs {nick uhost hand chan text} {  global botnick ugsv putquick "NOTICE $nick  :$ugsv"; return 0 } proc pub:cal {nick uhost hand chan text} {  global botnick calv putquick "NOTICE $nick  :$calv"; return 0 } #proc pub:set {nick uhost hand chan text} {# global commandv rosterv recordv serversv sponsorsv websitev ugsv calv# if {[isop $nick $chan]} {#  lset sponsorsv {} {Sponsors: $text}#  putquick "NOTICE $nick :Changed to - Sponsors: $text"; return 0# }#}### CHANEL ADVERTISEMENT PROTECT ###bind pubm - "*#*" pub:chanadvsmproc pub:chanadvsm {nick uhost hand chan text {dest ""}} {  if {![isop $nick $chan]} {  pushmode $chan +b $nick  pushserv "BAN $chan $nick "  putkick $chan $nick "Do NOT advertise. Temp 5m Ban."; return 0  }}#bind act - "*#*" pub:actionadv#bind notc - "*#*" pub:noticeadv</code></pre></div>Any help would be nice.   <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"> HELP!!!! lol<p>Statistics: Posted by Guest — Sun Oct 03, 2004 4:51 pm</p><hr />
]]></content>
	</entry>
	</feed>
