Skip to content

Instantly share code, notes, and snippets.

@EricTendian
Created December 2, 2012 23:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EricTendian/4191586 to your computer and use it in GitHub Desktop.
Save EricTendian/4191586 to your computer and use it in GitHub Desktop.
freenode IRC chat in MyBB
<?php
define("IN_MYBB", 1); //init mybb
require('global.php'); //make sure this is being executed in the same dir as global.php or change accordingly
if ($mybb->user['uid'] > 0)
{
$uid = $mybb->user['uid'];
$user = get_user($uid);
$name = $user['username'];
} else $name = "anon".rand(1, 100); //since user is not logged in
?>
<iframe src="http://webchat.freenode.net?nick=<?php echo $name; ?>&channels=REPLACE_WITH_CHANNEL_NAME&uio=d4" width="647" height="400"></iframe>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment