From 90039f5522cbb443d96994c88ee1e14d674d3c1a Mon Sep 17 00:00:00 2001 From: Tony Baldwin Date: Fri, 2 Mar 2012 11:16:21 -0500 Subject: [PATCH] added a mibbit/irc chatroom plugin --- mibbit/mibbit.php | 62 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100755 mibbit/mibbit.php diff --git a/mibbit/mibbit.php b/mibbit/mibbit.php new file mode 100755 index 00000000..df3494a4 --- /dev/null +++ b/mibbit/mibbit.php @@ -0,0 +1,62 @@ +' . t('Mibbit IRC Chatroom') . ''; +} + + +function mibbit_module() { + return; +} + + + + + +function mibbit_content(&$a) { + +// this stuff is supposed to go in the page header + +$a->page['htmlhead'] .= 'session_start(); + $nick = empty($_SESSION[\'user_name\']) ? \'Wdg\' : $_SESSION[\'user_name\']; + $server = \"irc.mibbit.net\"; // default: + $room = \"friendica\"; // w/o # or %23 ! + + $uri = \"https://widget.mibbit.com/\" . + \"?nick=$nick_%3F%3F\" . // each %3F(=?) will be replaced by a random digit + \"&customprompt=Welcome%20to%20$server/$room\" . + \"&customloading=maybe%20you%20need%20to%20close%20other%20Mibbit%20windows%20first...\" . + \"&settings=c76462e5055bace06e32d325963b39f2\"; // etc. + if (!empty($room)) {$uri .= \'&channel=%23\' . $room;} + if (!empty($server )) {$uri .= \'&server=\' . $server;}' + + // add the chatroom frame and some html + + $s .= '

chat

'; + $s .= '
'; + $s .= ''; + $s .= '
(no spaces, interpunctuation or leading ciphers in your /nick name)'; + $s .= '

type /help to learn about special commands

'; + $s .= '

' + +}