Skip to content

Commit

Permalink
whatever i changed
Browse files Browse the repository at this point in the history
  • Loading branch information
crutchy committed Feb 28, 2015
1 parent 476b09a commit cc6da58
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 0 additions & 2 deletions irc.php
Expand Up @@ -91,7 +91,6 @@

# reserved aliases
define("ALIAS_ALL","*");
define("ALIAS_LOG_ITEMS","<log>");
define("ALIAS_INIT","<init>");
define("ALIAS_STARTUP","<startup>");
define("ALIAS_QUIT","<quit>");
Expand Down Expand Up @@ -212,7 +211,6 @@

$reserved_aliases=array(
ALIAS_ALL,
ALIAS_LOG_ITEMS,
ALIAS_INIT,
ALIAS_STARTUP,
ALIAS_QUIT);
Expand Down
6 changes: 3 additions & 3 deletions irc_lib.php
Expand Up @@ -219,7 +219,7 @@ function log_items($items)
$fieldnames=array_keys($items);
$placeholders=array_map("callback_prepare",$fieldnames);
$fieldnames=array_map("callback_quote",$fieldnames);
execute_prepare("INSERT INTO exec_irc_bot.irc_log (".implode(",",$fieldnames).") VALUES (".implode(",",$placeholders).")",$items);
execute_prepare("INSERT INTO ".BOT_SCHEMA.".".LOG_TABLE." (".implode(",",$fieldnames).") VALUES (".implode(",",$placeholders).")",$items);
}

#####################################################################################################
Expand Down Expand Up @@ -288,7 +288,7 @@ function handle_process($handle)
fclose($handle["pipe_stdout"]);
fclose($handle["pipe_stderr"]);
proc_close($handle["process"]);
if (($handle["alias"]<>ALIAS_ALL) and ($handle["alias"]<>ALIAS_LOG_ITEMS))
if ($handle["alias"]<>ALIAS_ALL)
{
#term_echo("process terminated normally: ".$handle["command"]);
}
Expand Down Expand Up @@ -2174,7 +2174,7 @@ function process_scripts($items,$reserved="")
$cwd=NULL;
$env=NULL;
$descriptorspec=array(0=>array("pipe","r"),1=>array("pipe","w"),2=>array("pipe","w"));
if (($alias<>ALIAS_ALL) and ($alias<>ALIAS_LOG_ITEMS))
if ($alias<>ALIAS_ALL)
{
term_echo("EXEC: ".$command);
}
Expand Down
5 changes: 2 additions & 3 deletions scripts/filth.php
Expand Up @@ -27,12 +27,12 @@
$parts2=array();
for ($i=0;$i<count($parts);$i++)
{
if (strlen($parts[$i])>1)
if (strlen($parts[$i])>2)
{
$parts2[]=$parts[$i];
}
}
if (count($parts2)>0)
if (count($parts2)>1)
{
$msg="ciri: ".implode(" ",$parts2);
if ($dest=="")
Expand All @@ -48,7 +48,6 @@
else
{
# google search using $trailing

}

#####################################################################################################
Expand Down
4 changes: 2 additions & 2 deletions scripts/github_feed.php
Expand Up @@ -285,9 +285,9 @@ function get_api_data($uri)
function github_msg($repo,$msg)
{
pm(FEED_CHAN,$msg);
if ((strpos(strtolower($repo),"slashcode")!==False) or (strpos(strtolower($repo),"soylentcode")!==False) or (strpos(strtolower($repo),"exec")!==False))
if ((strpos(strtolower($repo),"slashcode")!==False) or (strpos(strtolower($repo),"soylentcode")!==False))
{
pm("#journals",$msg);
pm("#dev",$msg);
}
}

Expand Down
3 changes: 3 additions & 0 deletions scripts/lib_mysql.php
Expand Up @@ -2,6 +2,9 @@

#####################################################################################################

define("BOT_SCHEMA","exec_irc_bot");
define("LOG_TABLE","irc_log");

$pdo=new PDO("mysql:host=localhost","www",trim(file_get_contents("../pwd/mysql_www")));
if ($pdo===False)
{
Expand Down

0 comments on commit cc6da58

Please sign in to comment.