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

	<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>2021-09-14T22:54:57-04:00</updated>

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

		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2021-09-14T22:54:57-04:00</updated>

		<published>2021-09-14T22:54:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110337#p110337</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110337#p110337"/>
		<title type="html"><![CDATA[Help about writing userfile]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110337#p110337"><![CDATA[
<blockquote class="uncited"><div><br>...<br>so every change i must .save to overwrite mybot.user files<br>...</div></blockquote>Not exactly.   You <em class="text-italics">may</em>, but you don't <em class="text-italics">have to</em>, because the bot will automatically save the user file periodically.   I believe it is on the hour.<br><br>And the bot will save the user file when it is shut down, if it is shut down properly.  That is, with the .die command.   If it is slammed down with kill -9 from the shell command line, I think then it cannot.<br><br>It can't hurt to use the .save command though.  Especially if you've just made an edit to a user's account in the bot, and you know that you are about to shut it down.   I use the .save command when I log into a brand new bot for the first time, after examining my own account in the bot.   Often, I edit my HOSTS line.   Then I .save,  then I .die the bot.  This way, I can start it again right away, without the -m switch.  If I don't do this, I am apt to forget it and leave the bot running with that -m switch.   <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>Other than that, I rarely use the .save command.<br><br>By the way,  the same applies to the .chan file.  <br><br>I hope this helps.<br>Have fun with your new bot.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Tue Sep 14, 2021 10:54 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ijookeren]]></name></author>
		<updated>2021-09-14T19:52:48-04:00</updated>

		<published>2021-09-14T19:52:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110336#p110336</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110336#p110336"/>
		<title type="html"><![CDATA[Help about writing userfile]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110336#p110336"><![CDATA[
thx for reply..<br><br>i think there is problem with my userfile..<br>i try no tcl..<br>thereis no PASS on userfile..<br><br>there is some delay ?<br><br>EDIT:<br>after ctcp chat with bot<br>and .save command..<br><br>i have PASS in mybot.user<br><br>so every change i must .save to overwrite mybot.user files<br>thanks..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12939">ijookeren</a> — Tue Sep 14, 2021 7:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2021-09-14T17:40:27-04:00</updated>

		<published>2021-09-14T17:40:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110335#p110335</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110335#p110335"/>
		<title type="html"><![CDATA[Help about writing userfile]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110335#p110335"><![CDATA[
I think you've to use $hand rather than $nick for setuser and chattr.<br><div class="codebox"><p>Code: </p><pre><code>setuser $hand PASS $restchattr $hand +G</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Tue Sep 14, 2021 5:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ijookeren]]></name></author>
		<updated>2021-09-14T11:32:10-04:00</updated>

		<published>2021-09-14T11:32:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110334#p110334</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110334#p110334"/>
		<title type="html"><![CDATA[Help about writing userfile]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110334#p110334"><![CDATA[
hi, i confuse about setuser<br><br>i write a simple script<br><div class="codebox"><p>Code: </p><pre><code>bind msg n pass msg_passproc msg_pass {nick uhost hand rest} {global botnickif {![matchattr $nick n]} {putquick "NOTICE $nick :Not Owner"return 0}set rest [lindex $rest 0]if {$rest == ""} {putquick "PRIVMSG $nick :Type /msg $botnick pass &lt;password&gt;"return 0}set pw $restsetuser $nick PASS $rest        chattr $nick +Gputquick "PRIVMSG $nick :pass $nick set to $pw , you can identify for protection!"}</code></pre></div>but it cannot save into mybot.user files.<br><br>and 1 again..<br>first time i connect an eggdrop.. <br>after msg hello word<br>eggdrop ask me to set a password.<br>where i can find the password or change the password..<br><br>when i using [passwdok $nick $pass] its return 0<br>and when i enter first time password its said invalid/wrong password...<br><br>trying with this script<div class="codebox"><p>Code: </p><pre><code>#         Script : Auth v1.03 by David Proper (Dr. Nibble [DrN])#                  Copyright 2002 Radical Computer Systems##       Original#       Platform : Linux 2.0.33#                  Eggdrop v1.2.0+bel1#       Current#      Platforms : Linux 2.2.16    TCL v8.3#                  Eggdrop v1.6.2#                  Eggdrop v1.6.6#            And : SunOS 5.8       TCL v8.3#                  Eggdrop v1.5.4##    Description : Auth allows you to quickly and easily add authentication#                  to channel commands. ## To require a command to need authorization, place this before the actual# procedure, but after any level/access checking:# if {(![authed $hand])} {return 0}##       Features : #                 o Easy method to require password authentication #                 o Expires authentication when they part all bot chans#                 o Expires authentications when they sign-off#                 o Expires authentication when idle over 60 mins unless DCCed#                 o Expires all authentications when connects to a server.#                 o Requires user to be on at least one bot channel to auth.##        History : 05/20/2001 - First Release#                  12/30/2001 - v1.01#                              o Will check to make sure user is on a#                                channel the bot is on before allowing#                                them to authenticate.#                  01/02/2002 - v1.02#                              o Fixed empty string error.#                  12/09/2002 - v1.03#                              o Fixed [die] nick vulerablity###   Future Plans : Hell if I know.##      Donations : https://www.paypal.com/xclick/business=rainbows%40stx.rr.com# (If you don't have PayPal and want to donate, EMail me for an address.#  Will take money or hardware/computer donations)#  Significant (or even non-significant donations) can be published on a#  web site if you so choose.## Author Contact :     Email - DProper@chaotix.net#                   Homepage - http://www.chaotix.net/~dproper#                        IRC - Primary Nick: DrN#                     UseNet - alt.irc.bots.eggdrop# Support Channels: #RCS @UnderNet.Org#                   #RCS @DALnet#                   #RCS @EFnet#                   #RCS @GalaxyNet#                   #RCS @Choatix Addiction#            Other channels - Check contact page for current list##                Current contact information can be located at:#                 http://rcs.chaotix.net/contact.html## New TCL releases are sent to the following sites as soon as they're released:## FTP Site                   | Directory                     # ---------------------------+-------------------------------# ftp.chaotix.net            | /pub/RCS# ftp.eggheads.org           | Various# ftp.realmweb.org           | /drn##   Radical Computer Systems - http://rcs.chaotix.net/# To subscribe to the RCS mailing list:#  http://www.chaotix.net/mailman/listinfo/rcs-list#  ##  Feel free to Email me any suggestions/bug reports/etc.# # You are free to use this TCL/script as long as:#  1) You don't remove or change author credit#  2) You don't release it in modified form. (Only the original)# # If you have a "too cool" modification, send it to me and it'll be# included in the official release. (With your credit)## Commands Added:#  Where     F CMD       F CMD         F CMD        F CMD#  -------   - --------- - ----------- - ---------- - --------- - -------#  Public:   - N/A#     MSG:   - verify    - pubauth     - deauth#     DCC:   - N/A## Public Matching: N/A##\# |##### NOTE: Anything on the Chaotix.Net domain is currently offline#/set authver "v1.02.00"# Set this to the user defined flag to use to indicate authorized.set authflag "Z"bind msg - verify msg_authbind msg - pubauth msg_authproc msg_auth {nick uhost hand rest} {  global botnick authflag   if {$rest == ""} {    putserv "NOTICE $nick :Usage: /msg $botnick verify password"    putserv "NOTICE $nick :  Authenticate for public commands."    return 0  } if {([matchattr $hand $authflag] == 1)} {    putserv "NOTICE $nick :You are allready athenticated."    return 0                                 }if {(![auth_chans $nick $hand])} {return 0} if {[passwdok $hand $rest] == 1} {    putlog "$nick is now authenticated"    putserv "NOTICE $nick :You are now athenticated."    chattr $hand "+${authflag}"                                  } else { putserv "NOTICE $nick :Access Denied." }                                      }bind msg - deauth msg_deauthproc msg_deauth {nick uhost hand rest} { global authflag chattr $hand "-${authflag}" putlog "$nick request deauth. Deauthenticated." putserv "NOTICE $nick :You're no longer authenticated."}proc authed {hand} { global botnick authflag set nick [hand2nick $hand] if {([matchattr $hand $authflag] == 1)} {return 1                                 } else {                                         putserv "NOTICE $nick :Please athenticate before using this command."                                         putserv "NOTICE $nick :To authenticate: /msg $botnick verify yourpassword"                                         putlog "$nick tried to use an authenticated command."                                         return 0                                        }}bind part $authflag * auth_partproc auth_part {nick uhost hand chan {msg ""}} {subst -nobackslashes -nocommands -novariables nicksubst -nobackslashes -nocommands -novariables msgregsub -all {\[} $nick "\\\[" nickregsub -all {\]} $nick "\\\]" nickregsub -all {\[} $nick "\\\[" msgregsub -all {\]} $nick "\\\]" msg utimer 5 "auth_check $nick $hand"}bind sign $authflag * auth_signoffproc auth_signoff {nick uhost hand channel reason} { global authflag chattr $hand "-${authflag}" putlog "$nick signed off. Deauthenticated."}proc auth_check {nick hand} {subst -nobackslashes -nocommands -novariables nick global authflag if {([matchattr $hand $authflag] == 0)} {return} set chans [channels] set chan_tot [llength $chans] set chan_num 0 for {set loop 0} {$loop &lt; $chan_tot} {incr loop} {  if {[onchan $nick [lindex $chans $loop]]==1} {incr chan_num +1}                                                  } if {($chan_num == 0)} {    chattr $hand "-${authflag}"    putlog "$nick parted all channels. Deauthenticated."    putserv "NOTICE $nick :You're no longer on one of my channels. You have been deathenticated."    return 0                       }}proc auth_chans {nick hand} { global authflag set chans [channels] set chan_tot [llength $chans] set chan_num 0 for {set loop 0} {$loop &lt; $chan_tot} {incr loop} {  if {[onchan $nick [lindex $chans $loop]]==1} {incr chan_num +1}                                                  } if {($chan_num == 0)} {    putlog "$nick Isn't on any of my channels. Athentication Rejected"    putserv "NOTICE $nick :You're not on any of my channels. Athentication is rejected."    return 0                       }return 1}proc auth_idle {} {global _auth authflagset idletime 1 set chans [channels] set chan_tot [llength $chans] set chan_num 0 for {set loop 0} {$loop &lt; $chan_tot} {incr loop} {   set nicks [chanlist [lindex $chans $loop] $authflag]   set nickidle 1   set nick_tot [llength $nicks]    for {set loop2 0} {$loop2 &lt; $nick_tot} {incr loop2} {      set idletime [getchanidle [lindex $nicks $loop2] [lindex $chans $loop]]      if {$idletime &gt;= $nickidle} {set nickidle $idletime}      if {($idletime &gt; 60)} {                           set nick [lindex $nicks $loop2]                           set hand [nick2hand [lindex $nicks $loop2]]     if {[hand2idx $hand] == -1} {                           putlog "$nick Idle over 60 minutes. Deauthenticated."                           chattr $hand "-${authflag}"                           putserv "NOTICE $nick :Idle over 60 minutes. Deauthenticated."                                 }                          }                                                                 }                                                  } set _auth [timer 60 auth_idle]}set init-server { run_server_init }proc run_server_init {} { global botnick putserv "MODE $botnick +i-ws" reset_auth}proc reset_auth {} { global authflag set users [userlist $authflag] set user_tot [llength $users] set user_num 0 for {set loop 0} {$loop &lt; $user_tot} {incr loop} {   set hand [lindex $users $loop]   if {[hand2idx $hand] == -1} {      putlog "Reseting authorizations. $hand Deauthenticated."      chattr $hand "-${authflag}"                               }                                                  }  }if {![info exists _auth]} {                           putlog "Starting auth timmer"                           set _auth [timer 60 auth_idle]                            }return "Auth.tcl $authver by Dr. Nibble (DrN) -: Loaded :-"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12939">ijookeren</a> — Tue Sep 14, 2021 11:32 am</p><hr />
]]></content>
	</entry>
	</feed>
