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

	<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>2020-07-26T22:21:23-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2020-07-26T22:21:23-04:00</updated>

		<published>2020-07-26T22:21:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108776#p108776</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108776#p108776"/>
		<title type="html"><![CDATA[tcl recognizes with temporary access for nicks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108776#p108776"><![CDATA[
it was fixed so that it recognizes nicknames with special characters. [] {} <br>thanks for your help.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><div class="codebox"><p>Code: </p><pre><code># recognise.tcl  for arfer DALnet channel #atlantis  # ------------------------------------------------------------------------------------------------------------------- ## -------------------- syntax --------------------------------------------------------------------------------------- # # syntax assuming default command 'recognise'# /msg &lt;botnick&gt; recognise &lt;password&gt; # ------------------------------------------------------------------------------------------------------------------- ## -------------------- configuration -------------------------------------------------------------------------------- # # set here the \msg command to useset vRecogniseCommand "access" # set here the password, only a - z, A - Z, 0 - 9 (6 characters minimum)set vRecognisePassword "PaSSord27" # set here how long in minutes the bot should recognise you 180 min. = 3 hoursset vRecogniseTime 180 # ------------------------------------------------------------------------------------------------------------------- ## -------------------- code ----------------------------------------------------------------------------------------- # set vRecogniseVersion 1.0 bind MSG - $vRecogniseCommand pRecogniseCommand proc pRecogniseCommand {nick uhost hand text} {    global vRecognisePassword    if {[regexp -nocase -- {^[a-z0-9]{6,}$} $vRecognisePassword]} {        set arguments [regsub -all -- {\s{2,}} [stripcodes bcruag [string trim $text]] { }]        if {[llength [split $arguments]] == 1} {            if {[string equal $arguments $vRecognisePassword]} {                if {[onchan $nick]} {                    pRecognisePromote $nick $uhost                } else {pRecogniseOutput 001 $nick $hand 0}            } else {pRecogniseOutput 002 $nick $hand $arguments}        } else {pRecogniseOutput 003 $nick $hand 0}    } else {pRecogniseOutput 004 $nick $hand 0}    return 0} proc pRecogniseOutput {number nick hand xtra1} {    global vRecogniseCommand vRecogniseTime    switch -- $number {        001 {set output "-error- you must be on a bot channel to use this command"}        002 {set output "-error- password $xtra1 not recognised"}        003 {set output "-error- correct usage /msg &lt;botnick&gt; $vRecogniseCommand &lt;password&gt;"}        004 {set output "-error- incorrectly configured password in script"}        005 {set output "a new userfile record has been temporarily created giving you +n (global owner status). it will be deleted $vRecogniseTime minutes from now"}        006 {set output "the flag +n (global owner status) has been temporarily granted in your userfile record. it will be rescinded $vRecogniseTime minutes from now"}        007 {set output "you are already recognised by the handle $hand as having +n (global owner status)"}        008 {set output "a temporary host $xtra1 has been added to your userfile record giving you +n (global owner status). it will be removed $vRecogniseTime minutes from now"}        default {}    }    putserv "NOTICE $nick :$output"    return 0} proc pRecognisePromote {nick uhost} {    global vRecogniseTime    scan $uhost {%[^@]@%s} user host    set user [string trimleft $user ~]    set mask *!*$user@[pRecogniseMaskhost $host]    switch -- [validuser $nick] {        0 {             # nick not in userfile and host not recognised            # create user record with +n            if {[string equal [nick2hand $nick] \*]} {                set hand $nick                adduser $hand $hand!*@*                chattr $hand +n                save                pRecogniseOutput 005 $nick $hand 0                timer $vRecogniseTime [list pRecogniseDemote $nick $hand 001]             # nick not in userfile but host recognised            } else {                set hand [nick2hand $nick]                 # hand does not have +n flag                # add +n to userfile record                if {![matchattr [nick2hand $nick] n]} {                    set flags [chattr $hand]                    set hosts [getuser $hand HOSTS]                    chattr $hand +n                    save                    pRecogniseOutput 006 $nick $hand 0                    timer $vRecogniseTime [list pRecogniseDemote $nick $hand 002 $flags $hosts]                 # hand already has +n                # do nothing                } else {pRecogniseOutput 007 $nick $hand 0}            }        }        1 {            set hand $nick            set flags [chattr $hand]            set hosts [getuser $hand HOSTS]             # nick in userfile record but host not recognised            # add host and +n if not already there            if {[string equal [nick2hand $nick] \*]} {                setuser $hand HOSTS $mask                save                if {![matchattr $hand n]} {                    chattr $hand +n                    save                }                pRecogniseOutput 008 $nick $hand $mask                timer $vRecogniseTime [list pRecogniseDemote $nick $hand 002 $flags $hosts]            } else {                 # nick in userfile and host recognised                # add +n if not already there                if  {![matchattr $hand n]} {                    chattr $hand +n                    save                    timer $vRecogniseTime [list pRecogniseDemote $nick $hand 002 $flags $hosts]                 # +n already there                # do nothing                } else {pRecogniseOutput 007 $nick $hand 0}            }        }        default {}    }    return 0} proc pRecogniseDemote {nick hand type {flags ""} {hosts ""}} {    switch -- $type {        001 {             # delete the newly created userfile record            deluser $hand            save        }        002 {             # remove all user flags and reinstate only the ones that existed previously            chattr $hand -nmtaoylgvfpqrdkxjcbwzeuh            chattr $hand +$flags             # remove all hosts and reinstate only the ones that existed previously            setuser $hand HOSTS            foreach host $hosts {                setuser $hand HOSTS $host            }            save        }        default {}    }    return 0} proc pRecogniseMaskhost {host} {    switch -- [regexp -- {^([0-9]{1,3}.){3}[0-9]{1,3}$} $host] {        0 {            switch -- [regexp -all -- {\.} $host] {                0 - 1 {set mask $host}                2 - 3 {set mask *.[join [lrange [split $host .] 1 end] .]}                default {set mask *.[join [lrange [split $host .] 2 end] .]}            }        }        1 {set mask [join [lrange [split $host .] 0 end-1] .].*}        default {}    }    return $mask}putlog "recognise.tcl for arfer version $vRecogniseVersion loaded" # eof</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Sun Jul 26, 2020 10:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2020-01-30T16:43:59-04:00</updated>

		<published>2020-01-30T16:43:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=108006#p108006</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=108006#p108006"/>
		<title type="html"><![CDATA[tcl recognizes with temporary access for nicks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=108006#p108006"><![CDATA[
it doesn't work very well, something is missing or fails, I made immune tests and only the second order adds.<br>on the first request he only responds to me like that, but he doesn't add me as the owner: <div class="codebox"><p>Code: </p><pre><code> -&gt; *JulieTa0* acceso massegg-JulieTa0- a new userfile record has been temporarily created giving you +n (global owner status). it will be deleted 1 minutes from now</code></pre></div>Only on the second request does he add me as an owner, when I launch the same command again<div class="codebox"><p>Code: </p><pre><code>-&gt; *JulieTa0* acceso massegg-JulieTa0- a temporary host *!*Apna@sutter.es has been added to your userfile record giving you +n (global owner status). it will be removed 180 minutes from now.</code></pre></div>I would like to know what the error is because I do not add the owner on the first request<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Thu Jan 30, 2020 4:43 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2018-12-20T21:49:23-04:00</updated>

		<published>2018-12-20T21:49:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=107305#p107305</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=107305#p107305"/>
		<title type="html"><![CDATA[tcl recognizes with temporary access for nicks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=107305#p107305"><![CDATA[
the tcl now does not work correctly<br>To identify myself and have access, I have to give the same command twice, just so it gives me full access<br><br>example in IRCD<br><div class="codebox"><p>Code: </p><pre><code>/msg kantuta access PaSSord27[21:36] -Kantuta- a new userfile record has been temporarily created giving you +n (global owner status). it will be deleted 180 minutes from now/msg kantuta access PaSSord27[21:37] -Kantuta- a temporary host *!*x@x.x.x.* has been added to your userfile record giving you +n (global owner status). it will be removed 180 minutes from now</code></pre></div>Now for it to work you have to give the same command twice<br>before it was only once and you already had access<br>check and everything is fine and when the 180 minutes pass the bot removes access<br>the detail is only that to have access you have to identify twice<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Thu Dec 20, 2018 9:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2018-12-20T22:00:10-04:00</updated>

		<published>2018-01-25T14:53:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106612#p106612</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106612#p106612"/>
		<title type="html"><![CDATA[tcl recognizes with temporary access for nicks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106612#p106612"><![CDATA[
thanks willyw and caesar<br><br>I chose option number two and it worked very well..<br><br>-Kantuta- a temporary host *!*ix@*.wimaxtigo.bo has been added to your userfile record giving you +n (global owner status). it will be removed 180 minutes from now<br><div class="codebox"><p>Code: </p><pre><code># recognise.tcl  for arfer DALnet channel #atlantis  # ------------------------------------------------------------------------------------------------------------------- ## -------------------- syntax --------------------------------------------------------------------------------------- # # syntax assuming default command 'recognise'# /msg &lt;botnick&gt; recognise &lt;password&gt; # ------------------------------------------------------------------------------------------------------------------- ## -------------------- configuration -------------------------------------------------------------------------------- # # set here the \msg command to useset vRecogniseCommand "access" # set here the password, only a - z, A - Z, 0 - 9 (6 characters minimum)set vRecognisePassword "PaSSord27" # set here how long in minutes the bot should recognise you 180 min. = 3 hoursset vRecogniseTime 180 # ------------------------------------------------------------------------------------------------------------------- ## -------------------- code ----------------------------------------------------------------------------------------- # set vRecogniseVersion 1.0 bind MSG - $vRecogniseCommand pRecogniseCommand proc pRecogniseCommand {nick uhost hand text} {    global vRecognisePassword    if {[regexp -nocase -- {^[a-z0-9]{6,}$} $vRecognisePassword]} {        set arguments [regsub -all -- {\s{2,}} [stripcodes bcruag [string trim $text]] { }]        if {[llength [split $arguments]] == 1} {            if {[string equal $arguments $vRecognisePassword]} {                if {[onchan $nick]} {                    pRecognisePromote $nick $uhost                } else {pRecogniseOutput 001 $nick $hand 0}            } else {pRecogniseOutput 002 $nick $hand $arguments}        } else {pRecogniseOutput 003 $nick $hand 0}    } else {pRecogniseOutput 004 $nick $hand 0}    return 0} proc pRecogniseOutput {number nick hand xtra1} {    global vRecogniseCommand vRecogniseTime    switch -- $number {        001 {set output "-error- you must be on a bot channel to use this command"}        002 {set output "-error- password $xtra1 not recognised"}        003 {set output "-error- correct usage /msg &lt;botnick&gt; $vRecogniseCommand &lt;password&gt;"}        004 {set output "-error- incorrectly configured password in script"}        005 {set output "a new userfile record has been temporarily created giving you +n (global owner status). it will be deleted $vRecogniseTime minutes from now"}        006 {set output "the flag +n (global owner status) has been temporarily granted in your userfile record. it will be rescinded $vRecogniseTime minutes from now"}        007 {set output "you are already recognised by the handle $hand as having +n (global owner status)"}        008 {set output "a temporary host $xtra1 has been added to your userfile record giving you +n (global owner status). it will be removed $vRecogniseTime minutes from now"}        default {}    }    putserv "NOTICE $nick :$output"    return 0} proc pRecognisePromote {nick uhost} {    global vRecogniseTime    scan $uhost {%[^@]@%s} user host    set user [string trimleft $user ~]    set mask *!*$user@[pRecogniseMaskhost $host]    switch -- [validuser $nick] {        0 {             # nick not in userfile and host not recognised            # create user record with +n            if {[string equal [nick2hand $nick] \*]} {                set hand $nick                adduser $hand                chattr $hand +n                save                pRecogniseOutput 005 $nick $hand 0                timer $vRecogniseTime [list pRecogniseDemote $nick $hand 001]             # nick not in userfile but host recognised            } else {                set hand [nick2hand $nick]                 # hand does not have +n flag                # add +n to userfile record                if {![matchattr [nick2hand $nick] n]} {                    set flags [chattr $hand]                    set hosts [getuser $hand HOSTS]                    chattr $hand +n                    save                    pRecogniseOutput 006 $nick $hand 0                    timer $vRecogniseTime [list pRecogniseDemote $nick $hand 002 $flags $hosts]                 # hand already has +n                # do nothing                } else {pRecogniseOutput 007 $nick $hand 0}            }        }        1 {            set hand $nick            set flags [chattr $hand]            set hosts [getuser $hand HOSTS]             # nick in userfile record but host not recognised            # add host and +n if not already there            if {[string equal [nick2hand $nick] \*]} {                setuser $hand HOSTS $mask                save                if {![matchattr $hand n]} {                    chattr $hand +n                    save                }                pRecogniseOutput 008 $nick $hand $mask                timer $vRecogniseTime [list pRecogniseDemote $nick $hand 002 $flags $hosts]            } else {                 # nick in userfile and host recognised                # add +n if not already there                if  {![matchattr $hand n]} {                    chattr $hand +n                    save                    timer $vRecogniseTime [list pRecogniseDemote $nick $hand 002 $flags $hosts]                 # +n already there                # do nothing                } else {pRecogniseOutput 007 $nick $hand 0}            }        }        default {}    }    return 0} proc pRecogniseDemote {nick hand type {flags ""} {hosts ""}} {    switch -- $type {        001 {             # delete the newly created userfile record            deluser $hand            save        }        002 {             # remove all user flags and reinstate only the ones that existed previously            chattr $hand -nmtaoylgvfpqrdkxjcbwzeuh            chattr $hand +$flags             # remove all hosts and reinstate only the ones that existed previously            setuser $hand HOSTS            foreach host $hosts {                setuser $hand HOSTS $host            }            save        }        default {}    }    return 0} proc pRecogniseMaskhost {host} {    switch -- [regexp -- {^([0-9]{1,3}.){3}[0-9]{1,3}$} $host] {        0 {            switch -- [regexp -all -- {\.} $host] {                0 - 1 {set mask $host}                2 - 3 {set mask *.[join [lrange [split $host .] 1 end] .]}                default {set mask *.[join [lrange [split $host .] 2 end] .]}            }        }        1 {set mask [join [lrange [split $host .] 0 end-1] .].*}        default {}    }    return $mask}putlog "recognise.tcl for arfer version $vRecogniseVersion loaded" # eof</code></pre></div>changes;<div class="codebox"><p>Code: </p><pre><code>line 105  addhost $hand $mask  it changed to    setuser $hand HOSTS $maskline 149addhost $hand $host    it changed to   setuser $hand HOSTS $host</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Thu Jan 25, 2018 2:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2018-01-25T01:53:51-04:00</updated>

		<published>2018-01-25T01:53:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106610#p106610</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106610#p106610"/>
		<title type="html"><![CDATA[tcl recognizes with temporary access for nicks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106610#p106610"><![CDATA[
If you have looked inside <em class="text-italics">scripts/compact.tcl</em> as willyw said you would have seen the:<div class="codebox"><p>Code: </p><pre><code>proc addhost {hand host} {  setuser $hand HOSTS $host}</code></pre></div>So you have two options:<br>a) load that compat.tcl in your eggdrop.conf file<br>b) change the 'addhost $hand $host' lines with 'setuser $hand HOSTS $host' inside the script you use.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu Jan 25, 2018 1:53 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2018-01-24T17:08:40-04:00</updated>

		<published>2018-01-24T17:08:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106609#p106609</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106609#p106609"/>
		<title type="html"><![CDATA[Re: tcl recognizes with temporary access for nicks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106609#p106609"><![CDATA[
line 105<div class="codebox"><p>Code: </p><pre><code> addhost $hand $mask</code></pre></div> <br>line 149<div class="codebox"><p>Code: </p><pre><code> addhost $hand $host</code></pre></div> <br><br>replace and it does not work<br><br>line 105<div class="codebox"><p>Code: </p><pre><code> HOSTS $hand $mask</code></pre></div>line 149 <div class="codebox"><p>Code: </p><pre><code> HOSTS $hand $host</code></pre></div> <br><br><br>and I do not use or have activated the compat.tcl  never used that tcl<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Wed Jan 24, 2018 5:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2018-01-24T11:42:10-04:00</updated>

		<published>2018-01-24T11:42:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106608#p106608</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106608#p106608"/>
		<title type="html"><![CDATA[Re: tcl recognizes with temporary access for nicks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106608#p106608"><![CDATA[
I think that addhost is an old command, no longer used.  It has been replaced.<br><br>You have a few options, as to how to proceed.<br><br>The 'right' way would be look up the newer command, see how it works, and edit the script - replacing the old addhost command with the new one.<br><br>Next, you could look in your bot's scripts/ dir for a script named <br>compat.tcl<br>Text search it for addhost, and find a proc named addhost.   You could just copy that one proc from compat.tcl and paste it in your script, thus loading proc addhost when you rehash or start your bot.<br><br>Lastly, you could look in eggdrop.conf  for a line like this:<br>#source scripts/compat.tcl<br>and it is probably commented out, just like the above line.<br>If you uncomment it, and rehash your bot, that too will load the addhost proc - along with everything else in compat.tcl too, though.  Notice in the comment in eggdrop.conf the brief warning about doing that.<br><br>Visit:<br><a href="http://docs.eggheads.org/mainDocs/tcl-commands.html" class="postlink">http://docs.eggheads.org/mainDocs/tcl-commands.html</a><br>and text search it for: <br>setuser<br>command, and read about it.<br><br>I hope this helps.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Wed Jan 24, 2018 11:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2018-01-23T17:25:25-04:00</updated>

		<published>2018-01-23T17:25:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106607#p106607</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106607#p106607"/>
		<title type="html"><![CDATA[tcl recognizes with temporary access for nicks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106607#p106607"><![CDATA[
this tcl recognizes with temporary access to the one who gives him a password..<br><br>the error it gives in partyline<div class="codebox"><p>Code: </p><pre><code>[16:01:44] Tcl error [pRecogniseCommand]: invalid command name "addhost"</code></pre></div>Some friend who can help me.<br><div class="codebox"><p>Code: </p><pre><code># recognise.tcl  for arfer DALnet channel #atlantis  # ------------------------------------------------------------------------------------------------------------------- ## -------------------- syntax --------------------------------------------------------------------------------------- # # syntax assuming default command 'recognise'# /msg &lt;botnick&gt; recognise &lt;password&gt; # ------------------------------------------------------------------------------------------------------------------- ## -------------------- configuration -------------------------------------------------------------------------------- # # set here the \msg command to useset vRecogniseCommand "access" # set here the password, only a - z, A - Z, 0 - 9 (6 characters minimum)set vRecognisePassword "PaSSord27" # set here how long in minutes the bot should recognise you 180 min. = 3 hoursset vRecogniseTime 180 # ------------------------------------------------------------------------------------------------------------------- ## -------------------- code ----------------------------------------------------------------------------------------- # set vRecogniseVersion 1.0 bind MSG - $vRecogniseCommand pRecogniseCommand proc pRecogniseCommand {nick uhost hand text} {    global vRecognisePassword    if {[regexp -nocase -- {^[a-z0-9]{6,}$} $vRecognisePassword]} {        set arguments [regsub -all -- {\s{2,}} [stripcodes bcruag [string trim $text]] { }]        if {[llength [split $arguments]] == 1} {            if {[string equal $arguments $vRecognisePassword]} {                if {[onchan $nick]} {                    pRecognisePromote $nick $uhost                } else {pRecogniseOutput 001 $nick $hand 0}            } else {pRecogniseOutput 002 $nick $hand $arguments}        } else {pRecogniseOutput 003 $nick $hand 0}    } else {pRecogniseOutput 004 $nick $hand 0}    return 0} proc pRecogniseOutput {number nick hand xtra1} {    global vRecogniseCommand vRecogniseTime    switch -- $number {        001 {set output "-error- you must be on a bot channel to use this command"}        002 {set output "-error- password $xtra1 not recognised"}        003 {set output "-error- correct usage /msg &lt;botnick&gt; $vRecogniseCommand &lt;password&gt;"}        004 {set output "-error- incorrectly configured password in script"}        005 {set output "a new userfile record has been temporarily created giving you +n (global owner status). it will be deleted $vRecogniseTime minutes from now"}        006 {set output "the flag +n (global owner status) has been temporarily granted in your userfile record. it will be rescinded $vRecogniseTime minutes from now"}        007 {set output "you are already recognised by the handle $hand as having +n (global owner status)"}        008 {set output "a temporary host $xtra1 has been added to your userfile record giving you +n (global owner status). it will be removed $vRecogniseTime minutes from now"}        default {}    }    putserv "NOTICE $nick :$output"    return 0} proc pRecognisePromote {nick uhost} {    global vRecogniseTime    scan $uhost {%[^@]@%s} user host    set user [string trimleft $user ~]    set mask *!*$user@[pRecogniseMaskhost $host]    switch -- [validuser $nick] {        0 {             # nick not in userfile and host not recognised            # create user record with +n            if {[string equal [nick2hand $nick] \*]} {                set hand $nick                adduser $hand                chattr $hand +n                save                pRecogniseOutput 005 $nick $hand 0                timer $vRecogniseTime [list pRecogniseDemote $nick $hand 001]             # nick not in userfile but host recognised            } else {                set hand [nick2hand $nick]                 # hand does not have +n flag                # add +n to userfile record                if {![matchattr [nick2hand $nick] n]} {                    set flags [chattr $hand]                    set hosts [getuser $hand HOSTS]                    chattr $hand +n                    save                    pRecogniseOutput 006 $nick $hand 0                    timer $vRecogniseTime [list pRecogniseDemote $nick $hand 002 $flags $hosts]                 # hand already has +n                # do nothing                } else {pRecogniseOutput 007 $nick $hand 0}            }        }        1 {            set hand $nick            set flags [chattr $hand]            set hosts [getuser $hand HOSTS]             # nick in userfile record but host not recognised            # add host and +n if not already there            if {[string equal [nick2hand $nick] \*]} {                addhost $hand $mask                save                if {![matchattr $hand n]} {                    chattr $hand +n                    save                }                pRecogniseOutput 008 $nick $hand $mask                timer $vRecogniseTime [list pRecogniseDemote $nick $hand 002 $flags $hosts]            } else {                 # nick in userfile and host recognised                # add +n if not already there                if  {![matchattr $hand n]} {                    chattr $hand +n                    save                    timer $vRecogniseTime [list pRecogniseDemote $nick $hand 002 $flags $hosts]                 # +n already there                # do nothing                } else {pRecogniseOutput 007 $nick $hand 0}            }        }        default {}    }    return 0} proc pRecogniseDemote {nick hand type {flags ""} {hosts ""}} {    switch -- $type {        001 {             # delete the newly created userfile record            deluser $hand            save        }        002 {             # remove all user flags and reinstate only the ones that existed previously            chattr $hand -nmtaoylgvfpqrdkxjcbwzeuh            chattr $hand +$flags             # remove all hosts and reinstate only the ones that existed previously            setuser $hand HOSTS            foreach host $hosts {                addhost $hand $host            }            save        }        default {}    }    return 0} proc pRecogniseMaskhost {host} {    switch -- [regexp -- {^([0-9]{1,3}.){3}[0-9]{1,3}$} $host] {        0 {            switch -- [regexp -all -- {\.} $host] {                0 - 1 {set mask $host}                2 - 3 {set mask *.[join [lrange [split $host .] 1 end] .]}                default {set mask *.[join [lrange [split $host .] 2 end] .]}            }        }        1 {set mask [join [lrange [split $host .] 0 end-1] .].*}        default {}    }    return $mask}putlog "recognise.tcl for arfer version $vRecogniseVersion loaded" # eof</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Tue Jan 23, 2018 5:25 pm</p><hr />
]]></content>
	</entry>
	</feed>
