This commit is contained in:
Pentium44 2020-12-09 18:50:56 -08:00
parent 989a46d72c
commit 023e18891e
2 changed files with 16 additions and 4 deletions

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
*.log
*.pingfile
*.push
/users

View File

@ -69,12 +69,19 @@ if (isset($_GET['msg']) && $_GET['msg']!="" && isset($_GET['nick']) && $_GET['ni
$logline .= "</td></tr>\n";
$line .= "\x01\n";
} else if ($cmd[0]=="/join") {
doLog("$username: channel switch from $channel to" . $cmd[1] . "($msg)");
$line .= "PART $channel\n"; // push close command to IRC
$logline .= "<tr><td class='userinfo'><b>$nick</b>: </td><td>Leaving $channel</td></tr>\n"; // push to client
doLog("$username: joining " . $cmd[1]);
$line .= "JOIN" . " " . $cmd[1] . "\n"; // set for push
$logline .= "<tr><td class='userinfo'><b>$nick</b>:</td><td>Joining " . $cmd[1] . "</td></tr>\n"; // push to client
$_SESSION['cwchat-channel'] = trim($cmd[1]);
$_SESSION['idleirc-channel'] = trim($cmd[1]);
} else if ($cmd[0] == "/part") {
doLog("$username: leaving " . $cmd[1]);
$line .= "PART $channel :$username leaving...\n"; // push close command to IRC
$logline .= "<tr><td class='userinfo'><b>$nick</b>: </td><td>Leaving $channel</td></tr>\n"; // push to client
} else if ($cmd[0] == "/focus") {
if(trim($cmd[1]) != $channel) {
$_SESSION['idleirc-channel'] = trim($cmd[1]);
$logline .= "<tr><td class='userinfo'><span style='color:$ipcolor;'>$servaddr</b>: </td><td>$channel is focused, all messages will be sent to $channel</td></tr>\n"; // push to client
}
} else {
// @@ This is a work in progress
// Sends every channel message to each channel :[