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

	<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>2002-12-27T08:54:57-04:00</updated>

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

		<entry>
		<author><name><![CDATA[blood_x]]></name></author>
		<updated>2002-12-27T08:54:57-04:00</updated>

		<published>2002-12-27T08:54:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=14625#p14625</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=14625#p14625"/>
		<title type="html"><![CDATA[Channel Protection v1.1 Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=14625#p14625"><![CDATA[
<blockquote class="uncited"><div>just add this line of code under each of the procs.... those that check bold/color ... etc that is <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><div class="codebox"><p>Code: </p><pre><code>if {[matchattr $hand +b]} { return 0 }</code></pre></div></div></blockquote>By this time, its work! Hehe, wat a simple solution.. Why lah I can't get that idea..  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed"> Anyway, thanks papillon..<br><br>Regards.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=402">blood_x</a> — Fri Dec 27, 2002 8:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2002-12-27T07:55:41-04:00</updated>

		<published>2002-12-27T07:55:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=14624#p14624</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=14624#p14624"/>
		<title type="html"><![CDATA[Channel Protection v1.1 Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=14624#p14624"><![CDATA[
just add this line of code under each of the procs.... those that check bold/color ... etc that is <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><div class="codebox"><p>Code: </p><pre><code>if {[matchattr $hand +b]} { return 0 }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Fri Dec 27, 2002 7:55 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[blood_x]]></name></author>
		<updated>2002-12-27T01:27:06-04:00</updated>

		<published>2002-12-27T01:27:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=14619#p14619</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=14619#p14619"/>
		<title type="html"><![CDATA[Channel Protection v1.1 Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=14619#p14619"><![CDATA[
The TCL script as below;<br><br>#binds:<br>bind notc - * ban_notice<br>bind pubm - * check_pubm<br>bind ctcp - ACTION check_ctcp<br><br>#redefining some old, and setting some new global vars:<br>set chanpro(remember) [expr $chanpro(remember) * 60]  ;#returns minutes..<br>set chanpro(chans) [string tolower $chanpro(chans)]   ;#makes sure the user did not get all CrEAtiVE on me <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz">~<br>set caps_count(none:none) 0<br>set bold_count(none:none) 0<br>set color_count(none:none) 0<br>set underline_count(none:none) 0<br>set annoy_count(none:none) 0<br><br><br># The proc's:<br><br>#CHECK_CTCP<br>proc check_ctcp {nick uhost hand dest keyword args} {<br><br> #load some global variables<br> global chanpro botnick<br><br> #set some variables<br> set this_botnick [string tolower $botnick]<br> set chan [string tolower $dest]<br> set enabled [lsearch -exact $chanpro(chans) $chan]<br> set nick [string tolower $nick]<br> set uhost [string tolower $uhost]<br><br> #check if the chan enabled, else return..<br> if {$enabled == -1} {return 0}<br> <br> #check if the bot is OPed, else return..<br> if {![botisop $chan]} {return 0}<br><br> #check if the bot is actually typing the word himself, if so - return..<br> if {$nick == $this_botnick} {return 0}<br> <br> #check the args for colors, bold, underline and CAPS<br> if {[string match *\003* $args]} {kick_color $nick $uhost $hand $chan $args} \<br> elseif {[string match *\002* $args]} {check_bold $nick $uhost $hand $chan $args} \<br> elseif {[string match *\037* $args]} {check_underline $nick $uhost $hand $chan $args} \<br> else {check_caps $nick $uhost $hand $chan $args; check_annoy $nick $uhost $hand $chan $args}<br><br>} ;#end proc<br><br><br>#CHECK_PUBM<br>proc check_pubm {nick uhost hand chan args} {<br><br> #load some global variables<br> global chanpro botnick<br><br> #set some variables<br> set this_botnick [string tolower $botnick]<br> set chan [string tolower $chan]<br> set enabled [lsearch -exact $chanpro(chans) $chan]<br> set nick [string tolower $nick]<br> set uhost [string tolower $uhost]<br><br> #check if the chan enabled, else return..<br> if {$enabled == -1} {return 0}<br> <br> #check if the bot is OPed, else return..<br> if {![botisop $chan]} {return 0}<br><br> #check if the bot is actually typing the word himself, if so - return..<br> if {$nick == $this_botnick} {return 0}<br> <br> #check the args for colors, bold, underline and CAPS<br> if {[string match *\003* $args]} {kick_color $nick $uhost $hand $chan $args} \<br> elseif {[string match *\002* $args]} {check_bold $nick $uhost $hand $chan $args} \<br> elseif {[string match *\037* $args]} {check_underline $nick $uhost $hand $chan $args} \<br> else {check_caps $nick $uhost $hand $chan $args; check_annoy $nick $uhost $hand $chan $args;}<br><br>} ;#end proc<br><br><br>#BAN_NOTICE<br>proc ban_notice {nick uhost hand args dest} {<br><br>  #load some global variables<br>  global chanpro botnick<br> <br>  #set some variables<br>  set chan [string tolower $dest]<br>  set enabled [lsearch -exact $chanpro(chans) $chan]<br>  <br>  #check if the channel if enabled, else return<br>  if {$enabled == -1} {return 0}<br>  <br>  #set the botnick variable - tolower<br>  set this_botnick [string tolower $botnick]<br>  <br>  #checks if the notice check is disabled..<br>  if {$chanpro(notice) == 0} {return 0}<br>  <br>  #Prevent error msg if the notice is to the bot.. (error msg's sux <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz">)<br>  if {$this_botnick == $chan} {return 0}<br><br>  #checks if the user is an op, if so check if protect_ops is enabled<br>  if {([matchattr $hand o|o $chan]) || ([isop $nick $chan])} {<br>    putserv "[subst $chanpro(op_method)] :[subst $chanpro(op_notice)]"<br>    return 0<br>  } else {<br>    set bmask [maskhost [getchanhost $nick $chan]]<br>    set bmask [format "*!*%s" [string range $bmask 2 [string length $bmask]]]<br>    newchanban $chan $bmask $botnick [subst $chanpro(ban_notice)] $chanpro(ban_time_notice)<br>    putserv "KICK $chan $nick :[subst $chanpro(ban_notice)]"<br>  }<br><br>} ;# end proc<br><br><br><br>##CHECK_CAPS<br>proc check_caps {nick uhost hand chan args} {<br><br> #load some global variables<br> global chanpro caps_count botnick<br><br> #check if CAPS-check is disabled, if so - return<br> if {$chanpro(caps) == 0} {return 0}<br><br> #check if the string can match URL's, if so - return..<br> if {[string match *http://* $args] || [string match *<a href="www" class="postlink">www</a>.* $args]} {return 0}<br><br><br> #splits the argument.<br>  set chars [split $args ""]<br>  set caps 0 ; set total_string 0<br><br> #check each char with a loop<br>  foreach char $chars {<br>    if {![regexp ^\\+?\[a-zA-ZæøåÆØÅ\]+\$ $char]} {continue} \<br>    elseif {[string toupper $char] == "$char"} {incr caps}<br>    incr total_string<br>  }<br><br> #checks the amount of CAPS in percent<br> if {($caps == 0) || $total_string == 0} {return 0}<br> set num [expr $caps.0 / $total_string * 100]<br><br> #checks if the percentage CAPS use is above the limit and if the string is long enough to be counted<br> if {($num &gt;= $chanpro(caps_percent)) &amp;&amp; ($total_string &gt;= $chanpro(caps_length))} {<br><br>   ##now, proceed to the actual actions the bot will take<br><br>   #If the dude is an op, check for protect_ops and give warning if so. if not enabled, treat him as a regular user<br>   if {([matchattr $hand o|o $chan]) || ([isop $nick $chan])} {<br>    if {$chanpro(protect_ops) == 1} {<br>       putserv "[subst $chanpro(op_method)] :[subst $chanpro(op_caps)]"<br>       return 0<br>     }<br>   }<br><br>   #create a timer for the violation, kick/ban..<br>   if {![info exists caps_count($uhost:$chan)]} {<br>     set caps_count($uhost:$chan) 0<br>   }<br>   incr caps_count($uhost:$chan)<br>   timer $chanpro(remember) {unset caps_count($uhost:$chan); putlog "removed timer for $uhost in $chan"}<br>   if {$caps_count($uhost:$chan) == 1} {putserv "KICK $chan $nick :[subst $chanpro(kick_caps)]"}<br>   if {$caps_count($uhost:$chan) == 2} {<br>     set bmask [maskhost [getchanhost $nick $chan]]<br>     set bmask [format "*!*%s" [string range $bmask 2 [string length $bmask]]]<br>     newchanban $chan $bmask $botnick [subst $chanpro(ban_caps)] $chanpro(ban_time_caps)<br>     putserv "KICK $chan $nick :[subst $chanpro(ban_caps)]"<br>     set caps_count($uhost:$chan) 1<br>   }<br> }<br><br>} ;#end proc<br><br><br><br>#KICK_COLOR<br>proc kick_color {nick uhost hand chan args} {<br><br> #load some global variables<br> global chanpro color_count botnick<br><br> #check if color-check is disabled, if so - return<br> if {$chanpro(color) == 0} {return 0}<br><br> ##now, proceed to the actual actions the bot will take<br><br>   #If the dude is an op, check for protect_ops and give warning if so. if not enabled, treat him as a regular user<br>   if {([matchattr $hand o|o $chan]) || ([isop $nick $chan])} {<br>     if {$chanpro(protect_ops) == 1} {<br>       putserv "[subst $chanpro(op_method)] :[subst $chanpro(op_color)]"<br>       return 1<br>     }<br>   }<br><br>   #create a timer for the violation, kick/ban..<br>   if {![info exists color_count($uhost:$chan)]} {<br>     set color_count($uhost:$chan) 0<br>   }<br>   incr color_count($uhost:$chan)<br>   timer $chanpro(remember) {unset color_count($uhost:$chan); putlog "removed timer for $uhost in $chan"}<br>   if {$color_count($uhost:$chan) == 1} {putserv "KICK $chan $nick :[subst $chanpro(kick_color)]"}<br>   if {$color_count($uhost:$chan) == 2} {<br>     set bmask [maskhost [getchanhost $nick $chan]]<br>     set bmask [format "*!*%s" [string range $bmask 2 [string length $bmask]]]<br>     newchanban $chan $bmask $botnick [subst $chanpro(ban_color)] $chanpro(ban_time_color)<br>     putserv "KICK $chan $nick :[subst $chanpro(ban_color)]"<br>     set color_count($uhost:$chan) 1<br>   }<br><br>} ;#end proc<br><br><br>#CHECK_BOLD<br>proc check_bold {nick uhost hand chan args} {<br><br> #load some global variables<br> global chanpro bold_count botnick<br><br> #check if bold-check is disabled, if so - return<br> if {$chanpro(bold) == 0} {return 0}<br><br> ##now, proceed to the actual actions the bot will take<br><br>   #If the dude is an op, check for protect_ops and give warning if so. if not enabled, treat him as a regular user<br>   if {([matchattr $hand o|o $chan]) || ([isop $nick $chan])} {<br>     if {$chanpro(protect_ops) == 1} {<br>       putserv "[subst $chanpro(op_method)] :[subst $chanpro(op_bold)]"<br>       return 1<br>     }<br>   }<br><br>   #create a timer for the violation, kick/ban..<br>   if {![info exists bold_count($uhost:$chan)]} {<br>     set bold_count($uhost:$chan) 0<br>   }<br>   incr bold_count($uhost:$chan)<br>   timer $chanpro(remember) {unset bold_count($uhost:$chan); putlog "removed timer for $uhost in $chan"}<br>   if {$bold_count($uhost:$chan) == 1} {putserv "[subst $chanpro(warning_method)] :[subst $chanpro(warn_bold)]"}<br>   if {$bold_count($uhost:$chan) == 2} {putserv "KICK $chan $nick :[subst $chanpro(kick_bold)]"}<br>   if {$bold_count($uhost:$chan) == 3} {<br>     set bmask [maskhost [getchanhost $nick $chan]]<br>     set bmask [format "*!*%s" [string range $bmask 2 [string length $bmask]]]<br>     newchanban $chan $bmask $botnick [subst $chanpro(ban_bold)] $chanpro(ban_time_bold)<br>     putserv "KICK $chan $nick :[subst $chanpro(ban_bold)]"<br>     set bold_count($uhost:$chan) 2<br>   }<br><br>} ;#end proc<br><br><br>#CHECK_UNDERLINE<br>proc check_underline {nick uhost hand chan args} {<br><br> #load some global variables<br> global chanpro underline_count botnick<br><br> #check if bold-check is disabled, if so - return<br> if {$chanpro(underline) == 0} {return 0}<br><br> ##now, proceed to the actual actions the bot will take<br><br>   #If the dude is an op, check for protect_ops and give warning if so. if not enabled, treat him as a regular user<br>   if {([matchattr $hand o|o $chan]) || ([isop $nick $chan])} {<br>     if {$chanpro(protect_ops) == 1} {<br>       putserv "[subst $chanpro(op_method)] :[subst $chanpro(op_underline)]"<br>       return 1<br>     }<br>   }<br><br>   #create a timer for the violation, kick/ban..<br>   if {![info exists underline_count($uhost:$chan)]} {<br>     set underline_count($uhost:$chan) 0<br>   }<br>   incr underline_count($uhost:$chan)<br>   timer $chanpro(remember) {unset underline_count($uhost:$chan); putlog "removed timer for $uhost in $chan"}<br>   if {$underline_count($uhost:$chan) == 1} {putserv "[subst $chanpro(warning_method)] :[subst $chanpro(warn_underline)]"}<br>   if {$underline_count($uhost:$chan) == 2} {putserv "KICK $chan $nick :[subst $chanpro(kick_underline)]"}<br>   if {$underline_count($uhost:$chan) == 3} {<br>     set bmask [maskhost [getchanhost $nick $chan]]<br>     set bmask [format "*!*%s" [string range $bmask 2 [string length $bmask]]]<br>     newchanban $chan $bmask $botnick [subst $chanpro(ban_underline)] $chanpro(ban_time_underline)<br>     putserv "KICK $chan $nick :[subst $chanpro(ban_underline)]"<br>     set underline_count($uhost:$chan) 2<br>   }<br><br>} ;#end proc<br><br><br>##CHECK_ANNOY<br>proc check_annoy {nick uhost hand chan args} {<br><br> #load some global variables<br> global chanpro annoy_count botnick<br> <br> #set the annoy variable<br> set annoy 0<br> <br> #check if annoy-check is disabled, if so - return<br> if {$chanpro(annoy) == 0} {return 0}<br><br> #check each char with a loop<br> foreach word [split $args] { <br>    foreach letter [split $word ""] {<br>       if {($letter == "?") || ($letter == "!") || ($letter == "@") || ($letter == "~") || ($letter == "%") || ($letter == "#")} {incr annoy}<br>    }<br>    <br>    #checks if the length of the annoy is huge enough<br>    if {$annoy &gt;= $chanpro(annoy_length)} {continue} else {set annoy 0}<br> }<br> <br> #check if the annoy was big enough<br> if {!($annoy &gt;= $chanpro(annoy_length))} {return 0}<br> <br>   ##now, proceed to the actual actions the bot will take<br>   <br>   #If the dude is an op, check for protect_ops and give warning if so. if not enabled, treat him as a regular user<br>   if {([matchattr $hand o|o $chan]) || ([isop $nick $chan])} {<br>    if {$chanpro(protect_ops) == 1} {<br>       putserv "[subst $chanpro(op_method)] :[subst $chanpro(op_annoy)]"<br>       return 1<br>     }<br>   }<br><br>   #create a timer for the violation, kick/ban..<br>   if {![info exists annoy_count($uhost:$chan)]} {<br>     set annoy_count($uhost:$chan) 0<br>   }<br>   incr annoy_count($uhost:$chan)<br>   timer $chanpro(remember) {unset annoy_count($uhost:$chan); putlog "removed timer for $uhost in $chan"}<br>   if {$annoy_count($uhost:$chan) == 1} {putserv "[subst $chanpro(warning_method)] :[subst $chanpro(warn_annoy)]"}<br>   if {$annoy_count($uhost:$chan) == 2} {putserv "KICK $chan $nick :[subst $chanpro(kick_annoy)]"}<br>   if {$annoy_count($uhost:$chan) == 3} {<br>     set bmask [maskhost [getchanhost $nick $chan]]<br>     set bmask [format "*!*%s" [string range $bmask 2 [string length $bmask]]]<br>     newchanban $chan $bmask $botnick [subst $chanpro(ban_annoy)] $chanpro(ban_time_annoy)<br>     putserv "KICK $chan $nick :[subst $chanpro(ban_annoy)]"<br>     set annoy_count($uhost:$chan) 2<br>   }<br><br>} ;#end proc<br><br>It is necessary to add exemptions kick/ban for other bot (+b|-). Can someone guide me..<br><br>Thanks. <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=402">blood_x</a> — Fri Dec 27, 2002 1:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[blood_x]]></name></author>
		<updated>2002-12-23T12:58:58-04:00</updated>

		<published>2002-12-23T12:58:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=14535#p14535</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=14535#p14535"/>
		<title type="html"><![CDATA[Channel Protection v1.1 Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=14535#p14535"><![CDATA[
Currently, I used Channel Protection v1.1 written by Daniel Skovli and can be found in tcl archive. This TCL script protect channel from bold, underline, color, public notice and caps lock. When, I do botnet link, and run this script into both eggdrop (bot A and bot B), this TCL script kick among them. Eg. when bot A using BOLD character in #mychannel, bot B kick bot A (reason: No Bold Allowed In #mychannel). In other word, this TCL script can't protect other bot from doing such things or there's NO exemptions flag for bot in this TCL script.<br><br>How to add an exemption flags for bot (+b) in this TCL script?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=402">blood_x</a> — Mon Dec 23, 2002 12:58 pm</p><hr />
]]></content>
	</entry>
	</feed>
