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

	<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-01-23T02:26:55-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Havok]]></name></author>
		<updated>2012-12-15T18:47:05-04:00</updated>

		<published>2012-12-15T18:47:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100442#p100442</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100442#p100442"/>
		<title type="html"><![CDATA[Autokick if hostmask not defined in file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100442#p100442"><![CDATA[
Oh, the last one works great.<br>Thanks buddeh <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12156">Havok</a> — Sat Dec 15, 2012 6:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2012-12-12T23:25:58-04:00</updated>

		<published>2012-12-12T23:25:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100410#p100410</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100410#p100410"/>
		<title type="html"><![CDATA[Autokick if hostmask not defined in file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100410#p100410"><![CDATA[
Hey Havok, are either of those scripts working for you??<br>If not, I may have a script idea that could be what you are looking for.<br>Let me know if you are still wanting me to try to write it?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Wed Dec 12, 2012 11:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Get_A_Fix]]></name></author>
		<updated>2013-01-23T02:26:55-04:00</updated>

		<published>2012-12-10T00:54:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100408#p100408</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100408#p100408"/>
		<title type="html"><![CDATA[Autokick if hostmask not defined in file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100408#p100408"><![CDATA[
I have a similar script to this, which I released some time ago.<br>It basically does exactly what you want, but can also be easily modified if you need.<br><div class="codebox"><p>Code: </p><pre><code># Restricted TCL - istok@IRCSpeed.org# $Id: restricted.tcl,v1 14/08/2010 02:37:42am GMT +12 (NZST) istok Exp $# RECOMMENDED# Please add services to your bot, if you haven't already. (via dcc)# SYNTAX: .+user serv *!*@services.network.etc# SYNTAX: .chattr serv +f# and possibly add a few extra masks...# SYNTAX: .+host serv nickserv!*@*# SYNTAX: .+host serv chanserv!*@*# COMMANDS# --------# !restricted on|off &lt;- public command# /msg botnick restricted #channel on|off &lt;- private command# Set Global trigger here.set trig "!"# Set Global Exempt flags here (default +of (Global Operator, Friend, and above))set gflags of# Set Channel Exempt flags here (default +ovfb (Channel Operator, Voice, Friend, Bot, and above))set cflags ovfb# Set the banmask to use in banning the IPs  # Default banmask is set to 1# 1 - *!*@some.domain.com# 2 - *!*@*.domain.com# 3 - *!*ident@some.domain.com# 4 - *!*ident@*.domain.com# 5 - *!*ident*@some.domain.com# 6 - *nick*!*@*.domain.com# 7 - *nick*!*@some.domain.com# 8 - nick!ident@some.domain.com# 9 - nick!ident@*.host.com# 10 - *!*ident*@*set bantype 1# ---------- No need to edit anything else *YAY* ----------bind pub - ${trig}restricted restrict:pubbind msg - restricted restrict:msgbind join - * restrict:joinproc makeTrig {} {  global trig  return $trig}setudef flag restrictedproc restrict:pub {nick uhost hand chan arg} {  if {[matchattr [nick2hand $nick] o|n $chan]} {    if {[lindex [split $arg] 0] == ""} {putquick "PRIVMSG $chan :ERROR: Incorrect Parameters. SYNTAX: [makeTrig]restricted on/off"; return}    if {[lindex [split $arg] 0] == "on"} {      if {[channel get $chan restricted]} {putquick "PRIVMSG $chan :ERROR: This setting is already enabled."; return}      channel set $chan +restricted      puthelp "PRIVMSG $chan :Enabled Restriction of Users for $chan"      restrict:chan $chan    }    if {[lindex [split $arg] 0] == "off"} {      if {![channel get $chan restricted]} {putquick "PRIVMSG $chan :ERROR: This setting is already disabled."; return}      channel set $chan -restricted      puthelp "PRIVMSG $chan :Disabled Restriction of Users for $chan"    }  }}proc restrict:msg {nick uhost hand arg} {  global botnick  set chan [strlwr [lindex $arg 0]]  if {[matchattr [nick2hand $nick] o|n $chan]} {    if {[lindex [split $arg] 0] == ""} {putquick "NOTICE $nick :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: /msg $botnick restricted #channel on/off"; return}    if {[lindex [split $arg] 1] == ""} {putquick "NOTICE $nick :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: /msg $botnick restricted $chan on/off"; return}    if {[lindex [split $arg] 1] == "on"} {      if {[channel get $chan restricted]} {putquick "NOTICE $nick :\037ERROR\037: This setting is already enabled."; return}      channel set $chan +restricted      putquick "NOTICE $nick :Enabled Restriction of Users for $chan"      restrict:chan $chan    }    if {[lindex [split $arg] 1] == "off"} {      if {![channel get $chan restricted]} {putquick "NOTICE $nick :\037ERROR\037: This setting is already disabled."; return}      channel set $chan -restricted      putquick "NOTICE $nick :Disabled Restriction of Users for $chan"    }  }}proc restrict:chan {chan} {  global gflags cflags  foreach nick [chanlist $chan] {    if {![isbotnick $nick] &amp;&amp; ![matchattr [nick2hand $nick] $gflags|$cflags $chan] &amp;&amp; [channel get $chan restricted] &amp;&amp; [onchan $nick $chan]} {      set uhost [getchanhost $nick $chan]      set banmask [restrict:mask $uhost $nick]      pushmode $chan +b $banmask      putquick "KICK $chan $nick :This Channel has been set \002Restricted\002 - You are now Unwelcome."    }  }  flushmode $chan}proc restrict:join {nick uhost hand chan} {  global gflags cflags  if {![isbotnick $nick] &amp;&amp; ![matchattr [nick2hand $nick] $gflags|$cflags $chan] &amp;&amp; [channel get $chan restricted] &amp;&amp; [onchan $nick $chan]} {    set banmask [restrict:mask $uhost $nick]    putquick "MODE $chan +b $banmask"    putquick "KICK $chan $nick :This is a \002Restricted\002 Channel."  }}proc restrict:mask {uhost nick} {  global bantype  switch -- $bantype {    1 { set mask "*!*@[lindex [split $uhost @] 1]" }    2 { set mask "*!*@[lindex [split [maskhost $uhost] "@"] 1]" }    3 { set mask "*!*$uhost" }    4 { set mask "*!*[lindex [split [maskhost $uhost] "!"] 1]" }    5 { set mask "*!*[lindex [split $uhost "@"] 0]*@[lindex [split $uhost "@"] 1]" }    6 { set mask "*$nick*!*@[lindex [split [maskhost $uhost] "@"] 1]" }    7 { set mask "*$nick*!*@[lindex [split $uhost "@"] 1]" }    8 { set mask "$nick![lindex [split $uhost "@"] 0]@[lindex [split $uhost @] 1]" }    9 { set mask "$nick![lindex [split $uhost "@"] 0]@[lindex [split [maskhost $uhost] "@"] 1]" }    10 { set mask "*!*[lindex [split $uhost "@"] 0]*@*" }    default { set mask "*!*@[lindex [split $uhost @] 1]" }    return $mask  }}putlog "Restricted.TCL Loaded. - istok@IRCSpeed.org"</code></pre></div>Enjoy.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6204">Get_A_Fix</a> — Mon Dec 10, 2012 12:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2012-12-09T17:24:15-04:00</updated>

		<published>2012-12-09T17:24:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100406#p100406</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100406#p100406"/>
		<title type="html"><![CDATA[Autokick if hostmask not defined in file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100406#p100406"><![CDATA[
I noticed the code posted above had a few minor issues, but the whole file concept wasn't really working for Havok.  Thought maybe the script needed to be attacked by a different route, but am currently working on another post. If this post is still open in a day or 2, I may give it a shot:)<br><br>If anyone else wants to give it a shot, I'll stay out of it.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Sun Dec 09, 2012 5:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2012-12-09T15:21:44-04:00</updated>

		<published>2012-12-09T15:21:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100404#p100404</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100404#p100404"/>
		<title type="html"><![CDATA[Autokick if hostmask not defined in file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100404#p100404"><![CDATA[
Question: why do you have that "open file, read all lines then close the file" routine in a loop and not outside the loop? The $text variable is still the same, it's different only if it just got changed while the program was looping, and chances for that to happen are slim.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Sun Dec 09, 2012 3:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Havok]]></name></author>
		<updated>2012-12-09T08:45:27-04:00</updated>

		<published>2012-12-09T08:45:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100402#p100402</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100402#p100402"/>
		<title type="html"><![CDATA[Autokick if hostmask not defined in file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100402#p100402"><![CDATA[
I have experienced a few netsplits, but never that chanserv went missing.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12156">Havok</a> — Sun Dec 09, 2012 8:45 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2012-12-08T23:27:43-04:00</updated>

		<published>2012-12-08T23:27:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100401#p100401</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100401#p100401"/>
		<title type="html"><![CDATA[Autokick if hostmask not defined in file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100401#p100401"><![CDATA[
You must be on a very small and stable network if you have never seen chanserv missing from the channel:)<br><br>On any large network, such as undernet, efnet, dalnet, net splits and other network problems make chanserv unavailable at times.<br><br>Also, any eggdrop script that kicks and does not also set a ban, is just begging to get your bot flooded off irc when the user has 'rejoin on kick' enabled.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Sat Dec 08, 2012 11:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Havok]]></name></author>
		<updated>2012-12-08T23:13:46-04:00</updated>

		<published>2012-12-08T23:13:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100400#p100400</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100400#p100400"/>
		<title type="html"><![CDATA[Autokick if hostmask not defined in file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100400#p100400"><![CDATA[
What do you mean by "When chanserv is missing"?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12156">Havok</a> — Sat Dec 08, 2012 11:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2012-12-08T23:09:07-04:00</updated>

		<published>2012-12-08T23:09:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100399#p100399</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100399#p100399"/>
		<title type="html"><![CDATA[Autokick if hostmask not defined in file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100399#p100399"><![CDATA[
Then, seems to me,  that any kick based on if they have ops in the channel, would need to have a fairly large timer delay from their channel join, to allow chanserv the time to get them opped.<br><br>What's going to happen when chanserv is missing??<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Sat Dec 08, 2012 11:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Havok]]></name></author>
		<updated>2012-12-08T22:44:01-04:00</updated>

		<published>2012-12-08T22:44:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100398#p100398</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100398#p100398"/>
		<title type="html"><![CDATA[Autokick if hostmask not defined in file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100398#p100398"><![CDATA[
They get OP via chanserv when they identify with nickserv.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12156">Havok</a> — Sat Dec 08, 2012 10:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2012-12-08T22:38:23-04:00</updated>

		<published>2012-12-08T22:38:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100397#p100397</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100397#p100397"/>
		<title type="html"><![CDATA[Autokick if hostmask not defined in file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100397#p100397"><![CDATA[
Exactly how are they getting ops in the staff channel??<br>If you are using the bots userfile, maybe the script could just be tied to them having +o in the user file?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Sat Dec 08, 2012 10:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Havok]]></name></author>
		<updated>2012-12-08T21:13:05-04:00</updated>

		<published>2012-12-08T21:13:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100396#p100396</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100396#p100396"/>
		<title type="html"><![CDATA[Autokick if hostmask not defined in file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100396#p100396"><![CDATA[
It works <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br>But the thing is, some of the staff have so their router resets the IP every week, so I have to do that every week. Would be better if it kicked people who wasn't op.<br>But if you count that out, Thanks mate, it works great :3<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12156">Havok</a> — Sat Dec 08, 2012 9:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[doggo]]></name></author>
		<updated>2012-12-08T17:49:42-04:00</updated>

		<published>2012-12-08T17:49:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100395#p100395</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100395#p100395"/>
		<title type="html"><![CDATA[Autokick if hostmask not defined in file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100395#p100395"><![CDATA[
put this together.. not tested but you can do that <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br><div class="codebox"><p>Code: </p><pre><code># http://forum.egghelp.org/viewtopic.php?t=19197 set autokick_channels "#chan1 #chan2" set autokick_exempts "/home/spunky/bot/text/exempt_hosts_kick_out.txt" set autokick_kickmsg "You don't have the access to be on this channel!" bind join -|- "*" autokick:protect bind pub o|o !addhost autokick:add proc autokick:protect { nick uhost hand chan } {    global autokick_exempts autokick_kickmsg autokick_channels        set uhost [string tolower $uhost]                      foreach autokick_channel $autokick_channels {          if {$autokick_channel == $chan} {          set file [open $autokick_exempts "r"]          set text [split [read $file] \n]          close $file          set found [lsearch -glob $text "$uhost"]          if {$found &lt; 0} {                    putserv "KICK $autokick_channel $nick :$autokick_kickmsg"                       }       }    }          } proc autokick:add { nick uhost hand chan target } {    global autokick_exempts autokick_kickmsg autokick_channels            set uhost_add [lindex [split $target] 0]    set uhost_add [string tolower $uhost_add]         foreach autokick_channel $autokick_channels {          if {$autokick_channel == $chan} {          if {$uhost_add == ""} { putserv "privmsg $autokick_channel : \002Usage:\017 !addhost ident@host.name";return }         set file [open $autokick_exempts "r"]          set text [split [read $file] \n]          close $file          set found [lsearch -glob $text "$uhost_add"]          if {$found &lt; 0} {                    set file [open $autokick_exempts "a"]          puts $file $uhost_add          close $file                       putserv "privmsg $autokick_channel :$uhost_add has been added to the exempt list.. "          } else {                    putserv "privmsg $autokick_channel :$uhost_add was already on the exempt list.. "                    }       }    }          } putlog "autokick:protect.tcl loaded"</code></pre></div>whois them and use<br><br>!addhost ~foo@bar <br><br>let me know how it goes..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11046">doggo</a> — Sat Dec 08, 2012 5:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Havok]]></name></author>
		<updated>2012-12-08T15:08:01-04:00</updated>

		<published>2012-12-08T15:08:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100394#p100394</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100394#p100394"/>
		<title type="html"><![CDATA[Autokick if hostmask not defined in file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100394#p100394"><![CDATA[
So, I've been looking for an autokick that kicks nonvoice, nonhops, nonops and so on(normal users) when they try to join the channel, but I haven't found anything :/ So I decided to go here and request something <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br>Let's say that I have a staff channel, and ofc, I don't want former staff to be in it, and I don't want to set +i on it. This sort of script would be a great thing to use for that.<br><br><br>An example config of this/something like this:<br><br>(I'm looking for one that supports one channel only, feel free to make one that supports more <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> )<br>set channel "#channel"<br><br>(the message that will be used when kicking)<br>set reasonmessage "You don't have the access to be on this channel"<br><br>If someone would like to do this, that would be great <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> (this is the only thing I need before I start my eggdrop bot :3)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12156">Havok</a> — Sat Dec 08, 2012 3:08 pm</p><hr />
]]></content>
	</entry>
	</feed>
