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

	<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>2009-01-22T05:17:12-04:00</updated>

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

		<entry>
		<author><name><![CDATA[OzMan]]></name></author>
		<updated>2009-01-22T05:17:12-04:00</updated>

		<published>2009-01-22T05:17:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87066#p87066</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87066#p87066"/>
		<title type="html"><![CDATA[LEGEND!!]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87066#p87066"><![CDATA[
Thank you so much tomekk,<br><br>that script works GREAT!!!!!<br><br><br>You are a legend!!!!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10421">OzMan</a> — Thu Jan 22, 2009 5:17 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[incith]]></name></author>
		<updated>2009-01-20T08:43:21-04:00</updated>

		<published>2009-01-20T08:43:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87024#p87024</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87024#p87024"/>
		<title type="html"><![CDATA[invite/password script using mysql db search]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87024#p87024"><![CDATA[
Impressive tomekk. <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=6130">incith</a> — Tue Jan 20, 2009 8:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2009-01-20T08:37:19-04:00</updated>

		<published>2009-01-20T08:32:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=87022#p87022</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=87022#p87022"/>
		<title type="html"><![CDATA[invite/password script using mysql db search]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=87022#p87022"><![CDATA[
try:<div class="codebox"><p>Code: </p><pre><code># Author: tomekk# e-mail:  tomekk/@/oswiecim/./eu/./org# home page: http://tomekk.oswiecim.eu.org/## Version 0.1## This file is Copyrighted under the GNU Public License.# http://www.gnu.org/copyleft/gpl.html# command: /msg botnick invite &lt;username&gt; &lt;password&gt;# invite channelset invite_chan "#channel"# mysql db userset msql_user "user"# mysql db passset msql_pass "pass"# mysql server hostset msql_host "localhost"# mysql usernames/passwords databaseset msql_dbase "eggdrop_users"# mysql usernames/passwords tableset msql_table "users"##################################################################bind msgm - "*" invite_privspackage require mysqltclproc invite_privs { nick uhost hand arg } {global msql_user msql_pass msql_host msql_dbase msql_table invite_chanset all_prv_args [split $arg]set priv_command [lindex $all_prv_args 0]set priv_username [lindex $all_prv_args 1] set priv_password [lindex $all_prv_args 2]set login_ok 0if {($priv_command == "invite") &amp;&amp; ($priv_username != "") &amp;&amp; ($priv_password != "")} {set m_hand [::mysql::connect -host $msql_host -user $msql_user -password $msql_pass]::mysql::use $m_hand $msql_dbaseset users_passwords [::mysql::sel $m_hand "SELECT username, password FROM $msql_table" -list]::mysql::close $m_handforeach u_and_p $users_passwords {if {$u_and_p != ""} {set u_and_p_split [split $u_and_p]set user_name [lindex $u_and_p_split 0]set user_pass [lindex $u_and_p_split 1]if {$priv_username == $user_name} {if {$priv_password == $user_pass} {set login_ok 1}}}}if {$login_ok == 0} {putquick "PRIVMSG $nick :wrong username or wrong password, sorry"} {putserv "INVITE $nick $invite_chan"}}}putlog "mysql_invite.tcl ver 0.1 by tomekk loaded"</code></pre></div>table for it:<div class="codebox"><p>Code: </p><pre><code>create table users (        id int(4) auto_increment,        username varchar(12),        password varchar(12),        primary key(id));</code></pre></div>testing:<blockquote class="uncited"><div>13:29:29 &lt;tomekk&gt; invite test qwert<br>13:29:29 &lt;botty&gt; wrong username or wrong password, sorry</div></blockquote><blockquote class="uncited"><div>13:30:29 &lt;tomekk&gt; invite test qwerty<br>13:30:32 [10] -!- botty invites you to #channel</div></blockquote>users/passes are stored one by one, all in plain text:<br>user pass<br>user2 pass2<br>etc etc<br><blockquote class="uncited"><div>mysql&gt; select * from users;<br>+----+----------+----------+<br>| id | username | password |<br>+----+----------+----------+<br>|  1 | tomekk   | 123456   |<br>|  2 | test     | qwerty   |<br>+----+----------+----------+</div></blockquote><blockquote class="uncited"><div>mysql&gt; describe users;<br>+----------+-------------+------+-----+---------+----------------+<br>| Field    | Type        | Null | Key | Default | Extra          |<br>+----------+-------------+------+-----+---------+----------------+<br>| id       | int(4)      | NO   | PRI | NULL    | auto_increment |<br>| username | varchar(12) | YES  |     | NULL    |                |<br>| password | varchar(12) | YES  |     | NULL    |                |<br>+----------+-------------+------+-----+---------+----------------+</div></blockquote>:&gt;<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Tue Jan 20, 2009 8:32 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[OzMan]]></name></author>
		<updated>2009-01-16T04:08:16-04:00</updated>

		<published>2009-01-16T04:08:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86949#p86949</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86949#p86949"/>
		<title type="html"><![CDATA[invite/password script using mysql db search]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86949#p86949"><![CDATA[
Hi,<br><br>I was hoping somebody would be able to create a script for me that listens for a privmsg invite with a password (ie. /msg bot invite username password or /msg bot username password invite).  It would then compare the username and password to a mysqldb to see if they match.  If they both match then an invite to the channel is given to the requesting nick, if either are wrong a simple wrong user/pass msg is sent to the nick requesting the invite.<br><br>eg<br><br>/msg bot username password invite<br><br>bot checks mysqldb for matching username/password<br><br>if found it issues the invite<br><br>if no match found no invite<br><br>error msg sent.<br><br>Many thanks in advance.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10421">OzMan</a> — Fri Jan 16, 2009 4:08 am</p><hr />
]]></content>
	</entry>
	</feed>
