? pjirc_head_6.patch ? pjirc/license.txt Index: pjirc.info =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/pjirc/pjirc.info,v retrieving revision 1.1 diff -u -p -r1.1 pjirc.info --- pjirc.info 6 Mar 2007 09:36:11 -0000 1.1 +++ pjirc.info 30 Dec 2008 16:51:12 -0000 @@ -1,2 +1,4 @@ +; $Id$ name = pjirc description = Embeds the PJRIC client into drupal +core = 6.x Index: pjirc.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/pjirc/pjirc.module,v retrieving revision 1.3 diff -u -p -r1.3 pjirc.module --- pjirc.module 23 Mar 2007 21:42:30 -0000 1.3 +++ pjirc.module 30 Dec 2008 16:51:13 -0000 @@ -1,4 +1,9 @@ This module will display an IRC chatroom to users with the correct permissions.
+This module will display an IRC chatroom to users with the correct permissions.
To enable its use, a user needs the \"access pjirc\" permission.
-You can set the server, room and guest name from the pjirc settings page.
+You can set the server, room and guest name from the pjirc settings page.
To enable its use, a user needs the \"access irc\" permission.
", - array("%permissions" => url("admin/user/permission"), "%settings" => url("admin/settings/pjirc"), "%pjirc" => url("pjirc"))); + array("!permissions" => url("admin/user/permission"), "!settings" => url("admin/settings/pjirc"), "!pjirc" => url("pjirc"))); break; case 'admin/modules#description': $output = t("Allows you to have an IRC page using PJIRC."); @@ -23,9 +28,8 @@ function pjirc_help($section = 'admin/he /** * Implementation of hook_perm(). */ -function pjirc_perm() -{ - return array ("access irc"); +function pjirc_perm() { + return array('access irc'); } /** @@ -36,7 +40,7 @@ function pjirc_admin() { $form['pjirc_nav_link'] = array( '#type' => 'textfield', '#title' => t('Navigation link text'), - '#default_value' => variable_get('pjirc_nav_link','chatroom'), + '#default_value' => variable_get('pjirc_nav_link', 'chatroom'), '#size' => 80, '#maxlength' => 300, '#description' => t('The text that will be shown in the navigation link'), @@ -45,7 +49,7 @@ function pjirc_admin() { $form['pjirc_nick'] = array( '#type' => 'textfield', '#title' => t('Guest Nick Name'), - '#default_value' => variable_get('pjirc_nick','Guest'), + '#default_value' => variable_get('pjirc_nick', 'Guest'), '#size' => 20, '#maxlength' => 255, '#description' => t('The username assigned to guests who have not logged into Drupal'), @@ -54,7 +58,7 @@ function pjirc_admin() { $form['pjirc_server'] = array( '#type' => 'textfield', '#title' => t('IRC Server'), - '#default_value' => variable_get('pjirc_server','irc.freenode.net'), + '#default_value' => variable_get('pjirc_server', 'irc.freenode.net'), '#size' => 20, '#maxlength' => 255, '#description' => t('The IP address or hostname of the IRC server you are connecting to.'), @@ -76,27 +80,23 @@ function pjirc_admin() { /** * Implementation of hook_menu(). */ -function pjirc_menu($may_cache) { - global $user; - $items = array(); - if ($may_cache) { +function pjirc_menu() { + $items['admin/settings/pjirc'] = array( + 'title' => 'PJIRC Settings', + 'description' => 'Configure params about IRC chat settings.', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('pjirc_admin'), + 'access arguments' => array('access administration pages'), + 'type' => MENU_NORMAL_ITEM, + 'weight' => 0 + ); - $items[] = array( - 'path' => 'admin/settings/pjirc', - 'title' => t("PJIRC Settings"), - 'callback' => 'drupal_get_form', - 'callback arguments' => array('pjirc_admin'), - 'access' => user_access('access administration pages'), - 'type' => MENU_NORMAL_ITEM, - 'weight' => 0); - - $items[] = array( - 'path' => 'pjirc', - 'title' => t(variable_get("pjirc_nav_link", "chatroom")), - 'callback' => 'pjirc_page', - 'access' => user_access('access irc'), - 'weight' => 0); - } + $items['pjirc'] = array( + 'title' => variable_get("pjirc_nav_link", "chatroom"), + 'page callback' => 'pjirc_page', + 'access arguments' => array('access irc'), + 'weight' => 0 + ); return $items; } @@ -104,18 +104,19 @@ function pjirc_menu($may_cache) { * Menu callback; displays a Drupal page PJIRC chatroom. */ function pjirc_page() { - $pjirc_nick = $user->uid ? $user->name : variable_get('pjirc_nick','Guest'); - $pjirc_server = variable_get('pjirc_server',''); - $pjirc_room = variable_get('pjirc_room',''); + global $user; + $pjirc_nick = $user->uid ? $user->name : variable_get('pjirc_nick', 'Guest'); + $pjirc_server = variable_get('pjirc_server', ''); + $pjirc_room = variable_get('pjirc_room', ''); $output = "