Fixed some issues with parsing connection info from IRC servers...
parent
ccb64537dc
commit
3184113969
2
irc.php
2
irc.php
|
@ -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]);
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue