Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5977162
IRCColourfulCARCFeedFormatter.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
IRCColourfulCARCFeedFormatter.php
View Options
<?php
/**
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
*/
namespace
MediaWiki\Extension\CentralAuth\RCFeed
;
use
MediaWiki\RCFeed\IRCColourfulRCFeedFormatter
;
use
MediaWiki\Title\Title
;
/**
* Generates a colourful notification intended for humans on IRC.
*/
class
IRCColourfulCARCFeedFormatter
implements
CARCFeedFormatter
{
/**
* Generate an IRC line corresponding to user unification/creation
* @param Title $userpage
* @param string $wikiID
* @return string
*/
public
function
getLine
(
$userpage
,
$wikiID
)
{
$title
=
IRCColourfulRCFeedFormatter
::
cleanupForIRC
(
$userpage
->
getPrefixedText
()
);
$wikiID
=
IRCColourfulRCFeedFormatter
::
cleanupForIRC
(
$wikiID
);
$url
=
$userpage
->
getCanonicalURL
();
$user
=
IRCColourfulRCFeedFormatter
::
cleanupForIRC
(
$userpage
->
getText
()
);
# see http://www.irssi.org/documentation/formats for some colour codes. prefix is \003,
# no colour (\003) switches back to the term default
return
"
\0
0314[[
\0
0307$title
\0
0314]]
\0
034@$wikiID
\0
0310 "
.
"
\0
0302$url
\0
03
\0
035*
\0
03
\0
0303$user
\0
03
\0
035*
\0
03
\n
"
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Oct 3, 19:42 (2 d, 19 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
a7/7b/f3bc9da58bdae2e7ec8ebf206d65
Default Alt Text
IRCColourfulCARCFeedFormatter.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment