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

	<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>2024-11-28T03:04:59-04:00</updated>

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

		<entry>
		<author><name><![CDATA[aslpls]]></name></author>
		<updated>2024-11-28T03:04:59-04:00</updated>

		<published>2024-11-28T03:04:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=113165#p113165</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=113165#p113165"/>
		<title type="html"><![CDATA[Re: registerednick.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=113165#p113165"><![CDATA[
Thank you Crazycat, i got it, it is now working good. thank you for your answer.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12622">aslpls</a> — Thu Nov 28, 2024 3:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[aslpls]]></name></author>
		<updated>2024-11-28T02:49:55-04:00</updated>

		<published>2024-11-28T02:49:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=113164#p113164</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=113164#p113164"/>
		<title type="html"><![CDATA[Re: registerednick.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=113164#p113164"><![CDATA[
I've tried to change to channel to chan and it seem it is ok now for the <strong class="text-strong">first issue</strong><br><div class="codebox"><p>Code: </p><pre><code>   proc public {nick uhost hand chan text} {       if {[scan $text {%s} mode] != 1} {         puthelp "PRIVMSG $chan :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: !checkisreg on|off"         return       }       doAction $mode $chan $chan    }    proc message {nick uhost hand chan text} {       if {[scan $text {%s%s} mode chan] != 2} {          puthelp "PRIVMSG $nick :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: checkisreg #channel on|off"          return       }       if {[string first # $chan] != 0} {          puthelp "PRIVMSG $nick :\037ERROR\037: Provided channel doesn't seem to correct. \037SYNTAX\037: checkisreg #channel on|off"          return       }       doAction $mode $chan $nick    }    proc doAction {mode chan dest} {       if {![validchan $chan] || ![botonchan $chan]} {          puthelp "PRIVMSG $dest ::\037ERROR\037: Channel $chan doesn't exist in my database or I'm not on it."          return       }       set status [channel get $chan checkisauth]       switch -- [string tolower $mode] {          "on" {             if {$status} {                puthelp "PRIVMSG $dest :\037ERROR\037: This setting is already enabled."             } else {                channel set $chan +checkisauth                puthelp "PRIVMSG $dest :Enabled Automatic Register Checking for $chan"             }          }</code></pre></div><br><br>&lt;@aslpls&gt; !checkisreg on<br>&lt;@Botname&gt; ERROR: This setting is already enabled.<br><br>so tried again;<br><br><br>&lt;@aslplss&gt; !checkisreg off<br>&lt;@Botname&gt; Disabled Automatic Register Checking for #test<br><br><br>&lt;@aslpls&gt; !checkisreg on<br>&lt;@Botname&gt; Enabled Automatic Register Checking for #test<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12622">aslpls</a> — Thu Nov 28, 2024 2:49 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[aslpls]]></name></author>
		<updated>2024-11-28T02:42:14-04:00</updated>

		<published>2024-11-28T02:42:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=113162#p113162</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=113162#p113162"/>
		<title type="html"><![CDATA[Re: registerednick.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=113162#p113162"><![CDATA[
Hello, Crazycat.. thank you for your reply. I understand what is your comments.. but my problem is i do not know on how to correct the code..  <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=12622">aslpls</a> — Thu Nov 28, 2024 2:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2024-11-27T09:20:29-04:00</updated>

		<published>2024-11-27T09:20:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=113160#p113160</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=113160#p113160"/>
		<title type="html"><![CDATA[Re: registerednick.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=113160#p113160"><![CDATA[
For the first error, I think it's in doAction that there is a trouble:<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-dark-reasonable.min.css"> <strong>script</strong>  <strong>script</strong> <div class="codebox"><pre><code class="language-tcl">proc doAction {mode chan dest} {       if {![validchan $channel] || ![botonchan $channel]} {          puthelp "PRIVMSG $dest ::\037ERROR\037: Channel $chan doesn't exist in my database or I'm not on it."          return       }</code></pre></div> <strong>script</strong> It get the arg "chan" but your condition uses the $channel variable.<br><br>For the second: the message proc is defined as if it was for a public one, the defintion to use is:<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-dark-reasonable.min.css"> <strong>script</strong>  <strong>script</strong> <div class="codebox"><pre><code class="language-tcl">proc message {nick uhost hand text} {</code></pre></div> <strong>script</strong> <p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Wed Nov 27, 2024 9:20 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[aslpls]]></name></author>
		<updated>2024-11-27T08:33:26-04:00</updated>

		<published>2024-11-27T08:33:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=113159#p113159</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=113159#p113159"/>
		<title type="html"><![CDATA[registerednick.tcl]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=113159#p113159"><![CDATA[
Hello all, good day. i need help with a small issue from the script.<br><br>the issue is, when you do the commands;<br><br><strong class="text-strong">PUBCMD: !checkisreg on|off<br></strong><span style="color:#FF0000">Tcl error [::RegVoice::public]: can't read "channel": no such variable</span><br><br><br><strong class="text-strong">MSGCMD: /msg botnick checkisreg #channel on|off</strong><br><span style="color:#FF0000">Tcl error [::RegVoice::message]: wrong # args: should be "::RegVoice::message nick uhost hand chan text"<br></span><br><br><div class="codebox"><p>Code: </p><pre><code># SYNTAX (on PartyLine/DCC/CTCP/TELnet): .chanset #channel -/+checkisauth# ----------# PUBCMD:# !checkisreg on|off# ----------# MSGCMD:# /msg botnick checkisreg #channel on|offnamespace eval RegVoice {    variable verifieduser "*has identified for*"    setudef flag checkisauth    bind join - * [namespace current]::joinCheck    bind raw - 307 [namespace current]::isReg    bind pub o|o !checkisreg [namespace current]::public    bind msg o|o checkisreg [namespace current]::message         bind time - * [namespace current]::cleanUp    proc cleanUp {minute hour day month year} {       global checkAuth       if {[info exists checkAuth]} {          foreach nick $checkAuth {             if {![onchan $nick]} {                set pos [lsearch -nocase $nick $checkAuth]                set checkAuth [lreplace $checkAuth $pos $pos]             }          }       }    }         proc joinCheck {nick uhost hand chan} {       global checkAuth       if {[isbotnick $nick]} return       if {![channel get $chan checkisauth] || [validuser $hand]} return       if {[info exists checkAuth]} {          if {[lsearch -nocase $nick $checkAuth] != -1} return       }       lappend checkAuth $nick       puthelp "WHOIS $nick"    }    proc isReg {from keyword text} {       global checkAuth       variable verifieduser       set nick [lindex [split $text] 1]       if {[info exists checkAuth]} {          set pos [lsearch -nocase $nick $checkAuth]          if {$pos != -1} {             set checkAuth [lreplace $checkAuth $pos $pos]          }       }       if {![string match "*has identified for*" $text]} return       if {[validuser [nick2hand $nick]]} return       foreach chan [channels] {if {![channel get $chan checkisauth] || ![onchan $nick $chan] || [isop $nick $chan] || [isvoice $nick $chan]} continue          if {![botisop $chan]} continue          pushmode $chan +v $nick       }    }         proc public {nick uhost hand chan text} {       if {[scan $text {%s} mode] != 1} {         puthelp "PRIVMSG $chan :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: !checkisreg on|off"         return       }       doAction $mode $chan $chan    }    proc message {nick uhost hand chan text} {       if {[scan $text {%s%s} mode channel] != 2} {          puthelp "PRIVMSG $nick :\037ERROR\037: Incorrect Parameters. \037SYNTAX\037: checkisreg #channel on|off"          return       }       if {[string first # $channel] != 0} {          puthelp "PRIVMSG $nick :\037ERROR\037: Provided channel doesn't seem to correct. \037SYNTAX\037: checkisreg #channel on|off"          return       }       doAction $mode $channel $nick    }    proc doAction {mode chan dest} {       if {![validchan $channel] || ![botonchan $channel]} {          puthelp "PRIVMSG $dest ::\037ERROR\037: Channel $chan doesn't exist in my database or I'm not on it."          return       }       set status [channel get $chan checkisauth]       switch -- [string tolower $mode] {          "on" {             if {$status} {                puthelp "PRIVMSG $dest :\037ERROR\037: This setting is already enabled."             } else {                channel set $chan +checkisauth                puthelp "PRIVMSG $dest :Enabled Automatic Register Checking for $chan"             }          }          "off" {             if {!$status} {                puthelp "PRIVMSG $dest :\037ERROR\037: This setting is already disabled."             } else {                channel set $chan -checkisauth                puthelp "PRIVMSG $dest :Disabled Automatic Register Checking for $chan"             }          }          default {             if {![string first # $dest]} {                puthelp "PRIVMSG $dest :\037ERROR\037: $mode is not an accepted parameter. \037SYNTAX\037: !checkisreg on|off"             } else {                puthelp "PRIVMSG $dest :\037ERROR\037: $mode is not an accepted parameter. \037SYNTAX\037: checkisreg #channel on|off"             }          }       }    } }  putlog "registerednick.tcl Loaded"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12622">aslpls</a> — Wed Nov 27, 2024 8:33 am</p><hr />
]]></content>
	</entry>
	</feed>
