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

	<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>2005-11-18T14:16:35-04:00</updated>

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

		<entry>
		<author><name><![CDATA[r0t3n]]></name></author>
		<updated>2005-11-18T14:16:35-04:00</updated>

		<published>2005-11-18T14:16:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=57576#p57576</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=57576#p57576"/>
		<title type="html"><![CDATA[request error]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=57576#p57576"><![CDATA[
Ok, the errors<br><div class="codebox"><p>Code: </p><pre><code>&lt;Tosser&gt; !request #chanserv* aP|Request has joined #chanserv* aP|Request has left #chanserv&lt;aP|Request&gt; [19:11] joined #chanserv but didn't want to!&lt;Tosser&gt; !bots&lt;aP|Request&gt; [19:13] Tcl error [::request::bots]: missing "&lt;aP|Request&gt; [19:13] Tcl error [::request::bots]: missing "&lt;Tosser&gt; !rules-aP|Request- Only 1 bot allowed per channel&lt;aP|Request&gt; [19:14] Tcl error [::request::rules]: can't read "request::service": no such variable&lt;aP|Request&gt; [19:14] Tcl error [::request::rules]: can't read "request::service": no such variable</code></pre></div>Now, the code<br><div class="codebox"><p>Code: </p><pre><code>namespace eval request {# copyright info, dont change these variables, or make your own request scriptvariable author "Tosser"variable version "1.0.0.0"# what trigger would you like, for example !requestvariable trigger "!request"# this is where you set the requirements# do you need a network/channel service, for example the Q/L bot on quakenet [1=yes/0=no]variable service "1"# how many users are neededvariable needed "30"# set here the flags the bot needs on Q/L if variable service is set to 1variable flags "ao"### please note, this script does not include a clonescan !!# set here your home channel, please note this will be the only channel people can request fromvariable homechan "#antipjen"##### DONT NOT TOUCH THIS VARIABLE !!variable busy "0"# the binds, there is no need to change these binds# public (channel) bindsbind pub -|- "$trigger" [namespace current]::requestbind pub -|- "!bots" [namespace current]::botsbind pub -|- "!rules" [namespace current]::rules# The bot managment bind, allows you the user to message the bot to add/remove/list requestable botsbind msg -|- "request" [namespace current]::management}setudef flag requestproc request::bots {nickname hostname handle channel arg} {  set requestable {}  foreach user [userlist] {    if {[matchattr $user b] &amp;&amp; [matchattr $user R]} {      lappend requestable [hand2nick $user]    }  }  putserv "NOTICE $nickname :Here is a list of my requestable bots:"  putserv "NOTICE $nickname :[join $requestable ", "]""}proc request::rules {nickname hostname handle channel arg} {  putserv "NOTICE $nickname :Only 1 bot allowed per channel"  putserv "NOTICE $nickname :The bot must have +$request::flags on Q/L"  putserv "NOTICE $nickname :The bot must have op on the channel at all times"  putserv "NOTICE $nickname :You are not allowed to deop/ban/kick the bot at any time for any reason"  putserv "NOTICE $nickname :If you dont agree to these rules, then dont not request a bot"  putserv "NOTICE $nickname :If any of these rules are broken, for any reason, then your channel will be shitlisted"  putserv "NOTICE $nickname :Please note, an admin can remove/shitlist your channel at any time for any reason without any notice"}proc request::request {nickname hostname handle channel text} {  if {![channel get $request::homechan request]} {    putserv "NOTICE $nickname :Sorry, but request is currenty offline"    } elseif {![string match -nocase $request::homechan $channel]} {    putserv "NOTICE $nickname :Error: you can only request a bot from my homechannel, which is $request::homechan"    } elseif {![string match -nocase "*users.quakenet.org" $hostname]} {    putserv "NOTICE $nickname :Sorry, but you need to be authed with Q and have mode +x set before you can request a bot"    } elseif {$request::busy == "1"} {    putserv "NOTICE $nickname :Sorry, but another request is taking place, please wait a few seconds"    } else {    set thechan [lindex [split $text] 0]    if {$thechan == ""} {      putserv "NOTICE $nickname :Please enter a channel name using !request #channel"      return 0    }    if {[string index $thechan 0] != "#"} {      putserv "NOTICE $nickname :Please enter a channel name starting with '#' using !request #channel"      return 0    }    set request::busy "1"    request::check $nickname $hostname $thechan  }}proc request::check {nickname hostname thechan} {  if {$request::busy} {    if {![validchan $thechan]} {       channel add $thechan      foreach user [userlist bR] {        if {[onchan [hand2nick $user] $thechan]} {          putserv "NOTICE $nickname :Request failed: Bot $user in already on $thechan"          putlog "Request failed: Channel: $thechan By: $nickname \($hostname\) Reason: $user was on $thechan"          channel remove $thechan          set request::busy "0"          save          return 0        }      }      if {![onchan $nickname $thechan]} {        putserv "NOTICE $nickname :Request failed: You are not on $thechan"        putlog "Request failed: Channel: $thechan By: $nickname \($hostname\) Reason: not on $thechan"        channel remove $thechan        set request::busy "0"        save        return 0      }      if {![isop $nickname $thechan]} {        putserv "NOTICE $nickname :Request failed: You are not opped on $thechan"        putlog "Request failed: Channel: $thechan By: $nickname \($hostname\) Reason: not opped on $thechan"        channel remove $thechan        set request::busy "0"        save        return 0      }      if {![onchan L $thechan] &amp;&amp; ![onchan Q $thechan]} {        putserv "NOTICE $nickname :Request failed: No Q/L found on $thechan"        putlog "Request failed: Channel: $thechan By: $nickname \($hostname\) Reason: No Q/L found on $thechan"        channel remove $thechan        set request::busy "0"        save        return 0      }      if {[llength [chanlist $thechan]] &lt; $request::needed} {        putserv "NOTICE $nickname :Request failed: There is not enough users on $thechan"        putlog "Request failed: Channel: $thechan By: $nickname \($hostname\) Reason: less than $request::needed users"        channel remove $thechan        set request::busy "0"        save        return 0      }      if {[llength [bots]] &gt;= 1} {        set bot [lindex [bots] [rand [llength [bots]]]]        putbot $bot "addchan $thechan $nickname $hostname"        putserv "NOTICE $nickname :Request accepted: bot [hand2nick $bot] should join $thechan soon, if [hand2nick $bot] does not join, please report this to an admin in $request::homechan"      }    }  }}putlog "Request.tcl v$request::version by $request::author loaded !!"</code></pre></div>I can't seem to find any errors within the code, so i dont know whats wrong.<br><br>Thanks in advance <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>Chris <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=6300">r0t3n</a> — Fri Nov 18, 2005 2:16 pm</p><hr />
]]></content>
	</entry>
	</feed>
