This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

autoop/autovoice

Old posts that have not been replied to for several years.
Locked
n
ny
Voice
Posts: 1
Joined: Tue Jan 18, 2005 6:35 pm
Contact:

autoop/autovoice

Post by ny »

hi,

on a mysql based bulletin board i have a table
bb1_users with a lot of fields, three of them are
"ismod"
"issupermod"
"isadmin"

my eggdrop should autovoice peoples on join who are
ismod = 1
and autoop peoples who are
isadmin = 1
issupermod = 1

and the nicknames must be regged by nickserv

how must my query look on my eggdrop an otherway is to fetch a php generated file with the infos on it...
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

use mysql tcl do a select query and read from the db, i should say that its preferably that you make sutch a thing local because in my experiance eggdrops connecting to a remote mysql db have trouble they freeze.. , but you could write an php script that reads it for you serv it on your http then make the eggdrop use http protocol to read it out..
XplaiN but think of me as stupid
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

Ofloo wrote:use mysql tcl do a select query and read from the db, i should say that its preferably that you make sutch a thing local because in my experiance eggdrops connecting to a remote mysql db have trouble they freeze.. , but you could write an php script that reads it for you serv it on your http then make the eggdrop use http protocol to read it out..
I wrote a backend php script that requested the information from my mysql database.

Depending on what was passed through $_get, php pulled the requested information out of the database and in tcl parsed the webpage returned. I Never had my bot freeze doing it this way. I Also added a queue system for if the http was down or couldn't connect it retried every minute until it was back then executed the queue. :wink:
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

^DooM^ wrote:
Ofloo wrote:use mysql tcl do a select query and read from the db, i should say that its preferably that you make sutch a thing local because in my experiance eggdrops connecting to a remote mysql db have trouble they freeze.. , but you could write an php script that reads it for you serv it on your http then make the eggdrop use http protocol to read it out..
I wrote a backend php script that requested the information from my mysql database.

Depending on what was passed through $_get, php pulled the requested information out of the database and in tcl parsed the webpage returned. I Never had my bot freeze doing it this way. I Also added a queue system for if the http was down or couldn't connect it retried every minute until it was back then executed the queue. :wink:
i said a remote mysql server you use http as i suggested .. :P, i think it froze tho because it was blocked by firewall
XplaiN but think of me as stupid
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

The Bot was remote to the SqlDB but as you said it could of been firewall issues. :D
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

no using a backend php script is a http interface and not a direct connection to the sql server as i suggested

the direct connection to mysql server had problems you know using mysqltcl, because its a sync socket and not assync there for the bot waits untill the socket ends.. i suppose..

still when your working remotly its not suggested because the server might not always be reachable, so.... i am not sur what froze it .. just saying, only thing i did know was that it froze even when i opend the socket it froze so..

and because ive used http servers a few times myself and they seemed to work just fine..

altho don't use the http lib from tcllib the eggdrop crashes after a few times, thats my experiance

by direct connection i mean to the mysql daemon and not use any backend crap, ..

never mind.. , just you say that its not true , because you use http all the time i am not talking about http, i was talking about a direct connection to mysql daemon, ..

:P don't wana be offensive in anyway just pointing out that you should read it a bit closer ;)

or i miss understood and your just agreeing .. in that case never mind the comments
XplaiN but think of me as stupid
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

I was agreeing with you :lol:
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
Locked