Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sorunome committed Aug 18, 2016
2 parents 7fa393e + f1c48b7 commit 624b811
Show file tree
Hide file tree
Showing 17 changed files with 40 additions and 34 deletions.
1 change: 0 additions & 1 deletion forum_mods/phpBB/OmnomIRC.php
Expand Up @@ -160,4 +160,3 @@ function getOircPagePicker($disp_pages_tmp = false){ // oirc_disppages
</script>';
return $html;
}
?>
2 changes: 0 additions & 2 deletions forum_mods/phpBB/acp/main_info.php
Expand Up @@ -44,5 +44,3 @@ function uninstall()

}
}

?>
5 changes: 3 additions & 2 deletions forum_mods/phpBB/acp/main_module.php
Expand Up @@ -50,6 +50,9 @@ function main($id, $mode)
);
global $oirc_config,$only_include_oirc;
$only_include_oirc = true;
if(isset($request)){ // fix for phpbb forums, else the superglobals aren't available
$request->enable_super_globals();
}
include_once(realpath(dirname(__FILE__)).'/../checkLogin/index.php');

include_once(realpath(dirname(__FILE__)).'/../OmnomIRC.php');
Expand Down Expand Up @@ -114,5 +117,3 @@ function main($id, $mode)
));
}
}

?>
6 changes: 4 additions & 2 deletions forum_mods/phpBB/event/main_listener.php
Expand Up @@ -24,8 +24,11 @@ static public function getSubscribedEvents()

private function getOircConfig()
{
global $oirc_config,$only_include_oirc;
global $oirc_config,$only_include_oirc,$request;
$only_include_oirc = true;
if(isset($request)){ // fix for phpbb forums, else the superglobals aren't available
$request->enable_super_globals();
}
include_once(realpath(dirname(__FILE__)).'/../checkLogin/index.php');
}

Expand Down Expand Up @@ -327,4 +330,3 @@ function acp_validate_forum_data($event)
$event->set_data($data);
}
}
?>
2 changes: 0 additions & 2 deletions forum_mods/phpBB/ext.php
Expand Up @@ -8,5 +8,3 @@ function enable_step($old_state)
return parent::enable_step($old_state);
}
}

?>
2 changes: 0 additions & 2 deletions forum_mods/phpBB/language/en/common.php
Expand Up @@ -27,5 +27,3 @@
'UCP_OIRC_SETTINGS' => 'OmnomIRC Settings',
'UCP_OIRC_SETTING_SAVED' => 'Settings saved!',
));

?>
2 changes: 0 additions & 2 deletions forum_mods/phpBB/language/en/oirc_acp.php
Expand Up @@ -32,5 +32,3 @@
'ACP_OIRC_CONFIG_NETWORK' => 'Network',
'ACP_OIRC_CONFIG_OIRCURL' => 'OmnomIRC URL',
));

?>
2 changes: 0 additions & 2 deletions forum_mods/phpBB/language/en/oirc_pages.php
Expand Up @@ -21,5 +21,3 @@
'OIRC_PAGES_SWITCH_SIMPLE' => 'Switch to simple settings',
'OIRC_PAGES_CHECK_ALL' => 'Check all:',
));

