vBulletin Modifications

php tcl eggdrop - repost

Welcome to vBHackers.com! - vBHackers Updates:

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

Reply
 
LinkBack Thread Tools
Old 08-30-2005, 08:58 PM   #1
Junior Member
Join Date: Dec 2004
DeadGaze is on a distinguished road

Default php tcl eggdrop - repost

I have been gone for some time and have just got around to checking up on things.
Previously posted:
php tcl eggdrop question

After reading my original post, I was still a bit lost.
Sorry i did'nt post any of the code to begin with.
I should have but must have been in a rush.


The below posted php and tcl is the code that works for me.
I just need the bot to respond to non member names with one line - and not
a bunch of blank results.

Example:
goodboy is a member so the result would be:

•5:16PM• <goodboy> !user goodboy
•5:16PM• <bot> Forum User Stats For: goodboy
•5:16PM• <bot> [FxP Team: ind]
•5:16PM• <bot> [Posts: 2015]
•5:16PM• <bot> [Filled: 128]
•5:16PM• <bot> [Hacks: 35]
•5:16PM• <bot> [Scans: 28]
•5:16PM• <bot> [Races: 10]
•5:16PM• <bot> [Mirrors: 69]
•5:16PM• <bot> [Leeched: 5]
•5:16PM• <bot> [Credits: $8852]

If there was no member goodboy the bot shows the same as above - just with no info for username or stats.


•5:16PM• <goodboy> !user goodboy
•5:16PM• <bot> Forum User Stats For:
•5:16PM• <bot> [FxP Team: ]
•5:16PM• <bot> [Posts: ]
•5:16PM• <bot> [Filled: ]
•5:16PM• <bot> [Hacks: ]
•5:16PM• <bot> [Scans: ]
•5:16PM• <bot> [Races: ]
•5:16PM• <bot> [Mirrors: ]
•5:16PM• <bot> [Leeched: ]
•5:16PM• <bot> [Credits: $]


If the username used is not a member i would rather one line be shown:

•5:16PM• <stumpy> !user stumpy
•5:16PM• <bot> Stumpy is not a registerd member.


PHP:

You must first be a registered member to view any code.

TCL:

You must first be a registered member to view any code.

Any help would be appreciated.
I would think this is a simple fix as well.
Im just a bit stumped.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 08-31-2005, 06:41 AM   #2
Junior Member
Join Date: May 2005
Decept is on a distinguished road

Default

well, it doesn't work with SA's pack, cause there's no DB called userid, username or fxp_hacksettings
so please tell me for what pack this is:/

Quote:
[11:48] Tcl error [stat]: invalid command name "else"

Last edited by Decept; 08-31-2005 at 06:49 AM.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-31-2005, 06:43 AM   #3
Member
Join Date: Jun 2005
biocore is on a distinguished road

Default

Quote:
Originally Posted by Decept
well, it doesn't work with SA's pack, cause there's no DB called userid, username or fxp_hacksettings
so please tell me for what pack this is:/
then just change the tables it reffers to get it to work with sa, but i don't think that's what deadgaze is looking for, but can't help ya either deadgaze been looking for that too myself ;)




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-31-2005, 06:50 AM   #4
Junior Member
Join Date: May 2005
Decept is on a distinguished road

Default

well, I'm not really a star at tcl or something, but that code isn't right either




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

Default

Ok i have to watch what I say here cos whoever wrote it may read this so.
Ideally the code should be rewritten and done cleaner but I will do my best to work with what I have.
Personally I would do it completely differently if you had my IRC announce it would be so much easier.

Last edited by ShavedApe; 08-31-2005 at 12:41 PM.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-31-2005, 04:28 PM   #6
Member
Join Date: Jun 2005
biocore is on a distinguished road

Default

But let's not get offtopic and try to help DeadGaze with his problem, shavedape i would think that you can do this off the top of your head or am i incorrect ?




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-31-2005, 06:33 PM   #7
Coder
Join Date: Apr 2004
Location: UK
ShavedApe is on a distinguished road

Default

ok now this may not be perfect but it wasnt from the start and short of throwing it away and starting again there isnt much I can do about that.


Replace the php you have with this one. this code removes what i saw to be unessacary queries and one that appeared to do nothing at all.
You must first be a registered member to view any code.
Now the tcl above i couldnt for some reason get to work unless i changed it around a little bit but even now its very dirty code this whole thing can be done so much cleaner but anyway replace the tcl you have with this

You must first be a registered member to view any code.
Remember .rehash on bot.
__________________


Feel free to ask questions here

Last edited by ShavedApe; 08-31-2005 at 11:21 PM.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-31-2005, 06:34 PM   #8
vB User
Join Date: Oct 2004
Real Name: Matti
Location: Mechelen
MaTtIaSkE is on a distinguished road

Default

it's easy
just add an if structure in it before you say the info to the channel

if { $nick == "" } {
putquick "PRIVMSG $channel :\002\0037$nick isn't found in the DB\003"

} else {

putquick "PRIVMSG $channel :\002\0037Forum User Stats For:\003 $nick ";
putquick "PRIVMSG $channel :\0037\002\[\0037FxP Team: \003$team\0037\002]";
putquick "PRIVMSG $channel :\0037\002\[\0037Posts:\003 $post\0037\002]";
putquick "PRIVMSG $channel :\0037\002\[\0037Filled:\003 $pub\0037\002]";
putquick "PRIVMSG $channel :\0037\002\[\0037Hacks:\003 $hacks\0037\002]";
putquick "PRIVMSG $channel :\0037\002\[\0037Scans:\003 $scan\0037\002]";
putquick "PRIVMSG $channel :\0037\002\[\0037Races:\003 $race\0037\002]";
putquick "PRIVMSG $channel :\0037\002\[\0037Mirrors:\003 $mirror\0037\002]";
putquick "PRIVMSG $channel :\0037\002\[\0037Leeched:\003 $leeches\0037\002]";
putquick "PRIVMSG $channel :\0037\002\[\0037Credits:\003 $$credits\0037\002]"
}




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-31-2005, 11:01 PM   #9
Junior Member
Join Date: Dec 2004
DeadGaze is on a distinguished road

Default

WOW - thanks for the responses guy's.
I will look into each opinion and get back with the results.

Thanks again!




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

Default

i forgot to change all instances of $get4 in hte php for $user earlier
now done in post above now.




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 question DeadGaze General vBulletin Support 7 03-24-2006 10:32 AM
Free eggdrop shells? InStyle General vBulletin Support 5 03-19-2006 07:06 AM
how can i get the user id and username just with PHP? AnoxiA General vBulletin Support 12 02-04-2006 03:21 PM
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


All times are GMT -3. The time now is 09:32 PM.


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