vBulletin Modifications

php tcl eggdrop question

Welcome to vBHackers.com! - vBHackers Updates:

Go Back   vBulletin Modifications > General vBulletin Section > General vBulletin Support

Reply
 
LinkBack Thread Tools
Old 04-04-2005, 12:39 AM   #1
Junior Member
Join Date: Dec 2004
DeadGaze is on a distinguished road

Default php tcl eggdrop question

I am using an ircaddon for showing userstats from my forum to post in irc.
The userstat function is getting the user info from a php file.
Everything works flawlessly other than one problem i would like to remedy.

If someone in irc does the command for userstats using a nick that is not
registered on the forum the bot will spit out all the info as usual but it will all be blank.

I would like to add an if statement to the php so if the nick used in the command is not a member it will display a simple line of text.
eg:
!userstat mrman - if mrman is not a member i would like the bot to say so instead of displaying a bunch of blank info.

<BOT> That is not a registered member!


not sure if i need to post the php and tcl - i would think this only needs an if statement in the php and something added to the tcl maybe.... any help would be appreciated.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 04-09-2005, 10:38 AM   #2
Coder
Join Date: Aug 2004
jpno5 is on a distinguished road

Default

You must first be a registered member to view any code.
that should work with little modification




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-09-2005, 07:29 PM   #3
Coder
Join Date: Apr 2004
Location: UK
ShavedApe is on a distinguished road

Default

Quote:
Originally Posted by jpno5
You must first be a registered member to view any code.


that should work with little modification
That looks like tcl to me and thats not what he needs.

Quote:
Originally Posted by DeadGaze
not sure if i need to post the php and tcl - i would think this only needs an if statement in the php and something added to the tcl maybe.... any help would be appreciated.
It helps when you give some idea of a starting point.
You are correct it only needs an if statement but what information/variables etc are available for this if statement. Can we just move the query into the if statement etc etc. The more detail you give the easier it is for the person helping.

withought seeing at least some sort of variable to work off creating an if statement isnt easy. So youll have to fill in the blanks.

$queryname = $DBSite etc etc ........

if ($queryname[userid]) {

user exists code goes here ;

} else {
user doesnt exist code goes here
}
__________________


Feel free to ask questions here




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-10-2005, 06:36 PM   #4
Coder
Join Date: Aug 2004
jpno5 is on a distinguished road

Default

sa, thats exactly what he needs. if you query the php page and nothing is returned then the tcl script can assume no member with that nick exists. This is by far the most simplist method, changing the php will cause a lot more work in the tcl script. so instead of telling ppl they are wrong just add your opinion like the rest of us.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-10-2005, 11:53 PM   #5
Coder
Join Date: Apr 2004
Location: UK
ShavedApe is on a distinguished road

Default

Quote:
Originally Posted by jpno5
sa, thats exactly what he needs. if you query the php page and nothing is returned then the tcl script can assume no member with that nick exists. This is by far the most simplist method, changing the php will cause a lot more work in the tcl script. so instead of telling ppl they are wrong just add your opinion like the rest of us.
Ok then in my opinion its wrong. If his script sends variables specifically to eggdrop then sure it will work but its far more likely that his script sends everything in one go as one line of text to say to a chan. Or the other route maybe that his eggdrop parses a php page and grabs peice of text from the page. Again though its far more likely that it recieves everything in one go so it will probably parse a single line of text that is created in php like
Usename has 5 and 4 Pubs ......
So that said the variable username/team etc would not be empty because it would still contain has and Pubs and while your method may seem simple unless it has specific seperate variables to start with its not that simple at all.
Of course it is possible that the php code does give the eggdrop each variable seperately and if it does then sure your way will work. Its not however php code which I believe the user requested.
As for being the simplest way thats a matter of opinion but im not going to get all defensive thats clearly your job ill just provide what the user requested.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-11-2005, 03:15 AM   #6
Coder
Join Date: Aug 2004
jpno5 is on a distinguished road

Default

his php script passes variables to the tcl script, therefor most of the txt is already in the tcl file. thats why it will still spits out the info if no user exists.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 04-11-2005, 03:21 AM   #7
Coder
Join Date: Apr 2004
Location: UK
ShavedApe is on a distinguished road

Default

Well then clearly you have more information on the script he is using than was given by him in his post.
I base my answers on his request and information given.

If what you say is true on how his script works he doesnt want php code at all as per his request he does in fact need tcl and yes a modified version of your code would work.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 03-24-2006, 10:32 AM   #8
Junior Member
Join Date: Nov 2005
BoBi is on a distinguished road

Default

I also have such problem & im using
You must first be a registered member to view any code.
some1 know what to do with that??




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
php tcl eggdrop - repost DeadGaze General vBulletin Support 14 03-25-2006 06:20 AM
PHP question, please help me !!! Homie Off Topic 3 08-23-2005 11:38 AM
tcl / php interaction Sphinx General vBulletin Support 2 08-16-2005 07:44 PM
PHP Vulnerabilities in <= 4.3.9 and <= 5.0.2 Junior Announcements 0 05-11-2005 05:19 AM
[JOB OPENINGS] Web, Logo and Banner Designer, vBulletin skiners and PHP Coder needed! rockwilder Off Topic 1 02-20-2005 11:17 PM


All times are GMT -3. The time now is 05:44 PM.


SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc. (Patent Pending)