Jump to content

Ircx Roomlist


Dippy

Recommended Posts

  • Replies 39
  • Created
  • Last Reply

Top Posters In This Topic

:shock: im surprised no one has come forward and replied or even offered you help as iv been to your site and see a lot of potential ... yes its looks like msn and iv noticed you are working on msn ocx chat but that is a start ... trouble is most of the php coders and irc coders have lost interested in coding for msn ocx chat networks and why I dont know as iv been in a few other msn clone sites and they seem to be doing fine ... you will need help dippy so why not yell a bit louder and someone might hear you :lolwave: and give you some help :D
Link to comment
Share on other sites

yes I do

 

in the topic bit it shows roomlister nick number of users and room name as well as the topic

 

I also having problems with hiden rooms still showing on the list and setting category

Link to comment
Share on other sites



<? require('includes/pages/header.php'); ?>

<br />

<br />

<?php

error_reporting(E_ALL ^ E_NOTICE);

$botnick = "RoomLister";

$server = "irc.zunkies.com";

$port = "6668";

$channel = "zunkies";

?>

<html>

<head>

<meta http-equiv="Content-Language" content="en">

<meta name="GENERATOR" content="Microsoft FrontPage 5.0">

<meta name="ProgId" content="FrontPage.Editor.Document">

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

<title>Room List</title>

</head>

<body>

<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" id="AutoNumber1" style="border-collapse: collapse">

<tr>

<td width="8%" height="20" align="center" valign="middle" bgcolor="#00CCFF" style="border-left:1px solid #333333;border-bottom:1px solid;border-top:1px solid #333333;FONT-FAMILY: verdana;FONT-SIZE: 10pt;TEXT-DECORATION: none;"> <img src='http://www.zunkies.com/icons/people.png' width='25' height='25'></td>

<td width="15%" height="20" align="left" valign="middle" bgcolor="#00CCFF" style="border-bottom:1px solid;border-top:1px solid #333333;FONT-FAMILY: verdana;FONT-SIZE: 10pt;TEXT-DECORATION: none;"> <b>Roomname:</b></td>

<td width="77%" height="20" align="left" valign="middle" bgcolor="#00CCFF" style="border-right:1px solid #333333;border-top:1px solid #333333;FONT-FAMILY: verdana;FONT-SIZE: 10pt;TEXT-DECORATION: none;"> <b>Topic:</b></td>

</tr>

<?php

$fp = fsockopen($server, $port, $errno, $errstr, 30);

if (!$fp) {

echo "$errstr ($errno)<br />\n";

}

else {

fputs($fp,"USER $botnick $botnick 127.0.0.1 :php\n");

$nick = $botnick . rand(10000,99999);

fputs($fp,"NICK $nick\n");

while (!feof($fp)) {

usleep(50);

$fget = @fgets($fp, 500);

//echo "$fget <br>\n";

$match = explode(" ", $fget);

$fget = str_replace ("\n", "", $fget);

$fget = str_replace ("\r", "", $fget);

if ($match[1] == "001") {

fputs($fp,"LIST\n");

}

else if ($match[0] == "PING") {

fputs($fp, "PONG " . $match[1]);

}

else if ($match[1] == "433") {

$nick = $botnick . rand(10000,99999);

fputs($fp,"NICK $nick\n");

}

else if ($match[1] == "323") {

fputs($fp, "QUIT :bye!\n");

break;

}

else if ($match[1] == "322") {

$room = $match[3];

$room = str_replace("#","",$room);

$room = str_replace("\b"," ",$room);

$count = $match[4];

$topic = explode(" ", $fget);

unset($topic[0]);

unset($topic[1]);

$topic = implode(" ", $topic);

$topic = str_replace("#","",$topic);

$topic = str_replace("\b"," ",$topic);

if ($color == "FBFBF7") {

$color = "FFFFFF";

}

else {

$color = "FBFBF7";

}

?>

<tr>

<td width="8%" align="center" valign="middle" bgcolor="#<?php echo $color; ?>" style="border-top:1px solid #333333;border-left:1px solid #333333;border-bottom:1px solid #333333;FONT-FAMILY: verdana;FONT-SIZE: 8pt;TEXT-DECORATION: none;"><?php echo $count; ?></td>

<td width="15%" style="border-bottom:1px solid #333333;bordertop:1px solid #333333;border-top:1px solid #333333;FONT-FAMILY: verdana;FONT-SIZE: 8pt;TEXT-DECORATION: none;" bgcolor="#<?php echo $color; ?>"> <a href="http://zunkies.com/chats.php?nick=<?php echo $username; ?>&room=<?php echo $room; ?>" target="_blank">

<?php echo $room; ?>

</a></td>

<td width="77%" style="border-right:1px solid #333333;border-bottom:1px solid #333333;FONT-FAMILY:;border-top:1px solid #333333; verdana;FONT-SIZE: 10pt;TEXT-DECORATION: none;"bgcolor="#<?php echo $color; ?>"> 

<?php echo $topic; ?></td>

</tr>

<?php

}



}

fclose($fp);

}

?>

</table>

<br />

<br />

<table width="99%" align="center">

<tr>

<? require('includes/pages/footer.php') ?></div></td>

</tr>

</table>

</body>

</html>

Link to comment
Share on other sites

You should consider fixing some of the html errors and such but the problem was that you weren't exploding the topic get correctly. you want to explode or "split" by the :

<?php
error_reporting(E_ALL ^ E_NOTICE);
		    $botnick = "RoomListertest";
		    $server = "irc.zunkies.com";
		    $port = "6668";
		    $channel = "zunkies";
?>
<html>
<head>
<meta http-equiv="Content-Language" content="en">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Room List</title>
</head>
<body>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" id="AutoNumber1" style="border-collapse: collapse">
  <tr>
		    <td width="8%" height="20" align="center" valign="middle" bgcolor="#00CCFF" style="border-left:1px solid #333333;border-bottom:1px solid;border-top:1px solid #333333;FONT-FAMILY: verdana;FONT-SIZE: 10pt;TEXT-DECORATION: none;"> <img src='http://www.zunkies.com/icons/people.png' width='25' height='25'></td>
		    <td width="15%" height="20" align="left" valign="middle" bgcolor="#00CCFF" style="border-bottom:1px solid;border-top:1px solid #333333;FONT-FAMILY: verdana;FONT-SIZE: 10pt;TEXT-DECORATION: none;"> <b>Roomname:</b></td>
		    <td width="77%" height="20" align="left" valign="middle" bgcolor="#00CCFF" style="border-right:1px solid #333333;border-top:1px solid #333333;FONT-FAMILY: verdana;FONT-SIZE: 10pt;TEXT-DECORATION: none;"> <b>Topic:</b></td>
  </tr>
<?php
		    $fp = fsockopen($server, $port, $errno, $errstr, 30);
		    if (!$fp) {
										    echo "$errstr ($errno)<br />\n";
		    }
		    else {
										    fputs($fp,"USER $botnick $botnick 127.0.0.1 :php\n");
										    $nick = $botnick . rand(10000,99999);
										    fputs($fp,"NICK $nick\n");
										    while (!feof($fp)) {
																		    usleep(50);
																		    $fget = @fgets($fp, 500);
																		    //echo "$fget <br>\n";
																		    $match = explode(" ", $fget);
																		    $fget = str_replace ("\n", "", $fget);
																		    $fget = str_replace ("\r", "", $fget);
																		    if ($match[1] == "001") {
																										    fputs($fp,"LIST\n");
																		    }
else if ($match[0] == "PING") {
																										    fputs($fp, "PONG " . $match[1]);
																		    }
																		    else if ($match[1] == "433") {
																										    $nick = $botnick . rand(10000,99999);
																										    fputs($fp,"NICK $nick\n");
																		    }
																		    else if ($match[1] == "323") {
																										    fputs($fp, "QUIT :bye!\n");
																										    break;
																		    }
																		    else if ($match[1] == "322") {
																				 $room = $match[3];
																				 $room = str_replace("#","",$room);
																				 $room = str_replace("\b"," ",$room);
																				 $count = $match[4];
																				 $gettopic = explode(":", $fget);
																				 $topic = $gettopic[1];
																				 $topic = str_replace("#","",$topic);
																				 $topic = str_replace("\b"," ",$topic);
																				  if ($color == "FBFBF7") {
																																										    $color = "FFFFFF";
																																		    }
																																		    else {
																																										    $color = "FBFBF7";
																																		    }
																																		    ?>
  <tr>
		    <td width="8%" align="center" valign="middle" bgcolor="#<?php echo $color; ?>" style="border-top:1px solid #333333;border-left:1px solid #333333;border-bottom:1px solid #333333;FONT-FAMILY: verdana;FONT-SIZE: 8pt;TEXT-DECORATION: none;"><?php echo $count; ?></td>
		    <td width="15%" style="border-bottom:1px solid #333333;bordertop:1px solid #333333;border-top:1px solid #333333;FONT-FAMILY: verdana;FONT-SIZE: 8pt;TEXT-DECORATION: none;" bgcolor="#<?php echo $color; ?>"> <a href="http://zunkies.com/chats.php?nick=<?php echo $username; ?>&room=<?php echo $room; ?>" target="_blank">
								  <?php echo $room; ?>
								  </a></td>
		    <td width="77%" style="border-right:1px solid #333333;border-bottom:1px solid #333333;FONT-FAMILY:;border-top:1px solid #333333; verdana;FONT-SIZE: 10pt;TEXT-DECORATION: none;"bgcolor="#<?php echo $color; ?>"> 
								  <?php echo $topic; ?></td>
  </tr>
																																								  <?php
																										    }
								
										    }
										    fclose($fp);
		    }
?>
</table>
<br />
<br />
<table width="99%" align="center">
<tr>
  </tr>
</table>
</body>
</html>
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...