UBB.Dev
Posted By: tackaberry Code Hunter: The UBB™ Game - 11/27/2002 8:44 PM
Think you know your UBB™ code? Prove it!

Code Hunter is a new UBBDev Contest/Game.

Here are the rules. Below are 5 snippets of code from random UBB files. It is your job to identify them. You will have 1 week to get you guesses in. The person who gets the most right, first is the winner for the week and will receive a special avatar.

Entries must be mailed to codehunter@ubbdev.com. DO NOT post responses in the forums, they will be deleted and you will be ineligible to participate in future games. Moderators and Administrators are welcome to play, however, Charles Capps, Ted O'Neill and Dave Dreezer are not tipsy

In your entry you must identify the following:
  • The file name
  • where it can be located (i.e. subroutine, module, line number)
  • what you think it does

Good luck...this code is based on version 6.3.1.2. If you are not running that version, you can still play by downloading a clean copy from the Infopop members area. Same goes for those with modified boards...a clean copy might be easier to use.
Deadline to participate is Wednesday, December 4, 12:01am UBBDev time. One entrant per registered user. Good luck!
Snippet #1
Quote
code:
Code
	my $stringification = "";    # *twitch*

$stringification .= qq!%pm_user_index = (n!;

Snippet #2
code:
[qb]
Code
	&SafeGetThreadData2($forum_from, $topic_from);
&SafeGetThreadData2($forum_to, $topic_to);
[/qb]
Snippet #3
Quote
code:
Code
	$sc->{options} = undef;
foreach my $n (1 .. $sc->{opts}) {
$in{"q$n" . "name$quest"} = &strip_lead_trail_whitespace($in{"q$n" . "name$quest"});

Snippet #4
code:
[qb]
Code
	my ($whole, $dec) = split (/./, $_[0]);
if ($dec > 49) { $whole++; }
return ($whole);
}
[/qb]
Snippet #5
Code
	if (&FileExists("$vars_config{MembersPath}/user_posts/$in{u}.cgi")) {
@posts = &OpenFileAsArray("$vars_config{MembersPath}/user_posts/$in{u}.cgi");
}
Note: all code is Copyright Infopop Corporation, 2002 and is used here with permission.
Posted By: LK Re: Code Hunter: The UBB™ Game - 11/27/2002 8:52 PM
I guess I'm also not allowed to participate wink
Posted By: tackaberry Re: Code Hunter: The UBB™ Game - 11/27/2002 8:55 PM
Sorry LK, I didn't realize that you were now an Infopop employee tipsy

Yes, you can participate
Posted By: AllenAyres Re: Code Hunter: The UBB™ Game - 11/28/2002 1:10 AM
hmmm... anything with *twitch* in it is probably in the ubb_search.cgi file laugh

Good luck to the hunters laugh
Posted By: Brett Re: Code Hunter: The UBB™ Game - 11/28/2002 1:34 AM
Done 'nd amailed
Posted By: Lord Dexter Re: Code Hunter: The UBB™ Game - 11/28/2002 8:41 AM
*Hunts*

Report back later. smile
Posted By: Mark Badolato Re: Code Hunter: The UBB™ Game - 11/28/2002 6:59 PM
[whisper]grep is your friend[/whisper]
Posted By: CTM Re: Code Hunter: The UBB™ Game - 11/30/2002 6:54 PM
E-Mailed laugh
Posted By: Dave2 Re: Code Hunter: The UBB™ Game - 11/30/2002 11:41 PM
Hmm... by the time I saw this a few days ago I was sure that people would have got it before... so I think I'll let grep rest today wink .
Posted By: Charles Capps Re: Code Hunter: The UBB™ Game - 12/01/2002 1:23 AM
Sorry, Allen, that twitch is nowhere near the search. smile
Posted By: 1QuickSI Re: Code Hunter: The UBB™ Game - 12/01/2002 3:30 AM
I did this for the fun of it and I think I figured it out tipsy

Too bad I can't play frown frown

Why did you want to limit it to "Moderators and Administrators" only and not the entire community??? This was actual a good exercise for some of us to actualy learn something and let the experienced correct and explain where we might have gone wrong in our answer.

Many want to be able to code and contribute to the community. Stuff like this while fun for "Moderators and Administrators" and making them better does not help the long term issue of needing to revitalize the community as a whole.

Hope future games are more inclusive.

Just my .02
I will get off my rockband now
Posted By: Charles Re: Code Hunter: The UBB™ Game - 12/01/2002 3:47 AM
In fact everyone can play smile The only people who are not allowed are IP people smile so you are more than welcome to send your answer to the email adress provided smile
Posted By: usr bin geek Re: Code Hunter: The UBB™ Game - 12/01/2002 3:47 AM
Steven, anyone can play except Charles Capps, Ted O'Neill and Dave Dreezer. So go ahead and enter.

He was pointing out that UBBDev Moderators and Administrators can also play which is irregular for these types of games.
Posted By: 1QuickSI Re: Code Hunter: The UBB™ Game - 12/01/2002 6:13 AM
My bad for misunderstanding, sorry...

Now to go back and take another look through those files smile
Posted By: Dave2 Re: Code Hunter: The UBB™ Game - 12/01/2002 7:06 PM
[dave@tc11 cgi-bin]$ mail -s codehunter -b [email protected] [email protected] < codehunter-01-12-2002.txt

OK, so I decided to play shocked
Posted By: CTM Re: Code Hunter: The UBB™ Game - 12/01/2002 11:18 PM
Quote
quote:
Originally posted by Dave2:
[dave@tc11 cgi-bin]$ mail -s codehunter -b [email protected] [email protected] < codehunter-01-12-2002.txt

OK, so I decided to play shocked
Egh, enough with your Linux showoff business tipsy wink
Posted By: Dave2 Re: Code Hunter: The UBB™ Game - 12/01/2002 11:25 PM
[dave@tc11 cgi-bin]$ echo "Dave2 sucks, UBBDev sucks" | sed s/sucks/is good/ig > whatareyoutalkingabout.txt; cat whatareyoutalkingabout.txt
Dave2 is good, UBBDev is good

wink
Posted By: Greg Hard Re: Code Hunter: The UBB™ Game - 12/02/2002 3:00 AM
Quote
quote:
Originally posted by Dave2:
[dave@tc11 cgi-bin]$ echo "Dave2 sucks, UBBDev sucks" | sed s/sucks/is good/ig > whatareyoutalkingabout.txt; cat whatareyoutalkingabout.txt
Dave2 is good, UBBDev is good

wink
Oh...YEAH???

...

Yeah?!
Posted By: CTM Re: Code Hunter: The UBB™ Game - 12/02/2002 7:37 PM
Quote
quote:
Originally posted by Dave2:
[dave@tc11 cgi-bin]$ echo "Dave2 sucks, UBBDev sucks" | sed s/sucks/is good/ig > whatareyoutalkingabout.txt; cat whatareyoutalkingabout.txt
Dave2 is good, UBBDev is good

wink
I've just about had it with your attitude, Da... Oh, right. tipsy Sure, I agree with the "UBBDev" part, but unfortunately I have problems understanding the first part. tipsy wink
Posted By: LK Re: Code Hunter: The UBB™ Game - 12/02/2002 8:24 PM
[lk@tc1337 usr/bin/perl]$ echo "Dave2 sucks, UBBDev sucks" | sed s/v sucks/v rocks/ig > whatareyoutalkingabout.txt; cat whatareyoutalkingabout.txt
Dave2 sucks, UBBDev rocks
laugh
Posted By: Dave2 Re: Code Hunter: The UBB™ Game - 12/02/2002 9:22 PM
Honestly, to get the true result, you only need to omit the g and swap the names around!

wink
© UBB.Developers