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

	<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>2003-11-29T12:38:36-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2003-11-29T12:38:36-04:00</updated>

		<published>2003-11-29T12:38:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=30854#p30854</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=30854#p30854"/>
		<title type="html"><![CDATA[Problem with guard.tcl - Illegal channel:  *]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=30854#p30854"><![CDATA[
The first proc is handeling msgs to the bot, and has nothing to do with channels. Then "*" is sent as a channelname to the next proc, which is covering channels, and not msgs!<br>You have to set a channelname in the first proc...<br>something like this.... ofc then it will only work in one channel =)<div class="codebox"><p>Code: </p><pre><code>guard $nick $uhost $hand "#somechannelname" $text </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Sat Nov 29, 2003 12:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Aron]]></name></author>
		<updated>2003-11-29T04:56:02-04:00</updated>

		<published>2003-11-29T04:56:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=30842#p30842</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=30842#p30842"/>
		<title type="html"><![CDATA[Problem with guard.tcl - Illegal channel:  *]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=30842#p30842"><![CDATA[
Although it seems to be a pretty harmless error, it is pretty annoying:<br><br>Every time someone messages the bot, it will trigger. It is a problem with guard101.tcl, but i cant seem to figure it out. Here are the two procedures that are causing the error (i think):<br><br>The msg_guard procedure:<div class="codebox"><p>Code: </p><pre><code>bind msgm - "*" msg_guardproc msg_guard {nick uhost hand text} { global guard guard $nick $uhost $hand "*" $text guard_inc msg $guard(msg) $guard(msgtime)}</code></pre></div>...and the actual guard procedure:<br><div class="codebox"><p>Code: </p><pre><code>proc guard {nick uhost hand desc text} {global guard guardnif {![botisop $desc]} { return 0 }subst -nobackslashes -nocommands -novariables textif {([matchattr $hand b])} {return 0}if {([matchattr $hand o])} {return 0}if {([matchattr $hand f])} {return 0}if {($desc != "*") &amp;&amp; ([string index $desc 0] == "#")} { if {([matchchanattr $hand |o $desc])} {return 0} if {([matchchanattr $hand |f $desc])} {return 0} if {[isop $nick $desc]} {return 0}                  }regsub -all {\{} $text "?" textregsub -all {\(} $text "?" textregsub -all {\"} $text "?" textregsub -all {\[} $text "?" textregsub -all {\]} $text "?" textset rtext $textif {[llength $text] == 1} {set text [lindex $text 0]}set text [string tolower $text]set lnick [string tolower $nick]set sitemask "*!*[string trimleft [maskhost $uhost] *!]"if {![info exists guardn($lnick)]} {set guardn($lnick) "0 0 0 0 0 0 0 [unixtime] $text"                                    append guardn(nicks) "$lnick "                                   } set g_repeat [lindex $guardn($lnick) 0] set g_sflood [lindex $guardn($lnick) 1] set g_aflood [lindex $guardn($lnick) 2] set g_1flood [lindex $guardn($lnick) 3] set g_cc [lindex $guardn($lnick) 4] set g_caps [lindex $guardn($lnick) 5] set g_spaces [lindex $guardn($lnick) 6] set g_time [lindex $guardn($lnick) 7] set g_text [lrange $guardn($lnick) 8 end] set caps 0 set spaces 0 set gloop 0; set CC 0 while {$gloop &lt; [string length $text]} {  if {[string match "*[string index $rtext $gloop]*" "ABCDEFGHIJKLMNOPQRSTUVWXYZ"]} {incr caps 1}  if {[string index $text $gloop] == "\003"} {incr CC 1}  if {[string index $text $gloop] == " "} {incr spaces 1}  incr gloop 1                                        }if {([guardchan $desc $guard(nocolors)]) &amp;&amp; ($CC &gt;&gt; $guard(color_max))} {incr g_cc 1} else {set g_cc 0}set totc [string length $rtext]if {$text != ""} {set capsp [expr (${caps}.0 / ${totc}.0) * 100]} else {set capsp 0}if {($totc &gt; $guard(caps_min)) &amp;&amp; ($capsp &gt; $guard(caps_per))} {incr g_caps 1} else {set g_caps 0}if {($totc &gt; $guard(spaces_min)) &amp;&amp; ($spaces == 0)} {incr g_spaces 1} else {set g_spaces 0}#repeat flood if {$g_text == $text} {incr g_repeat 1} else {set g_repeat 0}# Add char floodif {[string range $text 0 [expr [string length $text] - 2]] == $g_text} {incr g_aflood} else {set g_aflood 0}# Sub char floodif {[string range $g_text 0 [expr [string length $g_text] - 2]] == $text} {incr g_sflood} else {set g_sflood 0}if {[string length $text] == 1} {incr g_1flood} else {set g_1flood 0}#if ([$strlen($Rtext)] == 1) {@SCcnt = SCcnt + 1}{@SCcnt = 1}# if {$g_cc == $guard(color_warn)} {guardsay $nick $desc "$nick: $guard(color_reason)"}# if {$g_cc == $guard(color_kick)} {guardkick $nick $desc $guard(color_reason)}# if {$g_cc == $guard(color_ban)} {guardban $nick $sitemask $desc $guard(color_reason)}# if {$g_spaces == $guard(spaces_warn)} {guardsay $nick $desc "$nick: $guard(color_spaces)"}# if {$g_spaces == $guard(spaces_kick)} {guardkick $nick $desc $guard(spaces_reason)}# if {$g_spaces == $guard(spaces_ban)} {guardban $nick $sitemask $desc $guard(spaces_reason)} if {$g_caps == $guard(caps_warn)} {guardsay $nick $desc "$nick: $guard(caps_reason)"} if {$g_caps == $guard(caps_kick)} {guardkick $nick $desc "$guard(caps_reason)"} if {$g_caps == $guard(caps_ban)} {guardban $nick $sitemask $desc "$guard(caps_reason)"} if {$g_1flood == $guard(scflood_ban)} {set g_1flood 0; guardban $nick $sitemask $desc $guard(scflood_reason)} if {$g_sflood == $guard(subflood_ban)} {set g_sflood 0; guardban $nick $sitemask $desc $guard(subflood_reason)} if {$g_aflood == $guard(addflood_ban)} {set g_aflood 0; guardban $nick $sitemask $desc $guard(addflood_reason)} if {$g_repeat == $guard(repeat_warn)} {guardsay $nick $desc "$nick: Please do not repeat"} if {$g_repeat == $guard(repeat_kick)} {guardkick $nick $desc "$nick: Please do not repeat. Last warning."} if {$g_repeat == $guard(repeat_ban)} {guardban $nick $sitemask $desc "Don't Repeat! Don't Repeat! Don't Repeat! Don't Repeat!"} set guardn($lnick) "$g_repeat $g_sflood $g_aflood $g_1flood $g_cc $g_caps $g_spaces [unixtime] $text" return 0}</code></pre></div>Thanks in advance.<br><br>-Aron<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2858">Aron</a> — Sat Nov 29, 2003 4:56 am</p><hr />
]]></content>
	</entry>
	</feed>
