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

	<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>2010-01-14T09:24:37-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Daedalus]]></name></author>
		<updated>2010-01-14T09:24:37-04:00</updated>

		<published>2010-01-14T09:24:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91677#p91677</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91677#p91677"/>
		<title type="html"><![CDATA[MySQL Profile Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91677#p91677"><![CDATA[
<blockquote class="uncited"><div>Hmmm... Ran into a little snag deploying this on one server which apparently has a pretty low sendq. Bot disconnects with excess flood. Just so anyone who comes along and has the same problem in the future knows why that happens...</div></blockquote>^^ Disregard the above. It turned out to be a rather simple error on my part when using a perl script to convert the flatfiles from the old profile script I was using into the new mysql database.<br><br>Incidentally, here's the php I'm using on my site to read from the DB. Note that this is only a first version, and so the code is a bit basic. It does work however.<br><div class="codebox"><p>Code: </p><pre><code>&lt;?php// Includes.include 'pconfig.php';include 'popendb.php';// Static page formatting.$PreString="&lt;p&gt;This lets you view profiles for the IRC channel &lt;a href='irc://irc.sexnet.org/playthings4roughuse'&gt;#playthings4roughuse&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Please enter a nickname (and hit enter). If nothing appears, either this page is temporarily broken or the nickname doesn't have a profile!&lt;/p&gt;&lt;form id='name'&gt;&lt;input id='input' name='name' type='text' onkeypress='{if (event.keyCode==13)showProfile(input.value);}' /&gt;";$FailString="&lt;p&gt;Either you didn't finish typing yet or that nick doesn't have a profile.&lt;/p&gt;";// If we have a profile to get, begin to get it.if ($_GET['name'] !=null){// Set the profile name and make it lowercase.$profile = $_GET['name'];$name = strtolower($profile);// Actually get the data.$locdata = mysql_query('SELECT `p_location` FROM `users` WHERE `p_nick`="' . $name . '"');$agedata = mysql_query('SELECT `p_age` FROM `users` WHERE `p_nick`="' . $name . '"');$genderdata = mysql_query('SELECT `p_gender` FROM `users` WHERE `p_nick`="' . $name . '"');$descdata = mysql_query('SELECT `p_description` FROM `users` WHERE `p_nick`="' . $name . '"');$kinkdata = mysql_query('SELECT `p_kinks` FROM `users` WHERE `p_nick`="' . $name . '"');$limdata = mysql_query('SELECT `p_limits` FROM `users` WHERE `p_nick`="' . $name . '"');$posdata = mysql_query('SELECT `p_position` FROM `users` WHERE `p_nick`="' . $name . '"');$oriendata = mysql_query('SELECT `p_orientation` FROM `users` WHERE `p_nick`="' . $name . '"');$webdata = mysql_query('SELECT `p_url` FROM `users` WHERE `p_nick`="' . $name . '"');// Make it human-readable for output.$location = mysql_fetch_row($locdata);$age = mysql_fetch_row($agedata);$gender = mysql_fetch_row($genderdata);$description = mysql_fetch_row($descdata);$kinks = mysql_fetch_row($kinkdata);$limits = mysql_fetch_row($limdata);$position = mysql_fetch_row($posdata);$orientation = mysql_fetch_row($oriendata);$web = mysql_fetch_row($webdata);// Draw and display the page.$DisplayString.="&lt;table&gt;";$DisplayString.="&lt;br /&gt;&lt;h2&gt;" . $name . " &lt;br /&gt;&lt;br /&gt;";$DisplayString.="&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Location:&lt;/strong&gt; " . $location[0] . "&lt;/td&gt;&lt;/tr&gt;";$DisplayString.="&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Gender:&lt;/strong&gt; " . $gender[0] . "&lt;/td&gt;&lt;/tr&gt;";$DisplayString.="&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Age:&lt;/strong&gt; " . $age[0] . "&lt;/td&gt;&lt;/tr&gt;";$DisplayString.="&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Description:&lt;/strong&gt; " . $description[0] . "&lt;/td&gt;&lt;/tr&gt;";$DisplayString.="&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Kinks:&lt;/strong&gt; " . $kinks[0] . "&lt;/td&gt;&lt;/tr&gt;";$DisplayString.="&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Limits:&lt;/strong&gt; " . $limits[0] . "&lt;/td&gt;&lt;/tr&gt;";$DisplayString.="&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Orientation:&lt;/strong&gt; " . $orientation[0] . "&lt;/td&gt;&lt;/tr&gt;";$DisplayString.="&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Position:&lt;/strong&gt; " . $position[0] . "&lt;/td&gt;&lt;/tr&gt;";$DisplayString.="&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Web Profile:&lt;/strong&gt; &lt;a href='" . $web[0] . "' target='_blank'&gt;Here unless no entry.&lt;/a&gt; Note that not everyone sets this, so mouseover before you click. :p&lt;/td&gt;&lt;/tr&gt;";$DisplayString.="&lt;/table&gt;";echo $PreString;echo $DisplayString;  }else  {echo $PreString;echo $PostString;  }?&gt;</code></pre></div>Further note that this example uses two includes - those are just to open the connection to the db. If anyone needs that code, I can supply it, but it's pretty basic stuff!<br><br>You couldn't possibly use this as-is, either - largely because it relies on some javascript I wrote. I'm not including that because it's not necessary to the example.<br><br>I plan on doing something particularly interesting with this soon. If it works, I'll be sure to give you plenty of credit for giving me a fantastic starting point, tomekk. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>One thing I do plan on doing is rewriting the "key" section of this script ... I've gotten a little better with tcl now, and one problem I run into time and time again "in the field" using this is that people forget their keys. User-set password time!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9095">Daedalus</a> — Thu Jan 14, 2010 9:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Daedalus]]></name></author>
		<updated>2010-01-11T12:14:28-04:00</updated>

		<published>2010-01-11T12:14:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=91647#p91647</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=91647#p91647"/>
		<title type="html"><![CDATA[MySQL Profile Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=91647#p91647"><![CDATA[
Hmmm... Ran into a little snag deploying this on one server which apparently has a pretty low sendq. Bot disconnects with excess flood. Just so anyone who comes along and has the same problem in the future knows why that happens...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9095">Daedalus</a> — Mon Jan 11, 2010 12:14 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Daedalus]]></name></author>
		<updated>2009-09-12T18:55:30-04:00</updated>

		<published>2009-09-12T18:55:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90234#p90234</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90234#p90234"/>
		<title type="html"><![CDATA[MySQL Profile Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90234#p90234"><![CDATA[
When I've made the PHP to pull the data, I'll post it here if it's wanted. <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=9095">Daedalus</a> — Sat Sep 12, 2009 6:55 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Domin]]></name></author>
		<updated>2009-09-12T04:42:20-04:00</updated>

		<published>2009-09-12T04:42:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90226#p90226</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90226#p90226"/>
		<title type="html"><![CDATA[MySQL Profile Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90226#p90226"><![CDATA[
Looks sweet, will the php part of it be pasted here to ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7855">Domin</a> — Sat Sep 12, 2009 4:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Daedalus]]></name></author>
		<updated>2009-09-07T10:04:25-04:00</updated>

		<published>2009-09-07T10:04:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90172#p90172</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90172#p90172"/>
		<title type="html"><![CDATA[MySQL Profile Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90172#p90172"><![CDATA[
Thank you very much! I'll give it a whirl now.<br><br>I would have answered this sooner but I'm a twit and didn't see there was a second page when I was refreshing. Doh!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9095">Daedalus</a> — Mon Sep 07, 2009 10:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2009-08-30T05:34:14-04:00</updated>

		<published>2009-08-30T05:34:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90097#p90097</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90097#p90097"/>
		<title type="html"><![CDATA[MySQL Profile Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90097#p90097"><![CDATA[
first file, interview-addon-0.1.tcl<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# config header and procs moved to mysql-profile-0.*.tcl################################ high wizardry begins ##################################################################################################################################if {[string match "*s*" $int_proc_bind]} {bind pub -|- $int_bind(setup) int_proc_setup}if {[string match "*u*" $int_proc_bind]} {bind pub -|- $int_bind(updatee) int_proc_update}if {[string match "*d*" $int_proc_bind]} {bind pub -|- $int_bind(delete) int_proc_remove}if {[string match "*r*" $int_proc_bind]} {bind pub -|- $int_bind(release) int_proc_release}if {[string match "*e*" $int_proc_bind]} {bind pub o|o $int_bind(sessions) int_proc_sessions}if {[string match "*f*" $int_proc_bind]} {bind pub o|o $int_bind(flussh) int_proc_flush}if {[string match "*p*" $int_proc_bind]} {bind msgm -|- "*" int_proc_msgm}if {[string match "*a*" $int_proc_bind]} {bind part -|- "*" int_proc_part}if {[string match "*i*" $int_proc_bind]} {bind sign -|- "*" int_proc_sign}if {[string match "*l*" $int_proc_bind]} {bind splt -|- "*" int_proc_splt}if {[string match "*k*" $int_proc_bind]} {bind kick -|- "*" int_proc_kick}if {[string match "*n*" $int_proc_bind]} {bind nick -|- "*" int_proc_nick}setudef flag intaddset int_global_nicks [list]set int_global_uhosts [list]set int_global_pnames [list]set int_global_questions_idx [list]set int_global_answers_mode [list]set int_global_modes [list]set int_global_update_mode [list]proc putnq { data } {putdccraw 0 [string length "$data\n"] "$data\n"}proc int_check_global_n_u { nick uhost } {global int_global_nicks int_global_uhostsset new_n_u_state 0if {([lsearch $int_global_nicks $nick] &gt; -1) &amp;&amp; \([lsearch $int_global_uhosts $uhost] &gt; -1)} {set new_n_u_state 1}return $new_n_u_state}proc int_check_global_pn { profile_name } {global int_global_pnamesset new_pn_state 0if {[lsearch $int_global_pnames $profile_name] &gt; -1} {set new_pn_state 1}return $new_pn_state}proc int_nick_to_profile { nick } {global int_global_nicks int_global_pnamesset profile_name ""set nick_idx [lsearch $int_global_nicks $nick]set profile_name [lindex $int_global_pnames $nick_idx]return $profile_name}proc int_nick_to_idx { nick } {global int_global_nicksset nick_idx [lsearch $int_global_nicks $nick]return $nick_idx}proc int_nick_to_answer_mode { nick } {global int_global_answers_modeset nick_answer_mode ""set nick_global_idx [int_nick_to_idx $nick]set nick_answer_mode [lindex $int_global_answers_mode $nick_global_idx]return $nick_answer_mode}proc int_nick_to_update_mode { nick } {global int_global_update_modeset nick_update_mode ""set nick_global_idx [int_nick_to_idx $nick]set nick_update_mode [lindex $int_global_update_mode $nick_global_idx]return $nick_update_mode}proc int_nick_to_mode { nick } {global int_global_modesset nick_int_mode ""set nick_global_idx [int_nick_to_idx $nick]set nick_int_mode [lindex $int_global_modes $nick_global_idx]return $nick_int_mode}proc int_switch_answer_mode { nick } {global int_global_answers_modeset nick_global_idx [int_nick_to_idx $nick]set user_answer_mode [lindex $int_global_answers_mode $nick_global_idx]if {$user_answer_mode == 0} {set int_global_answers_mode [lreplace $int_global_answers_mode $nick_global_idx $nick_global_idx 1]} {set int_global_answers_mode [lreplace $int_global_answers_mode $nick_global_idx $nick_global_idx 0]}}proc int_switch_update_mode { nick } {global int_global_update_modeset nick_global_idx [int_nick_to_idx $nick]set user_update_mode [lindex $int_global_update_mode $nick_global_idx]if {$user_update_mode == 0} {set int_global_update_mode [lreplace $int_global_update_mode $nick_global_idx $nick_global_idx 1]} {set int_global_update_mode [lreplace $int_global_update_mode $nick_global_idx $nick_global_idx 0]}}proc int_incr_nick_idx { nick } {global int_global_questions_idxset nick_global_idx [int_nick_to_idx $nick]set nick_question_idx [expr [lindex $int_global_questions_idx $nick_global_idx] + 1]set int_global_questions_idx [lreplace $int_global_questions_idx $nick_global_idx $nick_global_idx $nick_question_idx]}proc int_set_nick_idx { nick new_idx } {global int_global_questions_idxset nick_global_idx [int_nick_to_idx $nick]set int_global_questions_idx [lreplace $int_global_questions_idx $nick_global_idx $nick_global_idx $new_idx]}proc int_nick_for_delete { nick } {global int_global_nicks int_global_uhosts int_global_pnames int_global_questions_idx int_global_answers_mode int_global_modes int_global_update_modeset nick_global_idx [int_nick_to_idx $nick]set int_global_nicks [lreplace $int_global_nicks $nick_global_idx $nick_global_idx]set int_global_uhosts [lreplace $int_global_uhosts $nick_global_idx $nick_global_idx]set int_global_pnames [lreplace $int_global_pnames $nick_global_idx $nick_global_idx]set int_global_questions_idx [lreplace $int_global_questions_idx $nick_global_idx $nick_global_idx]set int_global_answers_mode [lreplace $int_global_answers_mode $nick_global_idx $nick_global_idx]set int_global_modes [lreplace $int_global_modes $nick_global_idx $nick_global_idx]set int_global_update_mode [lreplace $int_global_update_mode $nick_global_idx $nick_global_idx]}proc int_proc_setup { nick uhost hand chan arg } {global int_bind int_msg int_global_nicks int_global_uhosts int_global_pnames int_global_questions_idx int_global_answers_mode int_global_modes int_global_update_mode int_bind_regexp int_questions_auto_start int_random_generator int_questions_listif {![channel get $chan intadd]} {return}set profile_name [lindex [split $arg] 0]if {$profile_name != ""} {if {![regexp $int_bind_regexp $profile_name]} {putnq "PRIVMSG $nick :$int_msg(bind_help)"return}if {[int_check_if_profile_exists $nick $uhost $profile_name $chan] == 0} {if {([int_nick_to_mode $nick] != "update") &amp;&amp; ([int_nick_to_mode $nick] != "remove")} {if {[int_check_global_n_u $nick $uhost] == 0} {if {[int_check_global_pn $profile_name] == 0} {lappend int_global_nicks $nicklappend int_global_uhosts $uhostlappend int_global_pnames $profile_namelappend int_global_questions_idx 0lappend int_global_answers_mode 0lappend int_global_modes "setup"lappend int_global_update_mode 0if {$int_random_generator == 0} {set open_dev [open "/dev/urandom" r]set get_bytes [read $open_dev 16]   close $open_dev                     } {set some_numbers [expr floor(rand() * [clock seconds])]set some_string [lindex $int_questions_list [rand [llength $int_questions_list]]]set some_char [string index $some_string [expr [rand [string length $some_string]] - 1]]set get_bytes "$some_numbers $some_char"}set md5_key [md5 $get_bytes]set action_time [clock seconds]int_new_profile_event $nick $uhost $chan $profile_name $md5_key $action_timeset key_msg $int_msg(int_key)regsub -all "&amp;k" $key_msg $md5_key key_msgputnq "PRIVMSG $nick :$int_msg(int_start)"putnq "PRIVMSG $nick :$key_msg"if {$int_questions_auto_start == 1} {int_proc_msgm $nick $uhost $hand $int_bind(questions_start)}} {putnq "PRIVMSG $nick :$int_msg(setup_profile_name_already_in_use)"}} {putnq "PRIVMSG $nick :$int_msg(setup_already_in_use)"}} {putnq "PRIVMSG $nick :$int_msg(just_one_command)"}} {putnq "PRIVMSG $nick :$int_msg(profile_exists)"}} {putnq "PRIVMSG $nick :$int_msg(setup_help)"}}proc int_proc_update { nick uhost hand chan arg } {global int_msg int_global_nicks int_global_uhosts int_global_pnames int_global_questions_idx int_global_answers_mode int_global_modes int_global_update_mode int_bind_regexpif {![channel get $chan intadd]} {return}set profile_name [lindex [split $arg] 0]if {$profile_name != ""} {if {![regexp $int_bind_regexp $profile_name]} {putnq "PRIVMSG $nick :$int_msg(bind_help)"return}if {[int_check_if_profile_exists $nick $uhost $profile_name $chan] == 1} {if {([int_nick_to_mode $nick] != "setup") &amp;&amp; ([int_nick_to_mode $nick] != "remove")} {if {[int_check_global_n_u $nick $uhost] == 0} {if {[int_check_global_pn $profile_name] == 0} {lappend int_global_nicks $nicklappend int_global_uhosts $uhostlappend int_global_pnames $profile_namelappend int_global_questions_idx 0lappend int_global_answers_mode 0lappend int_global_modes "update"lappend int_global_update_mode 0putnq "PRIVMSG $nick :$int_msg(update_start)"} {putnq "PRIVMSG $nick :$int_msg(update_profile_name_already_in_use)"}} {putnq "PRIVMSG $nick :$int_msg(update_already_in_use)"}} {putnq "PRIVMSG $nick :$int_msg(just_one_command)"}} {putnq "PRIVMSG $nick :$int_msg(profile_not_exists)"}} {putnq "PRIVMSG $nick :$int_msg(update_help)"}}proc int_proc_remove { nick uhost hand chan arg } {global int_msg int_global_nicks int_global_uhosts int_global_pnames int_global_questions_idx int_global_answers_mode int_global_modes int_global_update_mode int_bind_regexpif {![channel get $chan intadd]} {return}set profile_name [lindex [split $arg] 0]if {$profile_name != ""} {if {![regexp $int_bind_regexp $profile_name]} {putnq "PRIVMSG $nick :$int_msg(bind_help)"return}if {[int_check_if_profile_exists $nick $uhost $profile_name $chan] == 1} {if {([int_nick_to_mode $nick] != "setup") &amp;&amp; ([int_nick_to_mode $nick] != "update")} {if {[int_check_global_n_u $nick $uhost] == 0} {if {[int_check_global_pn $profile_name] == 0} {lappend int_global_nicks $nicklappend int_global_uhosts $uhostlappend int_global_pnames $profile_namelappend int_global_questions_idx 0lappend int_global_answers_mode 0lappend int_global_modes "remove"lappend int_global_update_mode 0putnq "PRIVMSG $nick :$int_msg(remove_start)"} {putnq "PRIVMSG $nick :$int_msg(remove_profile_name_already_in_use)"}} {putnq "PRIVMSG $nick :$int_msg(remove_already_in_use)"}} {putnq "PRIVMSG $nick :$int_msg(just_one_command)"}} {putnq "PRIVMSG $nick :$int_msg(profile_not_exists)"}} {putnq "PRIVMSG $nick :$int_msg(remove_help)"}}proc int_proc_release { nick uhost hand chan arg } {global int_global_nicks int_msgif {![channel get $chan intadd]} {return}if {[lsearch $int_global_nicks $nick] &gt; -1} {int_nick_for_delete $nickputnq "PRIVMSG $nick :$int_msg(release_done)"} {putnq "PRIVMSG $nick :$int_msg(release_empty)"}}proc int_proc_msgm { nick uhost hand arg } {global int_bind int_msg int_questions_list int_global_questions_idx int_questions_key int_questions_regexp int_question_helpset arg [string trim $arg]if {[int_check_global_n_u $nick $uhost] == 1} {set profile_name [int_nick_to_profile $nick]set nick_global_idx [int_nick_to_idx $nick]set nick_answer_mode [int_nick_to_answer_mode $nick]set nick_update_mode [int_nick_to_update_mode $nick]set questions_counter [expr [llength $int_questions_list] - 1]set action_time [clock seconds]set nick_question_idx [lindex $int_global_questions_idx $nick_global_idx]set nick_int_mode [int_nick_to_mode $nick]if {$nick_int_mode == "setup"} {if {$nick_answer_mode == 0} {if {$int_bind(questions_start) == $arg} {putnq "PRIVMSG $nick :[lindex $int_questions_list $nick_question_idx]"int_switch_answer_mode $nick}} {if {[lindex $int_global_questions_idx $nick_global_idx] &lt; $questions_counter} {if {[regexp [lindex $int_questions_regexp $nick_question_idx] $arg]} {int_incr_nick_idx $nickint_answer_event $nick $uhost $profile_name $arg $action_time [lindex $int_questions_key $nick_question_idx]putnq "PRIVMSG $nick :[lindex $int_questions_list [expr $nick_question_idx + 1]]"} {putnq "PRIVMSG $nick :[lindex $int_question_help $nick_question_idx]"}} {if {[regexp [lindex $int_questions_regexp $nick_question_idx] $arg]} {int_answer_event $nick $uhost $profile_name $arg $action_time [lindex $int_questions_key $nick_question_idx]int_nick_for_delete $nickputnq "PRIVMSG $nick :$int_msg(int_end)"} {putnq "PRIVMSG $nick :[lindex $int_question_help $nick_question_idx]"}}}} elseif {$nick_int_mode == "update"} {set question_list [list]set question_idx 1foreach question $int_questions_list {if {$question != ""} {lappend question_list "$question_idx\) $question"incr question_idx 1}}set question_list [join $question_list ", "]if {$nick_answer_mode == 0} {if {[int_check_if_key_is_correct $nick $uhost $profile_name $arg] == 1} {putnq "PRIVMSG $nick :$int_msg(update_welcome)"putnq "PRIVMSG $nick :$int_msg(update_question_list) $question_list"int_switch_answer_mode $nick} {int_nick_for_delete $nickputnq "PRIVMSG $nick :$int_msg(update_wrong_key)"}} {if {$nick_update_mode == 0} {if {[regexp {^[0-9]+$} $arg]} {if {($arg &gt; 0) &amp;&amp; ($arg &lt;= [expr $questions_counter + 1])} {putnq "PRIVMSG $nick :[lindex $int_questions_list [expr $arg - 1]]"int_switch_update_mode $nickint_set_nick_idx $nick [expr $arg - 1]} {putnq "PRIVMSG $nick :$int_msg(update_question_number_range)"}} {putnq "PRIVMSG $nick :$int_msg(update_question_number)"}} {if {[regexp [lindex $int_questions_regexp $nick_question_idx] $arg]} {int_update_event $nick $uhost $profile_name $arg $action_time [lindex $int_questions_key $nick_question_idx]putnq "PRIVMSG $nick :$int_msg(update_done)"putnq "PRIVMSG $nick :$int_msg(update_question_list) $question_list"int_switch_update_mode $nickint_set_nick_idx $nick 0} {putnq "PRIVMSG $nick :[lindex $int_question_help $nick_question_idx]"}}}} elseif {$nick_int_mode == "remove"} {if {[int_check_if_key_is_correct $nick $uhost $profile_name $arg] == 1} {int_nick_for_delete $nickint_remove_profile_event $nick $uhost $profile_name $action_timeputnq "PRIVMSG $nick :$int_msg(remove_end)"} {int_nick_for_delete $nickputnq "PRIVMSG $nick :$int_msg(remove_wrong_key)"}}}}proc int_proc_sessions { nick uhost hand chan arg } {global int_msg int_global_nicks int_global_uhosts int_global_pnames int_global_questions_idx int_global_answers_mode int_questions_key int_global_modes int_global_update_modeif {![channel get $chan intadd]} {return}set sess_len [llength $int_global_nicks]if {$sess_len &gt; 0} {putnq "PRIVMSG $nick :nick   |   uhost   |   profile   |   qidx   |   qkey   |   amode   |   imode   |   umode"for {set i 0} {$i &lt; $sess_len} {incr i 1} {putnq "PRIVMSG $nick :[lindex $int_global_nicks $i]   |   [lindex $int_global_uhosts $i]   |   [lindex $int_global_pnames $i]   |   [lindex $int_global_questions_idx $i]   |   [lindex $int_questions_key [lindex $int_global_questions_idx $i]]   |   [lindex $int_global_answers_mode $i]   |   [lindex $int_global_modes $i]   |   [lindex $int_global_update_mode $i]"}} {putnq "PRIVMSG $nick :$int_msg(sessions_list_empty)"}}proc int_proc_flush { nick uhost hand chan arg } {global int_global_nicks int_msg int_bind_regexp int_global_nicks int_global_uhosts int_global_pnames int_global_questions_idx int_global_answers_mode int_global_modes int_global_update_modeif {![channel get $chan intadd]} {return}set nick_to_flush [lindex [split $arg] 0]if {$nick_to_flush != ""} {if {![regexp $int_bind_regexp $nick_to_flush]} {putnq "PRIVMSG $nick :$int_msg(bind_help)"return}if {[lsearch $int_global_nicks $nick_to_flush] &gt; -1} {int_nick_for_delete $nick_to_flushputnq "PRIVMSG $nick :$int_msg(session_destroyed)"} {putnq "PRIVMSG $nick :$int_msg(session_n_exists)"}} {set int_global_nicks [list]set int_global_uhosts [list]set int_global_pnames [list]set int_global_questions_idx [list]set int_global_answers_mode [list]set int_global_modes [list]set int_global_update_mode [list]putnq "PRIVMSG $nick :$int_msg(all_sessions_destroyed)"}}proc int_proc_part { nick uhost hand chan msg } {global int_global_nicks if {![channel get $chan intadd]} {return}if {[lsearch $int_global_nicks $nick] &gt; -1} {int_nick_for_delete $nick}}proc int_proc_sign { nick uhost hand chan msg } {global int_global_nicksif {![channel get $chan intadd]} {return}if {[lsearch $int_global_nicks $nick] &gt; -1} {int_nick_for_delete $nick}}proc int_proc_splt { nick uhost hand chan } {global int_global_nicksif {![channel get $chan intadd]} {return}if {[lsearch $int_global_nicks $nick] &gt; -1} {int_nick_for_delete $nick}}proc int_proc_kick { nick uhost hand chan target rsn } {global int_global_nicks if {![channel get $chan intadd]} {return}if {[lsearch $int_global_nicks $target] &gt; -1} {int_nick_for_delete $target}}proc int_proc_nick { nick uhost hand chan newnick } {global int_global_nicksif {![channel get $chan intadd]} {return        }set nick_global_idx [int_nick_to_idx $nick]if {$nick_global_idx &gt; -1} {set int_global_nicks [lreplace $int_global_nicks $nick_global_idx $nick_global_idx $newnick]}}putlog "interviewer-addon.tcl ver 0.1 by tomekk loaded"# end of magic ;)</code></pre></div>second file, mysql-profile-0.1.tcl<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# if you want to use commands from this script on your chan, type in eggdrop console (via telnet or DCC chat)# .chanset #channel_name +intadd +profile# and later .save# variables and procedures:# with profile_ prefix are from mysql-profile script# with int_ prefix are from interviewer-addon# on-join 'snippet' profile information proc (based only on nick!, if $nick == $profile_name then show short msg)# 0 - disabled, 1 - enabledset profile_on_join 1# bind for view procedure# after this command bot will show the user profileset profile_view_command "!view"# bot for list procedure# after this command bot will show the list of profile namesset profile_list_command "!list"# bind for delete procedure# after this command bot will delete the profile (only for o|o)# user can delete his profile by typing !remove (only when key will be correct)set profile_drop_command "!delete"# bind for help procedure# after this command bot will show the available commandsset profile_help_command "!help"# bind for setup procedure# after this command bot will try to make a new profile and start the interviewset int_bind(setup) "!setup"# bind for update procedure# after this command user will be able to update his profile informationset int_bind(updatee) "!update"# bind for remove procedure# after this command bot will try to remove profileset int_bind(delete) "!remove"# bind for release procedure# after this command bot will try to destroy user's session (something like logout)set int_bind(release) "!release"# bind for sessions procedure# after this command bot will print current sessions list (only for o|o)set int_bind(sessions) "!sessions"# bind for flush procedure# after this command bot will try to destroy all sessions or just one given session (only for o|o)set int_bind(flussh) "!flush"# mysql userset profile_mysql_user "db_user"# mysql passset profile_mysql_pass "db_pass"# mysql hostset profile_mysql_host "localhost"# mysql databaseset profile_mysql_dbase "profiles"# mysql tableset profile_mysql_table "users"# interviewer-addon script pathset interviewer_addon_path "scripts/interviewer-addon-0.1.tcl"# regexp for !setup, !update, !remove, !flush commands (default, only small and BIG letters are allowed)# in this script (mysql-profile-0.*.tcl), all profiles names are in 'lower case', but we have to allow big chars because someone can write !setup MyNiCk or something, otherwise script will make 'mynick' ;)set int_bind_regexp {^[a-zA-Z]+$}# all these five lists must have the same number of elements# headers for !viewset profile_view_headers {"&amp;n location:""&amp;n age:""&amp;n gender:""&amp;n description:""&amp;n kinks:""&amp;n limits:""&amp;n position:""&amp;n orientation:""&amp;n web URL:"}# questions lists, one by oneset int_questions_list {"your location ;&gt;""your age ;&gt;""your gender ;&gt;""your description ;&gt;""your kinks ;&gt;""your limits ;&gt;""your position ;&gt;""your orientation ;&gt;""your web URL ;&gt;"}# uniq key of each question# some short uniq word, without spaces will be betterset int_questions_key {"p_location""p_age""p_gender""p_description""p_kinks""p_limits""p_position""p_orientation""p_url"}# questions regexps, one by one# if you don't know how to build regexp, use {.*}  and pray (.* any chars ;p)set int_questions_regexp {{^.{1,64}$}{^[0-9]{1,2}$}{^(male|female)$}{^.{1,255}.{0,1}$}{^.{1,255}.{0,1}$}{^.{1,255}.{0,1}$}{^.{1,255}.{0,1}$}{^.{1,255}.{0,1}$}{^http:\/\/.{1,249}$}}# questions help messages, one by oneset int_question_help {"max 64 chars here, sorry""only numbers are allowed (0-99)""male or female""max 256 chars here, sorry""max 256 chars here, sorry""max 256 chars here, sorry""max 256 chars here, sorry""max 256 chars here, sorry""max 256 chars here and don't forget about 'http://' at the beginning"}# messagesset profile_help "available commands for every user: !setup, !update, !remove, !release, !view, !list"set int_msg(int_start) "hey! Your profile has been created, get your key and type some info about yourself!"set int_msg(int_key) "here is your key: &amp;k, save it, you will need it later for update or delete your profile"set int_msg(int_end) "thanks for the answers, bye!"set int_msg(update_start) "hi, if you want to update your profile you have to type your profile key now (paste it here and press enter)"set int_msg(update_welcome) "hi, your key is OK, we can update your profile now; I will print the questions list for you, choose one and answer! (type number of question and press enter)"set int_msg(update_question_list) "here are the questions(to stop the interview mode use !release on chan):"set int_msg(update_question_number) "only numbers are allowed here (1 or more)"set int_msg(update_question_number_range) "please choose number from 1 to 6"set int_msg(update_wrong_key) "you typed wrong key, if you want to try again, please use !update &lt;profile_name&gt; again"set int_msg(update_done) "information has been updated"set int_msg(remove_start) "hi, if you want to remove this profile you have to type your profile key now (paste it here and press enter)"set int_msg(remove_end) "profile has been successfully removed"set int_msg(remove_wrong_key) "you typed wrong key, if you want to try again, please use !remove &lt;profile_name&gt; again"set int_msg(just_one_command) "you can use just one command in the same time, !setup, !update or !remove; use !release if you want to use setup, update or remove command again"set int_msg(profile_exists) "profile with that name already exists"set int_msg(profile_not_exists) "profile with that name doesn't exists"set int_msg(setup_already_in_use) "you can't use this command twice in the same time"set int_msg(update_already_in_use) "you can't use this command twice in the same time"set int_msg(remove_already_in_use) "you can't use this command twice in the same time"set int_msg(setup_profile_name_already_in_use) "someone is already making setup with that name"set int_msg(update_profile_name_already_in_use) "someone is already making update with that name"set int_msg(remove_profile_name_already_in_use) "someone is already trying to remove profile with that name"set int_msg(all_sessions_destroyed) "all sessions have been destroyed"set int_msg(session_destroyed) "session has been destroyed"set int_msg(session_n_exists) "session for this user doesn't exists"set int_msg(sessions_list_empty) "sessions list is empty ;)"set int_msg(release_empty) "your session doesn't exists"set int_msg(release_done) "your session has been destroyed, you can use !setup, !update or !remove again"set int_msg(setup_help) "use: !setup &lt;profile_name&gt;"set int_msg(update_help) "use: !update &lt;profile_name&gt;"set int_msg(remove_help) "use: !remove &lt;profile_name&gt;"set int_msg(bind_help) "only small and BIG letters are allowed, sorry"# type of key generator# 0 - use /dev/urandom (good for unix systems)# 1 - use some rand() (use it for windows systems, of course it will work under unix too)set int_random_generator 1# which procedures bot should bind (default all)# s - setup proc# u - update proc# d - remove proc# r - release proc# e - sessions proc# f - flush proc# p - private messages proc# a - part proc# i - sign proc# l - split proc# k - kick proc# n - nick procset int_proc_bind "sudrefpailkn"# autostart of 'questions', without any extra word# 0 - disable, 1 - enableset int_questions_auto_start 1# bind for questions start# after this command bot will start the interview (priv command, after !setup)# works only when $int_questions_auto_start is set to 0# but, even if you set $int_questions_auto_start to 1, please leave here some wordset int_bind(questions_start) "start"################################################################################################################bind pub -|- $profile_view_command profile_view_procbind pub -|- $profile_list_command profile_list_procbind pub -|- $profile_drop_command profile_drop_procbind pub -|- $profile_help_command profile_help_procif {$profile_on_join == 1} {bind join -|- "*" profile_do_on_join}package require mysqltclsetudef flag profileproc profile_mysql_query { result_mode mysql_query } {global profile_mysql_user profile_mysql_pass profile_mysql_host profile_mysql_dbaseset mysql_result ""set mysql_handle [::mysql::connect -host $profile_mysql_host -user $profile_mysql_user -password $profile_mysql_pass]::mysql::use $mysql_handle $profile_mysql_dbaseif {$result_mode == "quiet"} {::mysql::exec $mysql_handle $mysql_query} elseif {$result_mode == "verbose"} {set mysql_result [::mysql::sel $mysql_handle $mysql_query -flatlist]}::mysql::close $mysql_handleif {$result_mode == "verbose"} {return $mysql_result}}proc profile_check_if_profile_exists { profile_name } {global profile_mysql_tableset profile_name [::mysql::escape $profile_name]set query_result [profile_mysql_query verbose "SELECT p_name FROM $profile_mysql_table WHERE p_name='$profile_name'"]if {$query_result != ""} {return 1} {return 0}}proc profile_delete_proc { profile_name } {global profile_mysql_tableset profile_name [::mysql::escape $profile_name]profile_mysql_query quiet "DELETE from $profile_mysql_table where p_name='$profile_name'"}proc profile_view_proc { nick uhost hand chan arg } {global profile_mysql_table profile_view_headers profile_view_commandif {![channel get $chan profile]} {return}set profile_name [::mysql::escape [string tolower [lindex [split $arg] 0]]]if {$profile_name != ""} {if {[profile_check_if_profile_exists $profile_name]} {set query_result [profile_mysql_query verbose "SELECT p_location, p_age, p_gender, p_description, p_kinks, p_limits, p_position, p_orientation, p_url FROM $profile_mysql_table WHERE p_name='$profile_name'"]set header_idx 0foreach query_row $query_result { set each_header [lindex $profile_view_headers $header_idx]regsub "&amp;n" $each_header "$profile_name\'s" each_headerif {$query_row != ""} {putnq "PRIVMSG $nick :$each_header $query_row"} {putnq "PRIVMSG $nick :$each_header N/A"}incr header_idx 1}} {putnq "PRIVMSG $nick :profile $profile_name doesn't exists"}} {putnq "PRIVMSG $nick :use: $profile_view_command &lt;profile_name&gt;"}}proc profile_list_proc { nick uhost hand chan arg } {global profile_mysql_table profile_list_commandif {![channel get $chan profile]} {return}set list_number [lindex [split $arg] 0]if {$list_number != ""} {switch -- $list_number {"1" {set query_result_a [profile_mysql_query verbose "SELECT p_name FROM $profile_mysql_table WHERE p_name REGEXP '^\[a-f\]' ORDER BY p_name"]set count_af [llength $query_result_a]set af_list [join $query_result_a ", "]if {$af_list != ""} {putnq "PRIVMSG $nick :list from A to F ($count_af): $af_list"} {putnq "PRIVMSG $nick :list is empty"}}"2" {set query_result_b [profile_mysql_query verbose "SELECT p_name FROM $profile_mysql_table WHERE p_name REGEXP '^\[g-l\]' ORDER BY p_name"]set count_gl [llength $query_result_b]set gl_list [join $query_result_b ", "]if {$gl_list != ""} {putnq "PRIVMSG $nick :list from G to L ($count_gl): $gl_list"} {putnq "PRIVMSG $nick :list is empty"}}"3" {set query_result_c [profile_mysql_query verbose "SELECT p_name FROM $profile_mysql_table WHERE p_name REGEXP '^\[m-r\]' ORDER BY p_name"]set count_mr [llength $query_result_c]set mr_list [join $query_result_c ", "]if {$mr_list != ""} {putnq "PRIVMSG $nick :list from M to R ($count_mr): $mr_list"} {putnq "PRIVMSG $nick :list is empty"}}"4" {set query_result_d [profile_mysql_query verbose "SELECT p_name FROM $profile_mysql_table WHERE p_name REGEXP '^\[s-z\]' ORDER BY p_name"]set count_sz [llength $query_result_d]                                set sz_list [join $query_result_d ", "]if {$sz_list != ""} {putnq "PRIVMSG $nick :list from S to Z ($count_sz): $sz_list"} {putnq "PRIVMSG $nick :list is empty"}}"showall" {set query_result_e [profile_mysql_query verbose "SELECT p_name FROM $profile_mysql_table ORDER BY p_name"]set whole_list [join $query_result_e ", "]if {$whole_list != ""} {putnq "PRIVMSG $nick :whole list: $whole_list"} {putnq "PRIVMSG $nick :list is empty"}}"count" {set query_result_f [profile_mysql_query verbose "SELECT p_name FROM $profile_mysql_table"]set count_profiles [llength $query_result_f]putnq "PRIVMSG $nick :$count_profiles profile/s in the database"}}} {putnq "PRIVMSG $nick :use: $profile_list_command 1 (A-&gt;F) / $profile_list_command 2 (G-&gt;L) / $profile_list_command 3 (M-&gt;R) / $profile_list_command 4 (S-Z) / $profile_list_command showall / $profile_list_command count"}}proc profile_drop_proc { nick uhost hand chan arg } {        global profile_mysql_table profile_drop_commandif {![channel get $chan profile]} {return}if {[string trim $arg] != ""} {foreach profile_name [split $arg] {set profile_name [::mysql::escape [string tolower $profile_name]]if {$profile_name != ""} {if {[profile_check_if_profile_exists $profile_name]} {profile_delete_proc $profile_nameputnq "PRIVMSG $nick :profile $profile_name has been deleted"} {putnq "PRIVMSG $nick :profile $profile_name doesn't exists"}}}} {putnq "PRIVMSG $nick :use: $profile_drop_command &lt;profile_name&gt; ... &lt;profile_name&gt;"}}proc profile_help_proc { nick uhost hand chan arg } {global profile_helpif {![channel get $chan profile]} {return}putnq "PRIVMSG $nick :$profile_help"}proc int_check_if_profile_exists { nick uhost profile_name chan } {if {[profile_check_if_profile_exists $profile_name] == 1} {return 1} {return 0}}proc int_check_if_key_is_correct { nick uhost profile_name profile_key } {global profile_mysql_tableset profile_name [::mysql::escape $profile_name]        set profile_key [md5 $profile_key]set query_result [profile_mysql_query verbose "SELECT p_key FROM $profile_mysql_table WHERE p_name='$profile_name'"]if {[lindex $query_result 0] == $profile_key} {return 1} {return 0}}proc int_remove_profile_event { nick uhost profile_name action_time } {profile_delete_proc $profile_name}proc int_new_profile_event { nick uhost chan profile_name profile_key action_time} {global profile_mysql_tableset nick [::mysql::escape $nick]set uhost [::mysql::escape $uhost]set profile_name [::mysql::escape $profile_name]set profile_key [md5 $profile_key]profile_mysql_query quiet "INSERT INTO $profile_mysql_table (p_name, p_key, p_nick, p_host, p_crt_date) VALUES('$profile_name', '$profile_key', '$nick', '$uhost', '$action_time')"}proc int_answer_event { nick uhost profile_name arg action_time question_key } {global profile_mysql_tableset profile_name [::mysql::escape $profile_name]set arg [::mysql::escape $arg]set question_key [::mysql::escape $question_key]profile_mysql_query quiet "UPDATE $profile_mysql_table SET $question_key='$arg' WHERE p_name='$profile_name'"}proc int_update_event { nick uhost profile_name arg action_time question_key } {global profile_mysql_table        set profile_name [::mysql::escape $profile_name]set arg [::mysql::escape $arg]set question_key [::mysql::escape $question_key]profile_mysql_query quiet "UPDATE $profile_mysql_table SET $question_key='$arg', p_lupd_date='$action_time' WHERE p_name='$profile_name'"}proc profile_do_on_join { nick uhost hand chan } {global profile_mysql_table profile_view_command botnickif {![channel get $chan profile]} {return}if {$botnick == $nick} {return}set profile_name [::mysql::escape $nick]if {[profile_check_if_profile_exists $profile_name]} {set query_result [profile_mysql_query verbose "SELECT p_age, p_location, p_gender FROM users WHERE p_name='$profile_name'"]set p_age [lindex $query_result 0]set p_location [lindex $query_result 1]set p_gender [lindex $query_result 2]putquick "PRIVMSG $chan :$profile_name has a profile. Age: $p_age\, Location: $p_location\, Gender: $p_gender\. To see $profile_name\'s full profile type $profile_view_command $profile_name"}}source $interviewer_addon_pathputlog "mysql-profile.tcl ver 0.1 by tomekk loaded"</code></pre></div>database:<br>- database name, I made: profiles<br>- table with profiles, I made: users<div class="codebox"><p>Code: </p><pre><code>CREATE TABLE users (id INT(4) AUTO_INCREMENT, p_name VARCHAR(32), p_key VARCHAR(32),p_nick VARCHAR(32),p_host VARCHAR(128),p_crt_date VARCHAR(10),p_lupd_date VARCHAR(10),p_location VARCHAR(64),p_age VARCHAR(2),p_gender VARCHAR(6),p_description VARCHAR(256),p_kinks VARCHAR(256),p_limits VARCHAR(256),p_position VARCHAR(256),p_orientation VARCHAR(256),p_url VARCHAR(256),primary key(id));</code></pre></div>some examples:<br>!list, !list count, !list showall<blockquote class="uncited"><div>1:21:07 &lt;botty&gt; use: !list 1 (A-&gt;F) / !list 2 (G-&gt;L) / !list 3 (M-&gt;R) / !list 4 (S-Z) / !list showall / !list<br>                 count<br>11:21:39 &lt;botty&gt; 10 profile/s in the database<br>11:21:34 &lt;botty&gt; whole list: alpha, cyc, gamma, krystyna, narcyz, test, tomek, tomekk, xen, zenek</div></blockquote>tomek joins the chan:<blockquote class="uncited"><div>11:23:00 -!- tomek [tomekk@10.0.1.10] has joined #kupa<br>11:23:00 &lt; botty&gt; tomek has a profile. Age: 22, Location: somewhere in poland <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink">, Gender: male. To see tomek's<br>                  full profile type !view tomek</div></blockquote>!view tomek<blockquote class="uncited"><div>11:23:45 &lt;botty&gt; tomek's location: somewhere in poland <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br>11:23:45 &lt;botty&gt; tomek's age: 22<br>11:23:45 &lt;botty&gt; tomek's gender: male<br>11:23:45 &lt;botty&gt; tomek's description: here goes my desc, sd $% U$^&amp;*U"4%^#!@Q$ T%@#%=0ty34\tyhyt[ ]]\ puts '<br>11:23:45 &lt;botty&gt; tomek's kinks: emany ;D [die] zonk [\\\] \\023432df ;0<br>11:23:46 &lt;botty&gt; tomek's limits: no<br>11:23:49 &lt;botty&gt; tomek's position: no<br>11:23:50 &lt;botty&gt; tomek's orientation: no<br>11:23:52 &lt;botty&gt; tomek's web URL: <a href="http://tomekk.org/" class="postlink">http://tomekk.org/</a></div></blockquote>!setup myprofile<blockquote class="uncited"><div>11:28:17 &lt;botty&gt; hey! Your profile has been created, get your key and type some info about yourself!<br>11:28:17 &lt;botty&gt; here is your key: 441e4f5873d85827610dd265153024df, save it, you will need it later for update<br>                 or delete your profile<br>11:28:17 &lt;botty&gt; your location ;&gt;<br>11:28:24 &lt;tomekk&gt; Space<br>11:28:24 &lt;botty&gt; your age ;&gt;<br>11:28:26 &lt;tomekk&gt; 69<br>11:28:26 &lt;botty&gt; your gender ;&gt;<br>11:28:28 &lt;tomekk&gt; male<br>11:28:29 &lt;botty&gt; your description ;&gt;<br>11:28:35 &lt;tomekk&gt; some desc<br>11:28:35 &lt;botty&gt; your kinks ;&gt;<br>11:28:38 &lt;tomekk&gt; some kinks<br>11:28:39 &lt;botty&gt; your limits ;&gt;<br>11:28:40 &lt;tomekk&gt; some limits<br>11:28:41 &lt;botty&gt; your position ;&gt;<br>11:28:46 &lt;tomekk&gt; horizontal<br>11:28:46 &lt;botty&gt; your orientation ;&gt;<br>11:28:55 &lt;tomekk&gt; hmm...<br>11:28:55 &lt;botty&gt; your web URL ;&gt;<br>11:28:58 &lt;tomekk&gt; some<br>11:28:58 &lt;botty&gt; max 256 chars here and don't forget about 'http://' at the beginning<br>11:29:12 &lt;tomekk&gt; <a href="http://somewhere.blabla.com/" class="postlink">http://somewhere.blabla.com/</a><br>11:29:13 &lt;botty&gt; thanks for the answers, bye!</div></blockquote>available commands for every user: !setup, !update, !remove, !release, !view, !list<br><br>available commands for o|o: !delete, !sessions, !flush<br><br>Just try all commands, read the comments in the config header. <br>It's very easy.<br><br>I made nick, uhost, creation_date, last_update fields in database, <br>I think those fields can be useful for your PHP page.<br><br>Ahh, dont forget about <strong class="text-strong">.chanset #channel_name +intadd +profile</strong><br><br>try it, cheers<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Sun Aug 30, 2009 5:34 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2009-08-30T05:45:39-04:00</updated>

		<published>2009-08-29T08:38:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90091#p90091</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90091#p90091"/>
		<title type="html"><![CDATA[MySQL Profile Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90091#p90091"><![CDATA[
Okey, snippet,<br>I can make this (I think this will be better than teasers), but this still will be nick based right?<br>I mean, profile in the db: 'tomekk', now when some user with nick 'tomekk' joins the channel bot prints snippet for it, right? ($nick == $profile_name)<br><br>Anyway, I will add an option for enable or disable this 'thing', this on-join 'thing'<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Sat Aug 29, 2009 8:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Daedalus]]></name></author>
		<updated>2009-08-29T08:25:12-04:00</updated>

		<published>2009-08-29T08:25:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90090#p90090</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90090#p90090"/>
		<title type="html"><![CDATA[MySQL Profile Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90090#p90090"><![CDATA[
What I did when I modified the other profile script was essentially replace teasers that users set - and instead have the bot give a snippet of their profile on entry. So basically<br><br>&lt;bot&gt; Blah has a profile. Age: 29, Location: Blahland, Gender: male. To see Blah's full profile, type !view Blah<br><br>The issue was that most people seemed to think typing "!teaser" would show them a teaser, so we ended up with lots of blank teasers, or teasers with just someone's nickname in. Someone -else's- nickname in.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9095">Daedalus</a> — Sat Aug 29, 2009 8:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2009-08-28T05:49:20-04:00</updated>

		<published>2009-08-28T05:49:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90073#p90073</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90073#p90073"/>
		<title type="html"><![CDATA[MySQL Profile Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90073#p90073"><![CDATA[
hey,<br><br>I have the same problem like in this post: <a href="http://forum.egghelp.org/viewtopic.php?t=16626&amp;postdays=0&amp;postorder=asc&amp;start=30" class="postlink">http://forum.egghelp.org/viewtopic.php? ... c&amp;start=30</a><br><br>Don't you think that the nick only based teasers are kinda stupid?<br>You know what I mean, example:<br><br>user tomekk makes teaser 'tomekk', but after when I leave the server and some some other person will join with my nick then will be a mess<br><br>should I disable teasers?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Fri Aug 28, 2009 5:49 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Daedalus]]></name></author>
		<updated>2009-08-25T13:00:00-04:00</updated>

		<published>2009-08-25T13:00:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90042#p90042</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90042#p90042"/>
		<title type="html"><![CDATA[MySQL Profile Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90042#p90042"><![CDATA[
Thanks! <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=9095">Daedalus</a> — Tue Aug 25, 2009 1:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2009-08-24T11:15:43-04:00</updated>

		<published>2009-08-24T11:15:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90038#p90038</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90038#p90038"/>
		<title type="html"><![CDATA[MySQL Profile Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90038#p90038"><![CDATA[
ok, I will work on it <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Mon Aug 24, 2009 11:15 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Daedalus]]></name></author>
		<updated>2009-08-23T13:54:26-04:00</updated>

		<published>2009-08-23T13:54:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90030#p90030</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90030#p90030"/>
		<title type="html"><![CDATA[MySQL Profile Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90030#p90030"><![CDATA[
<blockquote class="uncited"><div>hi,<br><br>Which fields do you need there?<br><br>-age<br>-from aka location<br>-sex <br><br>what else?<br>I will make db for you, will be easier and faster.</div></blockquote>Sorry. Was answering this yesterday and then work bit me on the bottom firmly.<br><br>We have:<br><br>-location<br>-age<br>-gender<br>-description<br>-kinks<br>-limits<br>-position<br>-orientation<br>-web profile URL<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9095">Daedalus</a> — Sun Aug 23, 2009 1:54 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2009-08-19T04:40:27-04:00</updated>

		<published>2009-08-19T04:40:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89968#p89968</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89968#p89968"/>
		<title type="html"><![CDATA[MySQL Profile Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89968#p89968"><![CDATA[
hi,<br><br>Which fields do you need there?<br><br>-age<br>-from aka location<br>-sex <br><br>what else?<br>I will make db for you, will be easier and faster.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Wed Aug 19, 2009 4:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2009-08-17T04:05:11-04:00</updated>

		<published>2009-08-17T04:05:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89923#p89923</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89923#p89923"/>
		<title type="html"><![CDATA[MySQL Profile Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89923#p89923"><![CDATA[
OK, I'm back.<br><br>here is current config header of interviewer-addon ver 0.1b:<div class="codebox"><p>Code: </p><pre><code># if you want to use commands from this script on your chan, type in eggdrop console (via telnet or DCC chat)# .chanset #channel_name +intadd# and later .save# interviewer-addon config &lt;cut&gt;# autostart of 'questions', without any extra wordset int_questions_auto_start 0# regexp for !setup, !remove commands (default, only small and BIG letters are allowed)set int_bind_regexp {^[a-zA-Z]+$}# uniq key of each questionset int_questions_key {"age""sex""from""fps""map""track"}# questions lists, one by oneset int_questions_list {"1. what is your age?""2. what is your sex?""3. where are you from?""4. what is your fav FPS game?""5. what is your fav map?""6. what is your fav game music track?"}# questions regexps, one by oneset int_questions_regexp {{^([0-9]{1,2})$}{^(male|female|alien)$}{.*}{^(quake(1|2|3|4)|doom(1|2|3)|half life(1|2))$}{.*}{.*}}# questions help messages, one by oneset int_question_help {"only numbers are allowed (99 is max)""male, female or alien...""""quake1,2,3 or doom1,2,3 or half life1,2"""""}# bind for setup procedureset int_bind(setup) "!setup"# bind for remove procedureset int_bind(delete) "!remove"# bind for sessions procedureset int_bind(sessions) "!sessions"# bind for questions startset int_bind(questions_start) "fillme"# messagesset int_msg(int_start) "Hey! Your profile has been created, write: 'fillme' if you want to update your profile information now (3 extra questions about your person)"set int_msg(int_key) "here is your key: &amp;k, save it, you will need it later for update or delete your profile"set int_msg(int_end) "thanks for the answers, bye!"set int_msg(remove_start) "Hi, if you want to remove this profile you have to type your profile key now (paste it and press enter)"set int_msg(remove_end) "profile has been successfully removed"set int_msg(wrong_key) "you typed wrong key, if you want to try again, please use !remove &lt;profile_name&gt; again"set int_msg(just_one_command) "you can use just one command in the same time, !setup or !remove"set int_msg(profile_exists) "profile with that name already exists"set int_msg(profile_not_exists) "profile with that name doesn't exists"set int_msg(setup_already_in_use) "you can't use this command twice in the same time"set int_msg(remove_already_in_use) "you can't use this command twice in the same time"set int_msg(setup_profile_name_already_in_use) "someone is already making setup with that name"set int_msg(remove_profile_name_already_in_use) "someone is already trying to remove profile with that name"set int_msg(setup_help) "use: !setup &lt;profile_name&gt;"set int_msg(remove_help) "use: !remove &lt;profile_name&gt;"set int_msg(bind_help) "only small and BIG letters are allowed, sorry"# interviewer-addon config &lt;/cut&gt;# procs from interviewer-addon to use in your script# or if you want, you can use this script, but i think,# it will be easier to include these procs in some other script# this proc checks if some nick exists or not (in some DB),# proc should return 0 - if profile doesn't exists, 1 - when profile exists# proc takes 4 arguments, nick/uhost/chan of user and profile name# write here some sql query, check some file - whatever...proc int_check_if_profile_exists { nick uhost profile_name chan } {putquick "PRIVMSG #debug :int_check_if_profile_exists{}: $nick $uhost $profile_name $chan r0"return 0}# this proc checks if key is correct or not# proc should return 1 - if is correct, 0 - if is not# proc takes 4 arguments, nick/uhost of user, profile name and profile key# write here some sql query, check some file - whatever...proc int_check_if_key_is_correct { nick uhost profile_name profile_key } {putquick "PRIVMSG #debug :int_check_if_key_is_correct{}: $nick $uhost $profile_name $profile_key r1"return 1}# this proc is called when a profile needs to be removed# proc takes 4 arguments, nick/uhost of user, profile name and action time# write here some sql query, remove profile from some file - whateverproc int_remove_profile_event { nick uhost profile_name action_time } {putquick "PRIVMSG #debug :int_remove_profile_event{}: $nick $uhost $profile_name $action_time"}# this proc is called when new profile is created# proc takes 6 arguments, nick/uhost/chan of user, profile name, profile key and action time# write this to sql or some file - whatever...proc int_new_profile_event { nick uhost chan profile_name profile_key action_time} {putquick "PRIVMSG #debug :int_new_profile_event{}: $nick $uhost $chan $profile_name $profile_key $action_time"}# this proc is called after every answer# proc takes 6 arguments, nick/uhost/profile name of user, answer, action time and question key# write this to sql or some file - whatever...proc int_answer_event { nick uhost profile_name arg action_time question_key } {putquick "PRIVMSG #debug :int_answer_event{}: $nick $uhost $profile_name $arg $action_time $question_key"}</code></pre></div>I'm using here #debug channel to show how the procs works.<br>Currently int-addon supports only !setup and !remove by user commands.<br>There is one command !sessions for eggdrop OPer.<br>I'm still thinking about !edit option, don't know yet.<br><br>ok, chan:<blockquote class="uncited"><div>09:53:26 &lt;@tomekk&gt; !setup myprofile</div></blockquote>priv, later:<blockquote class="uncited"><div>09:53:26 &lt;botty&gt; Hey! Your profile has been created, write: 'fillme' if you want to update your profile<br>                 information now (3 extra questions about your person)<br>09:53:26 &lt;botty&gt; here is your key: d7a6dad627a189a85e6e1165c26957a9, save it, you will need it later for update<br>                 or delete your profile<br>09:53:33 &lt;tomekk&gt; fillme<br>09:53:33 &lt;botty&gt; 1. what is your age?<br>09:53:35 &lt;tomekk&gt; 22<br>09:53:36 &lt;botty&gt; 2. what is your sex?<br>09:53:38 &lt;tomekk&gt; alien<br>09:53:38 &lt;botty&gt; 3. where are you from?<br>09:53:43 &lt;tomekk&gt; Poland<br>09:53:43 &lt;botty&gt; 4. what is your fav FPS game?<br>09:53:48 &lt;tomekk&gt; blood<br>09:53:48 &lt;botty&gt; quake1,2,3 or doom1,2,3 or half life1,2<br>09:53:51 &lt;tomekk&gt; quake2<br>09:53:52 &lt;botty&gt; 5. what is your fav map?<br>09:54:00 &lt;tomekk&gt; The Edge - q2dm1<br>09:54:00 &lt;botty&gt; 6. what is your fav game music track?<br>09:54:10 &lt;tomekk&gt; sonic mayhem - operation overlord<br>09:54:11 &lt;botty&gt; thanks for the answers, bye!</div></blockquote>actions during the interview, #debug:<blockquote class="uncited"><div>09:53:26 &lt; botty&gt; int_check_if_profile_exists{}: tomekk <a href="mailto:tomekk@oswiecim.eu.org">tomekk@oswiecim.eu.org</a> myprofile #kupa r0<br>09:53:26 &lt; botty&gt; int_new_profile_event{}: tomekk <a href="mailto:tomekk@oswiecim.eu.org">tomekk@oswiecim.eu.org</a> #kupa myprofile<br>                  d7a6dad627a189a85e6e1165c26957a9 1250495495<br>09:53:36 &lt; botty&gt; int_answer_event{}: tomekk <a href="mailto:tomekk@oswiecim.eu.org">tomekk@oswiecim.eu.org</a> myprofile 22 1250495504 age<br>09:53:38 &lt; botty&gt; int_answer_event{}: tomekk <a href="mailto:tomekk@oswiecim.eu.org">tomekk@oswiecim.eu.org</a> myprofile alien 1250495507 sex<br>09:53:43 &lt; botty&gt; int_answer_event{}: tomekk <a href="mailto:tomekk@oswiecim.eu.org">tomekk@oswiecim.eu.org</a> myprofile Poland 1250495512 from<br>09:53:52 &lt; botty&gt; int_answer_event{}: tomekk <a href="mailto:tomekk@oswiecim.eu.org">tomekk@oswiecim.eu.org</a> myprofile quake2 1250495520 fps<br>09:54:00 &lt; botty&gt; int_answer_event{}: tomekk <a href="mailto:tomekk@oswiecim.eu.org">tomekk@oswiecim.eu.org</a> myprofile The Edge - q2dm1 1250495528 map<br>09:54:11 &lt; botty&gt; int_answer_event{}: tomekk <a href="mailto:tomekk@oswiecim.eu.org">tomekk@oswiecim.eu.org</a> myprofile sonic mayhem - operation overlord<br>                  1250495539 track</div></blockquote>some other user, chan:<blockquote class="uncited"><div>09:53:26 &lt; player2&gt; !remove someprofile</div></blockquote>priv, later:<blockquote class="uncited"><div>09:55:13 &lt;botty&gt; Hi, if you want to remove this profile you have to type your profile key now (paste it and<br>                 press enter)<br>09:55:22 &lt;player2&gt; somemd5keyhere</div></blockquote>#debug:<blockquote class="uncited"><div>09:55:13 &lt; botty&gt; int_check_if_profile_exists{}: player2 tomekk@10.0.1.10 myprofile #kupa r0<br>09:55:23 &lt; botty&gt; int_check_if_key_is_correct{}: player2 tomekk@10.0.1.10 myprofile somemd5keyhere r1<br>09:55:23 &lt; botty&gt; int_remove_profile_event{}: player2 tomekk@10.0.1.10 myprofile 1250495611</div></blockquote>!sessions (its just tool to see what is going on):<blockquote class="uncited"><div>09:55:40 &lt;botty&gt; nick    |    uhost    |    profile    |    qidx    |    qkey    |    amode    |    pmode<br>09:55:40 &lt;botty&gt; tomekk | <a href="mailto:tomekk@oswiecim.eu.org">tomekk@oswiecim.eu.org</a> | myprofile | 3 | fps  | 1 | setup<br>09:57:19 &lt;botty&gt; player2 | tomekk@10.0.1.10 | someprofile | 0 | age  | 0 | remove</div></blockquote>When I find some time,<br>I will try to implement it for you, to your profile script with mysql.<br><br>[edit]<br>interviewer is done, update is working ... now just your mysql ;]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Mon Aug 17, 2009 4:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Daedalus]]></name></author>
		<updated>2009-08-10T11:04:25-04:00</updated>

		<published>2009-08-10T11:04:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89825#p89825</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89825#p89825"/>
		<title type="html"><![CDATA[MySQL Profile Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89825#p89825"><![CDATA[
Looks pretty sweet.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9095">Daedalus</a> — Mon Aug 10, 2009 11:04 am</p><hr />
]]></content>
	</entry>
	</feed>
