egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

MySQL Profile Script
Goto page 1, 2  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Daedalus
Voice


Joined: 27 Jun 2007
Posts: 24

PostPosted: Mon Aug 03, 2009 2:31 pm    Post subject: MySQL Profile Script Reply with quote

Okay, so, I've been playing around with another profile script found on this here forum. Only problem is, I'd like to tie together a stats system I'm making to profile pages on a website. IE, people click the name in the stats list and see a web version of the profile created on the bot on IRC.

The profile script that already exists stores in a series of flatfiles, which is proving much too slow for my purposes (unsurprisingly).

So my idea was to switch over to mysql storage.

Unfortunately, I don't know very much about Tcl with relation to mysql in particular, and looking at examples of code for it (IE MyQuotes.tcl and so on) has not yet proved awesomely enlightening for me.

Since I was thinking along lines of rewriting said profile script anyway, this is basically what I'd like it to do:

1. User types !setup in channel.
2. Bot asks user a series of questions. Each response to those questions is then stored as $location, $age, and so on.
3. After the questions are completed (and not before), the bot then writes each answer ($location, $age, etc) to the mysql database.
4. On success, it says "blah has created a new profile <teaser here>" in channel and informs the user in PM that the profile has successfully written.
5. If the questions are not answered in a set time, it cancels the "interview" mode and deletes any stored data from memory OR writes to a temp file that the user will be asked if they wish to use the next time they try to set up their profile (entirely optional but I think a sweet idea for anyone who gets disconnected halfway through entering their profile).

Obviously, it can be a LOT more basic than this, but the key needs are

1. mysql storage
2. "interview" style

