Leser: 7
![]() |
|< 1 ... 4 5 6 7 8 >| | ![]() |
74 Einträge, 8 Seiten |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package Plugins::TextCommands;
use strict;
return bless({
command_handlers => {
'renee' => \&renee_handler,
},
});
sub custom_handler
{
my($self,$main,$command,$text) = @_;
my @ret=();
if ($text ne '')
{
my $output = $main->createOutput(
{
template => $command,
name => $main->{current_user}{name},
nick => $main->{current_user}{nick},
color => $main->{current_user}{color},
text => $main->toHTML($text),
});
$output->restrictToCurrentRoom;
push @ret,$output;
}
return \@ret;
}
<font color="{GET|$params.color}"><i><<a href="javascript:void(0)" onfocus="resetFocus()" onclick="{IF|$params.name ne $current_user.name}{IF|$current_user.popup_privatemsg}writePrivateMsg('{GET_ESCAPED|$params.name}','{GET_ESCAPED|$params.nick}','');{ELSE}insertText('/msg {GET_JS|$params.nick} ');{ENDIF}{ENDIF}return false;" style="color:{GET|$params.color}">{GET|$params.nick}</a> {DOFILTER|links|formatting|smileys|smileyshide}{GET|$params.text}{ENDDO}></i></font><br>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package Plugins::TextCommands;
use strict;
use lib qw(/home/www/web33/html/cgi-bin/test/);
use File::ReadBackwards;
return bless({
command_handlers => {
'texts' => \&texts_handler,
},
});
sub texts_handler
{
my($self,$main,$command,$text) = @_;
my @ret=();
my $file = './Variables/messages.log';
my $frb = File::ReadBackwards->new( $file ) or
die "can't read $file $!";
for(0..9)
{
my $output = $main->createOutput(
{
template => 'xyz',
texts => $frb->readline(),
nick => $main->{current_user}{nick},
color => $main->{current_user}{color},
text => $main->toHTML($text),
});
$output->restrictToCurrentRoom;
push @ret,$output;
return \@ret;
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package GTChat::Plugins::MyPlugin;
use File::ReadBackwards;
return bless({
template_command_handlers => {
FRB => \&read_backwards,
},
});
sub read_backwards{
my ($self, $main, $params, $output) = @_;
my ($tag, $file,$linecount) = @$params;
my $frb = File::ReadBackwards->new( $file ) or
die "can't read $file $!";
for(1..$linecount){
$$output .= $frb->readline();
}
}
![]() |
|< 1 ... 4 5 6 7 8 >| | ![]() |
74 Einträge, 8 Seiten |