Navigation Menu

Skip to content

Commit

Permalink
new commentary /game hook
Browse files Browse the repository at this point in the history
  • Loading branch information
NB-Core committed Jun 11, 2014
1 parent edb6a33 commit 057b444
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.txt
@@ -1,3 +1,9 @@
Changes to 1.2.5 +nb

[CHANGES]
*lib/commentary.php --> added a new hook "gmcommentarea" with section and "allow_gm"=>false to handle module requests to allow /game comments
[FIXES]
[REMOVES]
Changes to 1.2.4 +nb
[CHANGES]
*home.php --> added a "forgotten password" link below the Login Button
Expand Down
7 changes: 5 additions & 2 deletions lib/commentary.php
Expand Up @@ -153,8 +153,11 @@ function injectcommentary($section, $talkline, $comment, $schema=false) {
substr($commentary,0,3)!="/me" &&
substr($commentary,0,5) != "/game") {
$commentary = ":`3$talkline, \\\"`#$commentary`3\\\"";
}
if (substr($commentary,0,5)=="/game" && ($session['user']['superuser']&SU_IS_GAMEMASTER)==SU_IS_GAMEMASTER) {
}
//add a hook if a module wants to post a non-GM with /game (more power for modules)
$args = modulehook("gmcommentarea", array("section"=>$section,"allow_gm"=>false));
if (substr($commentary,0,5)=="/game" && ((($session['user']['superuser']&SU_IS_GAMEMASTER)==SU_IS_GAMEMASTER) ||
$args['allow_gm']===true)) {
//handle game master inserts now, allow double posts
injectsystemcomment($section,$commentary);
} else {
Expand Down
4 changes: 2 additions & 2 deletions lib/output.php
Expand Up @@ -12,8 +12,8 @@ class output_collector {

private $output; //!< the output to the template body
private $block_new_output; //!< is current output blocked? boolean
private static $colors; //!< the color codes=>CSS tags
private static $color_map,$colormap_esc; //!< the letters of color codes only, escaped and not escaped
private $colors; //!< the color codes=>CSS tags
private $color_map,$colormap_esc; //!< the letters of color codes only, escaped and not escaped
private $nestedtags; //!<open spans, or whatever...we need to make sure that we close them on output

/**
Expand Down

0 comments on commit 057b444

Please sign in to comment.