Completely optional (can probably do this myself once I can see how it's storing everything) would be to have a second command, !edit, which would open up a similar interview-style chat with the bot. The user would be asked to type !location blah blah blah or whatever field they wish to edit, and then when done to type !done. Then changes are written to the database, and again the two messages - one to confirm completion to the user, a second to inform the channel that the user has modified their profile.

Anyone willing to help, pretty please with cherries on top and I might even throw in some whipped cream? Very Happy
Back to top
View user's profile Send private message
Daedalus
Voice


Joined: 27 Jun 2007
Posts: 24

PostPosted: Mon Aug 03, 2009 2:35 pm    Post subject: Reply with quote

Secondarily it would be good if the bot also posted a teaser on channel entry. Like at the moment the bot spouts something like

<Bot> $nick has a profile. Sex: blah Age: blah Location: blah - to view the profile, type !view $nick
Back to top
View user's profile Send private message
tomekk
Master


Joined: 28 Nov 2008
Posts: 255
Location: Oswiecim / Poland

PostPosted: Tue Aug 04, 2009 2:12 pm    Post subject: Reply with quote

some long time ago i wrote something similar to this,
i made it for clan of lineage2 players

script needs edit option and profile delete option controled by user,
because in this state only OP can drop profile from the database by typing !drop <profile_name>

some examples:
Quote:
19:52:40 <@player1> !setup


Quote:
19:52:40 <botty> interview - 3 questions, okey, let's start...
19:52:40 <botty> here is your profile key, please save it: 51777b09ff44cdaadc6e2ab47e0a1afb
19:52:40 <botty> 1st - what is your age?
19:52:47 <player1> 22
19:52:47 <botty> 2nd - what is your sex?
19:52:50 <player1> alien
19:52:50 <botty> 3rd - where are you from?
19:52:55 <player1> space
19:52:56 <botty> thanks, that's all

Quote:
19:52:56 < botty> new profile for player1


Quote:
19:52:40 <@player1> !index

Quote:
19:53:48 <botty> profiles list: player1 player2


Quote:
20:08:58 <botty> 1st - what is your age?
20:09:01 <player3> abc
20:09:01 <botty> only numbers are allowed (99 is max)
20:09:02 <player3> 21
20:09:02 <botty> 2nd - what is your sex?
20:09:05 <player3> some
20:09:06 <botty> male, female or alien...
20:09:09 <player3> male
20:09:09 <botty> 3rd - where are you from?
20:09:12 <player3> home
20:09:12 <botty> thanks, that's all


mysql:
Quote:
mysql> select * from users;
+----+----------+----------------------------------+------+-------+----------+
| id | nickname | md5key | age | sex | location |
+----+----------+----------------------------------+------+-------+----------+
| 24 | player1 | 51777b09ff44cdaadc6e2ab47e0a1afb | 22 | alien | space |
| 25 | player2 | ed79eb8d907a3508a47b08b45a0449f8 | 32 | male | home |
+----+----------+----------------------------------+------+-------+----------+
2 rows in set (0.00 sec)


of course you can make more or less columns,
you just have to change some vars in script thats all

config header from script:
Code:
# mysql user
set int_mysql_user "user"

# mysql pass
set int_mysql_pass "pass"

# mysql db
set int_mysql_db "profiles"

# mysql host
set int_mysql_host "localhost"

# &k - will be a md5 key
# &n - will be a nickname

# msg occurs when the interview starts
set int_start_msg "interview - 3 questions, okey, let's start..."

# msg occurs when the interview ends
set int_end_msg "thanks, that's all

# msg occurs when the second person is trying to use !setup in the same time with other person"
set int_started_msg "interview started by someone else, please try again later"

# msg occurs when script shows the profile key (key for deleting profile by user)
set int_key_msg "here is your profile key, please save it: &k"

# msg occurs when someone is trying to make a profile with name which already exists in db
set int_profile_exist_msg "profile for this nick already exists"

# msg occurs on the channel when the interview ends
set int_end_chan_msg "new profile for &n"

# msg occurs when nick with registered profile joins the channel
set int_join_msg "profile for &n is available, you can view it by using !profile &n"

# msgs occurs when some type !profile
# the number of fields must be the same like the number of question_keys
set preview_texts {
   "&n age:"
   "&n sex:"
   "&n location:"
}

# mysql extra columns names (the same names like in mysql database, don't change this to anything else)
# of course, you can define more, but you have to change this in your db too ;)
# id, nickname, md5key must be always
set questions_keys {
   "age"
   "sex"
   "location"
}

# text for each question
set questions_texts {
   "1st - what is your age?"
   "2nd - what is your sex?"
   "3rd - where are you from?"
}

# optional regexp for each question
# if want to disable regexp, use {.*} - that means any chars
set questions_regexps {
   {^([0-9]{1,2})$}
   {^(male|female|alien)$}
   {.*}
}

# if some regexp don't match, output proper info to the user
set regexps_texts {
   "only numbers are allowed (99 is max)"
   "male, female or alien..."
   ""
}


database file in this case:
Code:
create table users (
        id int(4) auto_increment,
        nickname varchar(32),
        md5key varchar(32),
        age varchar(2),
        sex varchar(6),
        location varchar(64),
        primary key(id)
);


In this script, only one person can use !setup command in the same time.

I think there will be some problems with language special chars, cause of different encoding systems.
With ASCII chars all should be ok.

Script unlocks !setup command when user gets dc, sign or kick from the channel.
Script uses /dev/urandom to get some random chars for key generator.

Like i said, i wrote it long time ago, some things could be changed/added.
Back to top
View user's profile Send private message Visit poster's website
Daedalus
Voice


Joined: 27 Jun 2007
Posts: 24

PostPosted: Wed Aug 05, 2009 2:06 pm    Post subject: Reply with quote

That looks interesting, tomekk... the only thing is the whole "1 person at a time thing" but I'm sure something could be figured out.
Back to top
View user's profile Send private message
tomekk
Master


Joined: 28 Nov 2008
Posts: 255
Location: Oswiecim / Poland

PostPosted: Wed Aug 05, 2009 3:41 pm    Post subject: Reply with quote

yeah I know, that system is horrible

I'm going on vacation for a week tomorrow,
I will try to rewrite it when i'll be back and I will try to make some pseudo session manager for multiuser !setup etc.
Back to top
View user's profile Send private message Visit poster's website
Daedalus
Voice


Joined: 27 Jun 2007
Posts: 24

PostPosted: Thu Aug 06, 2009 7:52 am    Post subject: Reply with quote

Awesome, thank you very much! Very Happy
Back to top
View user's profile Send private message
tomekk
Master


Joined: 28 Nov 2008
Posts: 255
Location: Oswiecim / Poland

PostPosted: Thu Aug 06, 2009 8:01 am    Post subject: Reply with quote

I left this script and in da night, I made new one,
I have no time to finish it now,
but I can show you how it works

I wrote "interviewer-addon" its a script which can !setup new profile and ask some questions and thats all, all other stuff like !view or something else you have to make at yourself

!setup of course is in multiuser mode, script is easy to configure and easy to implement in any regular script

script checks if nick left/sign got kicked from the chan or if some user change his nick during the !setup

I made pseudo session manager (some lists in eggdrop memory)
I have to fix/change/test some things,
but now, script in working in this state

ok, config header from interviewer-addon:
Code:

set int_bind(setup) "!setup"
set int_bind(update) "!update"
set int_bind(dev_tool) "!sessions"
set int_bind(questions_start) "fill_me_now"

set int_msg(begin) "Hey! Your profile has been created, write: 'fill_me_now' if you want to update your profile information now (3 extra questions about your person)"
set int_msg(key) "here is your key: &k, save it, you will need it later for edit or delete your profile"
set int_msg(end) "thanks for the answers, bye!"
set int_msg(profile_exists) "profile with that name already exists in db!"
set int_msg(setup_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 making setup with that name right now"
set int_msg(setup_help) "use: !setup <profile_name>"
set int_msg(edit_help) "use: !update <profile_name>"

set int_questions_key {
   "age"
   "sex"
   "from"
}

set int_questions_list {
   "1. what is your age?"
   "2. what is your sex?"
   "3. where are you from?"
}

set int_questions_regexp {                                     
   {^([0-9]{1,2})$}                                   
   {^(male|female|alien)$}                             
   {.*}                                               
}                                                           

set int_question_help {                                         
   "only numbers are allowed (99 is max)"             
   "male, female or alien..."                         
   ""                                                 
}   

# 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 profile creator, profile name
# write here some sql query, check some file - whatever...
proc int_check_if_exists { nick uhost chan profile_name } {
   putquick "PRIVMSG $nick :int_check_if_exists{}: $nick $uhost $chan $profile_name 0"
   return 0
}

# this proc is called when new profile is created
# proc takes 6 arguments, nick/uhost/chan of profile creator, profile name, profile key and profile creation time
# write this data to sql or some file - whatever...
proc int_new_profile_event { nick uhost chan profile_name profile_key action_time} {
   putquick "PRIVMSG $nick :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 answerer, answer, action time and question key
# write this data to sql or some file - whatever...
proc int_answer_event { nick uhost profile_name arg action_time question_key } {
   putquick "PRIVMSG $nick :int_answer_event{}: $nick $uhost $profile_name $arg $action_time $question_key"
}


i will make comments when i finish it, you can use it as standalone script for interview only or you can connect it with another script, example:
Code:
# start interviewer-addon config
set int_bind(setup) "!setup"
set int_bind(update) "!update"
set int_bind(dev_tool) "!sessions"
set int_bind(questions_start) "fill_me_now"

set int_msg(begin) "Hey! Your profile has been created, write: 'fill_me_now' if you want to update your profile information now (3 extra questions about your person)"
set int_msg(key) "here is your key: &k, save it, you will need it later for edit or delete your profile"
set int_msg(end) "thanks for the answers, bye!"
set int_msg(profile_exists) "profile with that name already exists in db!"
set int_msg(setup_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 making setup with that name right now"
set int_msg(setup_help) "use: !setup <profile_name>"
set int_msg(edit_help) "use: !update <profile_name>"

set int_questions_key {
   "age"
   "sex"
   "from"
}

set int_questions_list {
   "1. what is your age?"
   "2. what is your sex?"
   "3. where are you from?"
}

set int_questions_regexp {                                     
   {^([0-9]{1,2})$}                                   
   {^(male|female|alien)$}                             
   {.*}                                               
}                                                           

set int_question_help {                                         
   "only numbers are allowed (99 is max)"             
   "male, female or alien..."                         
   ""                                                 
}   
# end of interviewer-addon config

# some other script variables, like in normal tcl script for eggdrop...
set myvar 0
set myvar2 "whatever"

######################################################################
# some other script bind, like in normal tcl script for eggdrop...
bind pub -|- !view view_proc

# some normal, script proc
proc view_proc { nick uhost hand chan arg } {
   putquick "PRIVMSG $chan :here is proc for viewing the profile, write here what you need, sql query, fetch some data from file and print it out ;)"
}

# proc from interviewer-addon
proc int_check_if_exists { nick uhost chan profile_name } {
   putquick "PRIVMSG $nick :int_check_if_exists{}: $nick $uhost $chan $profile_name 0"
   return 0
}

# proc from interviewer-addon
proc int_new_profile_event { nick uhost chan profile_name profile_key action_time} {
   putquick "PRIVMSG $nick :int_new_profile_event{}: $nick $uhost $chan $profile_name $profile_key $action_time"
}

# proc from interviewer-addon
proc int_answer_event { nick uhost profile_name arg action_time question_key } {
   putquick "PRIVMSG $nick :int_answer_event{}: $nick $uhost $profile_name $arg $action_time $question_key"
}

putlog "some-profile-script.tcl ver 0.666"

# don't forget to add this line at the end of your script
# interviewer include
source scripts/interviewer-0.1.tcl


ok, lets run eggy:
Quote:
[tomekk@zonk]:~/eggdrop# ./restart

Eggdrop v1.6.18+RC1 (C) 1997 Robey Pointer (C) 2006 Eggheads
[13:50] --- Loading eggdrop v1.6.18+RC1 (Thu Aug 6 2009)
[13:50] Listening at telnet port 1666 (users).
[13:50] Module loaded: server
[13:50] Module loaded: channels
[13:50] Module loaded: irc
[13:50] Module loaded: blowfish
[13:50] Module loaded: dns
[13:50] some-profile-script.tcl ver 0.666
[13:50] interviewer-addon.tcl ver 0.1b by tomekk loaded
[13:50] Userfile loaded, unpacking...
[13:50] === botty: 1 channels, 2 users.
Launched into the background (pid: 4756)


now some irc actions:
- chan
Quote:
13:40:13 <@tomekk> !setup myprofile


- priv
Quote:
13:40:13 -!- Irssi: Starting query in 10 with botty
13:40:13 <botty> int_check_if_exists{}: tomekk tomekk@oswiecim.eu.org #kupa myprofile 0
13:40:13 <botty> int_new_profile_event{}: tomekk tomekk@oswiecim.eu.org #kupa myprofile
37ddc19f9ea6e0c8b1eee0d50ea5b140 1249558721
13:40:13 <botty> Hey! Your profile has been created, write: 'fill_me_now' if you want to update your profile
information now (3 extra questions about your person)
13:40:17 <botty> here is your key: 37ddc19f9ea6e0c8b1eee0d50ea5b140, save it, you will need it later for edit or
delete your profile
13:40:20 <tomekk> fill_me_now
13:40:20 <botty> 1. what is your age?
13:40:23 <tomekk> asd
13:40:23 <botty> only numbers are allowed (99 is max)
13:40:25 <tomekk> 22
13:40:25 <botty> int_answer_event{}: tomekk tomekk@oswiecim.eu.org myprofile 22 1249558733 age
13:40:26 <botty> 2. what is your sex?
13:40:33 <tomekk> hard to say
13:40:33 <botty> male, female or alien...
13:40:35 <tomekk> alien
13:40:35 <botty> int_answer_event{}: tomekk tomekk@oswiecim.eu.org myprofile alien 1249558743 sex
13:40:35 <botty> 3. where are you from?
13:41:00 <tomekk> home
13:41:00 <botty> int_answer_event{}: tomekk tomekk@oswiecim.eu.org myprofile home 1249558768 from
13:41:00 <botty> thanks for the answers, bye!


this example without any db implementation, just with PUTQUICK's echoes

- chan, !sessions (its tool for oper which show current sessions on priv)
Quote:
13:40:55 <botty> nick | uhost | profile | qidx | amode
13:40:55 <botty> tomekk | tomekk@oswiecim.eu.org | myprofile | 2 | 1


I'm thinking about the update/delete function.
What else, I think this script is easy to implement. It adds some extra procedures thats all, you have to add some lines with store/read data from somewhere.
There will be some procs more, like the one for checking if the profile key is correct.

Script takes 16 bytes with random chars from /dev/urandom for md5key generator.
I think I will make second option, for windows users.

cheers
Back to top
View user's profile Send private message Visit poster's website
Daedalus
Voice


Joined: 27 Jun 2007
Posts: 24

PostPosted: Mon Aug 10, 2009 11:04 am    Post subject: Reply with quote

Looks pretty sweet.
Back to top
View user's profile Send private message
tomekk
Master


Joined: 28 Nov 2008
Posts: 255
Location: Oswiecim / Poland

PostPosted: Mon Aug 17, 2009 4:05 am    Post subject: Reply with quote

OK, I'm back.

here is current config header of interviewer-addon ver 0.1b:
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 <cut>
# autostart of 'questions', without any extra word
set 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 question
set int_questions_key {
   "age"
   "sex"
   "from"
   "fps"
   "map"
   "track"
}

# questions lists, one by one
set 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 one
set 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 one
set 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 procedure
set int_bind(setup) "!setup"

# bind for remove procedure
set int_bind(delete) "!remove"

# bind for sessions procedure
set int_bind(sessions) "!sessions"

# bind for questions start
set int_bind(questions_start) "fillme"

# messages
set 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: &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 <profile_name> 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 <profile_name>"
set int_msg(remove_help) "use: !remove <profile_name>"
set int_msg(bind_help) "only small and BIG letters are allowed, sorry"
# interviewer-addon config </cut>

# 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 - whatever
proc 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"
}


I'm using here #debug channel to show how the procs works.
Currently int-addon supports only !setup and !remove by user commands.
There is one command !sessions for eggdrop OPer.
I'm still thinking about !edit option, don't know yet.

ok, chan:
Quote:
09:53:26 <@tomekk> !setup myprofile


priv, later:
Quote:
09:53:26 <botty> Hey! Your profile has been created, write: 'fillme' if you want to update your profile
information now (3 extra questions about your person)
09:53:26 <botty> here is your key: d7a6dad627a189a85e6e1165c26957a9, save it, you will need it later for update
or delete your profile
09:53:33 <tomekk> fillme
09:53:33 <botty> 1. what is your age?
09:53:35 <tomekk> 22
09:53:36 <botty> 2. what is your sex?
09:53:38 <tomekk> alien
09:53:38 <botty> 3. where are you from?
09:53:43 <tomekk> Poland
09:53:43 <botty> 4. what is your fav FPS game?
09:53:48 <tomekk> blood
09:53:48 <botty> quake1,2,3 or doom1,2,3 or half life1,2
09:53:51 <tomekk> quake2
09:53:52 <botty> 5. what is your fav map?
09:54:00 <tomekk> The Edge - q2dm1
09:54:00 <botty> 6. what is your fav game music track?
09:54:10 <tomekk> sonic mayhem - operation overlord
09:54:11 <botty> thanks for the answers, bye!


actions during the interview, #debug:
Quote:
09:53:26 < botty> int_check_if_profile_exists{}: tomekk tomekk@oswiecim.eu.org myprofile #kupa r0
09:53:26 < botty> int_new_profile_event{}: tomekk tomekk@oswiecim.eu.org #kupa myprofile
d7a6dad627a189a85e6e1165c26957a9 1250495495
09:53:36 < botty> int_answer_event{}: tomekk tomekk@oswiecim.eu.org myprofile 22 1250495504 age
09:53:38 < botty> int_answer_event{}: tomekk tomekk@oswiecim.eu.org myprofile alien 1250495507 sex
09:53:43 < botty> int_answer_event{}: tomekk tomekk@oswiecim.eu.org myprofile Poland 1250495512 from
09:53:52 < botty> int_answer_event{}: tomekk tomekk@oswiecim.eu.org myprofile quake2 1250495520 fps
09:54:00 < botty> int_answer_event{}: tomekk tomekk@oswiecim.eu.org myprofile The Edge - q2dm1 1250495528 map
09:54:11 < botty> int_answer_event{}: tomekk tomekk@oswiecim.eu.org myprofile sonic mayhem - operation overlord
1250495539 track


some other user, chan:
Quote:
09:53:26 < player2> !remove someprofile


priv, later:
Quote:
09:55:13 <botty> Hi, if you want to remove this profile you have to type your profile key now (paste it and
press enter)
09:55:22 <player2> somemd5keyhere


#debug:
Quote:
09:55:13 < botty> int_check_if_profile_exists{}: player2 tomekk@10.0.1.10 myprofile #kupa r0
09:55:23 < botty> int_check_if_key_is_correct{}: player2 tomekk@10.0.1.10 myprofile somemd5keyhere r1
09:55:23 < botty> int_remove_profile_event{}: player2 tomekk@10.0.1.10 myprofile 1250495611


!sessions (its just tool to see what is going on):
Quote:
09:55:40 <botty> nick | uhost | profile | qidx | qkey | amode | pmode
09:55:40 <botty> tomekk | tomekk@oswiecim.eu.org | myprofile | 3 | fps | 1 | setup
09:57:19 <botty> player2 | tomekk@10.0.1.10 | someprofile | 0 | age | 0 | remove


When I find some time,
I will try to implement it for you, to your profile script with mysql.

[edit]
interviewer is done, update is working ... now just your mysql ;]
Back to top
View user's profile Send private message Visit poster's website
tomekk
Master


Joined: 28 Nov 2008
Posts: 255
Location: Oswiecim / Poland

PostPosted: Wed Aug 19, 2009 4:40 am    Post subject: Reply with quote

hi,

Which fields do you need there?

-age
-from aka location
-sex

what else?
I will make db for you, will be easier and faster.
Back to top
View user's profile Send private message Visit poster's website
Daedalus
Voice


Joined: 27 Jun 2007
Posts: 24

PostPosted: Sun Aug 23, 2009 1:54 pm    Post subject: Reply with quote

tomekk wrote:
hi,

Which fields do you need there?

-age
-from aka location
-sex

what else?
I will make db for you, will be easier and faster.


Sorry. Was answering this yesterday and then work bit me on the bottom firmly.

We have:

-location
-age
-gender
-description
-kinks
-limits
-position
-orientation
-web profile URL
Back to top
View user's profile Send private message
tomekk
Master


Joined: 28 Nov 2008
Posts: 255
Location: Oswiecim / Poland

PostPosted: Mon Aug 24, 2009 11:15 am    Post subject: Reply with quote

ok, I will work on it Wink
Back to top
View user's profile Send private message Visit poster's website
Daedalus
Voice


Joined: 27 Jun 2007
Posts: 24

PostPosted: Tue Aug 25, 2009 1:00 pm    Post subject: Reply with quote

Thanks! Very Happy
Back to top
View user's profile Send private message
tomekk
Master


Joined: 28 Nov 2008
Posts: 255
Location: Oswiecim / Poland

PostPosted: Fri Aug 28, 2009 5:49 am    Post subject: Reply with quote

hey,

I have the same problem like in this post: http://forum.egghelp.org/viewtopic.php?t=16626&postdays=0&postorder=asc&start=30

Don't you think that the nick only based teasers are kinda stupid?
You know what I mean, example:

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

should I disable teasers?
Back to top
View user's profile Send private message Visit poster's website
Daedalus
Voice


Joined: 27 Jun 2007
Posts: 24

PostPosted: Sat Aug 29, 2009 8:25 am    Post subject: Reply with quote

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

<bot> Blah has a profile. Age: 29, Location: Blahland, Gender: male. To see Blah's full profile, type !view Blah

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber