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

	<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>2008-12-16T15:15:55-04:00</updated>

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

		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2008-12-16T15:15:55-04:00</updated>

		<published>2008-12-16T15:15:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86273#p86273</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86273#p86273"/>
		<title type="html"><![CDATA[login to bot to use command]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86273#p86273"><![CDATA[
<blockquote class="uncited"><div>  adduser &lt;handle&gt; [hostmask]<br>    Description: creates a new user entry with the handle and hostmask given<br>      (with no password and the default flags)<br>    Returns: 1 if successful; 0 if the handle already exists<br>    Module: core</div></blockquote>Then have a look at this part of the code:<div class="codebox"><p>Code: </p><pre><code>adduser $nickchattr $nick +G</code></pre></div>Basically, you're creating a new user-account (based on nickname), but neglect to add any hostmasks to it. Hence your eggdrop cannot identify the user as the user-account. Add a proper hostmask.<br>Also, I would strongly suggest that you add some mechanism to check that the added handle-name does not already exists (or test the result of the adduser command).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Tue Dec 16, 2008 3:15 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Kingy]]></name></author>
		<updated>2008-12-15T23:52:19-04:00</updated>

		<published>2008-12-15T23:52:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86261#p86261</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86261#p86261"/>
		<title type="html"><![CDATA[login to bot to use command]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86261#p86261"><![CDATA[
Ok so what i'm trying to do is let users log into the bot so they can use commands. When they login it gives them a specific flag (+G) and then all commands are based off G. when they part/quit it takes it away.<br><br>Now i have the login all working and it adds/takes the flag, but users can't seem to use the commands. Here is some of the code<br><div class="codebox"><p>Code: </p><pre><code>bind msg G .commands proc_commandsbind msg - .login proc_loginbind msg G .logout proc_logoutproc proc_login { nick uhost hand text } {  global host user pass db  set con [::mysql::connect -host $host -user $user -password $pass]  set res [::mysql::use $con $db]  set md5pass [md5 $text]  set query [::mysql::query $con "SELECT * FROM users WHERE username='$nick' AND password='$md5pass'"]  if {[set row [::mysql::fetch $query]] == ""} {    putserv "PRIVMSG $nick :Incorrect Login"  } else {    putserv "PRIVMSG $nick :Logged in"    adduser $nick    chattr $nick +G  }  ::mysql::endquery $query  ::mysql::close $con}proc proc_commands { nick uhost hand text } {  putserv "PRIVMSG $nick :All commands can be accessed in this private chat, or by typing /msg K1-Bot &lt;command&gt;"  putserv "PRIVMSG $nick :-"  putserv "PRIVMSG $nick :Commands:"  putserv "PRIVMSG $nick :.logout (Logs you out of the bot)"}</code></pre></div>Now, when i login it seems to work, but doesn't work when another user does it. Any reason why?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10362">Kingy</a> — Mon Dec 15, 2008 11:52 pm</p><hr />
]]></content>
	</entry>
	</feed>
