ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Net-IRC3/lib/Net/IRC3/Util.pm
(Generate patch)

Comparing Net-IRC3/lib/Net/IRC3/Util.pm (file contents):
Revision 1.7 by elmex, Tue Jan 16 19:39:17 2007 UTC vs.
Revision 1.8 by elmex, Fri Feb 23 20:14:58 2007 UTC

136 136
137 return $msg; 137 return $msg;
138} 138}
139 139
140 140
141=item B<decode_ctcp_req ($line)> 141=item B<decode_ctcp ($line)>
142
143TODO
142 144
143=cut 145=cut
144 146
145sub decode_ctcp { 147sub decode_ctcp {
146 my ($line) = @_; 148 my ($line) = @_;
152 $line =~ s/\001[^\001]*\001//g; 154 $line =~ s/\001[^\001]*\001//g;
153 155
154 return $line; 156 return $line;
155} 157}
156 158
159=item B<filter_ctcp_text_attr ($line, $cb)>
160
161TODO
162
163=cut
157# implemented after the below CTCP spec, but 164# implemented after the below CTCP spec, but
158# doesnt seem to be used by anyone... so it's untested. 165# doesnt seem to be used by anyone... so it's untested.
159sub filter_ctcp_text_attr { 166sub filter_ctcp_text_attr {
160 my ($line, $cb) = @_; 167 my ($line, $cb) = @_;
161 $cb ||= sub { '' }; 168 $cb ||= sub { '' };
220C<$prefix> can also be a hash like it is returned by C<parse_irc_msg>. 227C<$prefix> can also be a hash like it is returned by C<parse_irc_msg>.
221 228
222=cut 229=cut
223 230
224sub prefix_host { 231sub prefix_host {
225 my ($self, $prfx) = @_; 232 my ($prfx) = @_;
226 return (split_prefix ($prfx))[2]; 233 return (split_prefix ($prfx))[2];
227} 234}
228 235
229=back
230 236
231=item B<rfc_code_to_name ($code)> 237=item B<rfc_code_to_name ($code)>
232 238
233This function is a interface to the internal mapping or numeric 239This function is a interface to the internal mapping or numeric
234replies to the reply name in RFC 2812 (which you may also consult). 240replies to the reply name in RFC 2812 (which you may also consult).
235 241
236C<$code> is returned if no name for C<$code> exists 242C<$code> is returned if no name for C<$code> exists
237(as some server may extended the protocol). 243(as some server may extended the protocol).
244
245=back
238 246
239=cut 247=cut
240 248
241our %RFC_NUMCODE_MAP = ( 249our %RFC_NUMCODE_MAP = (
242 '001' => 'RPL_WELCOME', 250 '001' => 'RPL_WELCOME',

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines