Merge pull request 'IRC: Use friendica nickname as suggested IRC nickname, when signed in' (#1637) from marcusxs/friendica-addons:default_irc_nickname_to_friendica_nickname into develop
Reviewed-on: friendica/friendica-addons#1637
This commit is contained in:
commit
ade3c6b22e
1 changed files with 3 additions and 1 deletions
|
|
@ -74,6 +74,7 @@ function irc_content()
|
|||
{
|
||||
$baseurl = DI::baseUrl() . '/addon/irc';
|
||||
$o = '';
|
||||
$usernick = '';
|
||||
|
||||
/* set the list of popular channels */
|
||||
if (DI::userSession()->getLocalUserId()) {
|
||||
|
|
@ -81,6 +82,7 @@ function irc_content()
|
|||
if (!$sitechats) {
|
||||
$sitechats = DI::config()->get('irc', 'sitechats');
|
||||
}
|
||||
$usernick = "nick=" . DI::userSession()->getLocalUserNickname() . "&";
|
||||
} else {
|
||||
$sitechats = DI::config()->get('irc','sitechats');
|
||||
}
|
||||
|
|
@ -117,7 +119,7 @@ function irc_content()
|
|||
$o .= <<< EOT
|
||||
<h2>IRC chat</h2>
|
||||
<p><a href="https://tldp.org/HOWTO/IRC/beginners.html" target="_blank" rel="noopener noreferrer">A beginner's guide to using IRC. [en]</a></p>
|
||||
<iframe src="//web.libera.chat?channels=$channels" style="width:100%; max-width:900px; height: 600px;"></iframe>
|
||||
<iframe src="//web.libera.chat?{$usernick}channels=$channels" style="width:100%; max-width:900px; height: 600px;"></iframe>
|
||||
EOT;
|
||||
|
||||
return $o;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue