Fixed some issues with parsing connection info from IRC servers...

master
Pentium44 2020-12-09 23:04:03 -08:00
parent ccb64537dc
commit 3184113969
2 changed files with 3 additions and 2 deletions

View File

@ -128,7 +128,7 @@ while($bytes = socket_recv($socket, $r_data, 2048, MSG_DONTWAIT) !== '') {
$nickMsg = explode('NICK', $data);
$msgline = "<tr><td class='userinfo'><b>$senderNick</b><br /><span style='color:$ipcolor;'>$senderIp</span></td><td> $senderNick is now known as" . $nickMsg[1] . "</td></tr>\n";
file_put_contents("$username.log", $socketFileContents . $msgline);
} else if ($ex[2] == $username && (count(explode(":", $stringMsg[1])) > 2)) {
} else if ($ex[2] == $username && $ex[1] == "PRIVMSG" && (count(explode(":", $stringMsg[1])) > 2)) {
$senderNick = get_string_between($data, ":", "!");
$senderIp = get_string_between($data, "@", " ");
$privMsg = explode(":", $stringMsg[1]);

View File

@ -159,7 +159,8 @@ if (isset($_GET['msg']) && $_GET['msg']!="" && isset($_GET['nick']) && $_GET['ni
}
} else if($_GET['do']=="login" && !file_exists(".$nick.pingfile") && ($acctpass == $userpass)) { // Is user asking for login?
// Join channel
if(!isset($_SESSION['idleirc-channel'])) {
$isachannel = substr_count($_SESSION['idleirc-channel'],'#') > 1 ? TRUE : FALSE ;
if(!isset($_SESSION['idleirc-channel']) || $isachannel == FALSE) {
file_put_contents(".$nick.push", "JOIN " . $default_channel . "\n");
} else {
file_put_contents(".$nick.push", "JOIN " . $channel . "\n");