Unrealircd (Support Bot) (Quiz)

By j1sp
Platform:  PHP
Published  Dec 29, 2010
Updated  Nov 26, 2013
This script is old however I re-posted it for archive reasons, also I may update it soon with a new version. [index.php]
<title>Support Quiz</title>
<form action="check.php" method="post">
<h1>Operating System</h1>
<select name="os">
<option value="win">Windows</option>
<option value="mac">Mac</option>
<option value="linux">Linux</option>
</select>
<h1>Need Support?</h1>
<select name="ns">
<option value="y">yes</option>
<option value="n">no</option>
</select><input value="Get Code" type="submit" />
</form>

[check.php]
<?
$a=$_POST['os'];
$b=$_POST['ns'];
echo "/msg [mircbotname] !v ";
if ( $a == "win" && $b == "y" ) {
echo "codeone";
}
if ( $a == "win" && $b == "n" ) {
echo "codefour";
}
if ( $a == "linux" && $b == "y" ) {
echo "codethree";
}
if ( $a == "linux" && $b == "n" ) {
echo "code6";
}
if ( $a == "mac" && $b == "y" ) {
echo "codetwo";
}
if ( $a == "mac" && $b == "n" ) {
echo "codefive";
}
?>

Comments

Sign in to comment.
sean   -  Feb 10, 2011
I was also wonder how many people would fill out a support form stating "No, I don't need help" lol
 Respond  
edgy   -  Feb 10, 2011
A flaw with this is that people will be able to share the support code that they need to enter.

A better way would be to make a unique hash for each user with a timestamp and username (for example) and have the bot decode it. That way codes specified will expire after a certain length of time.
 Respond  
sean   -  Dec 30, 2010
you can very easily combine this into one file.
Code
 
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.