?>
11 changes: 8 additions & 3 deletions forum_mods/phpBB/migrations/release_1_0_0.php
Expand Up @@ -6,8 +6,11 @@ class release_1_0_0 extends \phpbb\db\migration\migration
{
public function effectively_installed()
{
global $oirc_config,$only_include_oirc;
global $oirc_config,$only_include_oirc,$request;
$only_include_oirc = true;
if(isset($request)){ // fix for phpbb forums, else the superglobals aren't available
$request->enable_super_globals();
}
include_once(realpath(dirname(__FILE__)).'/../checkLogin/index.php');
if(isset($this->config['oirc_config_installed'])){
$oirc_config['installed'] = $this->config['oirc_config_installed']?true:false;
Expand All @@ -24,8 +27,11 @@ static public function depends_on()
}
public function update_data()
{
global $oirc_config,$only_include_oirc;
global $oirc_config,$only_include_oirc,$request;
$only_include_oirc = true;
if(isset($request)){ // fix for phpbb forums, else the superglobals aren't available
$request->enable_super_globals();
}
include_once(realpath(dirname(__FILE__)).'/../checkLogin/index.php');
$u = parse_url($oirc_config['oircUrl']);
return array(
Expand Down Expand Up @@ -104,4 +110,3 @@ public function revert_schema()
);
}
}
?>
Binary file modified forum_mods/phpBB/omnomirc_phpbb.tar.gz
Binary file not shown.
Binary file modified forum_mods/phpBB/omnomirc_phpbb.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion html/omnomirc_www/Update.php
@@ -1,4 +1,4 @@
<?PHP
<?php
/*
OmnomIRC COPYRIGHT 2010,2011 Netham45
2012-2016 Sorunome
Expand Down
2 changes: 1 addition & 1 deletion html/omnomirc_www/config.json.php
Expand Up @@ -3,4 +3,4 @@
header("Location:index.php");
exit;
?>
{"info":{"version":"2.11.2.3","installed":false},"sql":{"server":"","db":"","user":"","passwd":"","prefix":""},"security":{"sigKey":"","ircPwd":""},"settings":{"experimental":false,"hostname":"","defaultNetwork":1,"curidFilePath":"omnomirc_curid","useBot":false,"botSocket":"unix:/tmp/omnomirc.sock"},"channels":[{"id":0,"alias":"","enabled":true,"networks":[{"id":1,"name":"","hidden":false,"order":1}]}],"networks":[{"enabled":true,"id":0,"type":0,"normal":"<b>NICK</b>","userlist":"!NICK","irc":{"color":-2,"prefix":"(!)"},"name":"Server","config":false},{"enabled":true,"id":1,"type":1,"normal":"<a target=\"_top\" href=\"#NICKENCODE\">NICK</a>","userlist":"<a target=\"_top\" href=\"NICKENCODE\"><img src=\"omni.png\">NICK</a>","irc":{"color":12,"prefix":"(O)"},"name":"OmnomIRC","config":{"checkLogin":"","theme":-1,"defaults":{},"spLinks":[],"checkLoginAbs":"","guests":0}}],"websockets":{"use":false,"host":"","port":61839,"ssl":false,"portpoking":true,"intport":"61839","certfile":"","keyfile":""},"cache":{"type":0,"host":"localhost","port":11211}}
{"info":{"version":"2.11.2.4","installed":false},"sql":{"server":"","db":"","user":"","passwd":"","prefix":""},"security":{"sigKey":"","ircPwd":""},"settings":{"experimental":false,"hostname":"","defaultNetwork":1,"curidFilePath":"omnomirc_curid","useBot":false,"botSocket":"unix:/tmp/omnomirc.sock"},"channels":[{"id":0,"alias":"","enabled":true,"networks":[{"id":1,"name":"","hidden":false,"order":1}]}],"networks":[{"enabled":true,"id":0,"type":0,"normal":"<b>NICK</b>","userlist":"!NICK","irc":{"color":-2,"prefix":"(!)"},"name":"Server","config":false},{"enabled":true,"id":1,"type":1,"normal":"<a target=\"_top\" href=\"#NICKENCODE\">NICK</a>","userlist":"<a target=\"_top\" href=\"NICKENCODE\"><img src=\"omni.png\">NICK</a>","irc":{"color":12,"prefix":"(O)"},"name":"OmnomIRC","config":{"checkLogin":"","theme":-1,"defaults":{},"spLinks":[],"checkLoginAbs":"","guests":0}}],"websockets":{"use":false,"host":"","port":61839,"ssl":false,"portpoking":true,"intport":"61839","certfile":"","keyfile":""},"cache":{"type":0,"host":"localhost","port":11211}}
4 changes: 2 additions & 2 deletions html/omnomirc_www/omnomirc.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions html/omnomirc_www/omnomirc.php
Expand Up @@ -126,7 +126,7 @@ public static function getCurid(){
}
public static function setCurid($i){
$i = (int)$i;
if($i < self::getCurid()){
if($i > self::getCurid()){
file_put_contents(self::getCuridPath(),$i);
}
}
Expand Down Expand Up @@ -963,7 +963,7 @@ public function info(){
$userSql = $temp[0];
if($this->loggedIn && $this->network != 0 /* server network has no info */){
if($userSql['uid']===NULL){
Sql::query("INSERT INTO `{db_prefix}userstuff` (name,uid,network) VALUES (?,?,?)",array($this->nick,$this->id,$this->network));
Sql::query("INSERT INTO `{db_prefix}userstuff` (name,uid,network,ignores) VALUES (?,?,?,'')",array($this->nick,$this->id,$this->network));
$temp = Sql::query("SELECT usernum,name,ignores,kicks,globalOp,globalBan,network,uid FROM `{db_prefix}userstuff` WHERE usernum=?",array(Sql::insertId()));
$userSql = $temp[0];
}
Expand Down
2 changes: 1 addition & 1 deletion html/omnomirc_www/updater.php
@@ -1,7 +1,7 @@
<?php
namespace oirc;
error_reporting(E_ALL);
$installScriptVersion = '2.11.2.3';
$installScriptVersion = '2.11.2.4';
include_once(realpath(dirname(__FILE__)).'/config.php');
// IMPORTANT!!!! sqli object ONLY FOR INSTALLATION SCRIPT
class Sql{
Expand Down
27 changes: 18 additions & 9 deletions src/omnomirc.js
Expand Up @@ -30,17 +30,9 @@ function OmnomIRC(){
if(loadMode === undefined){
loadMode = false;
}
if(line.name === null || line.network == -1 || (!loadMode && !request.isNew(line.curline))){
request.setCurline(line.curline);
if(loadMode && line.type == 'highlight'){
return;
}
request.setCurline(line.curline);

if(oirc.onmessageraw !== false){
oirc.onmessageraw(line,loadMode);
}else{
parser.addLine(line,loadMode);
}
if(!loadMode && line.chan == ss.get('chan')){
var lines = ss.get('lines');
lines.push(line);
Expand All @@ -53,6 +45,17 @@ function OmnomIRC(){
ss.set('users',users.getUsers());
}
}
if(line.name === null || line.network == -1 || (!loadMode && !request.isNew(line.curline))){
request.setCurline(line.curline);
return;
}
request.setCurline(line.curline);

if(oirc.onmessageraw !== false){
oirc.onmessageraw(line,loadMode);
}else{
parser.addLine(line,loadMode);
}

},
settings = (function(){
Expand Down Expand Up @@ -276,6 +279,9 @@ function OmnomIRC(){
isGuest:function(){
return self.isGuest;
},
numHigh:function(){
return self.numHigh;
},
getWholePmIdent:self.getWholePmIdent,
logout:self.logout,
login:self.login
Expand Down Expand Up @@ -977,6 +983,7 @@ function OmnomIRC(){
}
},
setCurline:function(c){
console.log("Curline: "+c);
if(c > self.curline){
self.curline = c;
}
Expand Down Expand Up @@ -1227,6 +1234,7 @@ function OmnomIRC(){
},
requestHandler:false,
load:function(i,fn){
console.log("loading channel");
var callback = function(data){
if(self.current.load(data)){
self.chans[i].high = false;
Expand Down Expand Up @@ -1260,6 +1268,7 @@ function OmnomIRC(){
for(var j = 0; j < attrs.length; j++){
data[attrs[j]] = ss.get(attrs[j]);
}
console.log(data);
callback(data);
return;
}
Expand Down

0 comments on commit 624b811

Please sign in to comment.