Skip to content

Commit

Permalink
more interface stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
dgl committed Mar 16, 2002
1 parent 84b81eb commit 1966ae3
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 4 deletions.
12 changes: 9 additions & 3 deletions formats/default
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,23 @@ notice special = {notice-target $0 $2} {text $3}
notice private = {notice-nick $0}{notice-host $1} {text $2}
notice server = %05-$0%05-%n {text $2}

notice-target = %05-$0:$T%05-%n
notice-target = %05-$0:$1%05-%n
notice-nick = %03$0%n
notice-host = [$0]

message public = {message-nick $0} {text $2}
message private = {message-nick $0} {text $2}
message public hilight = {message-nick-hilight $0} {text $2}
message private window = {message-nick $0} {text $2}
message private = [$0($1)] {text $2}
message special = <$0:$2> {text $3}

message-nick = <$0>
message-nick-hilight = <%07$0%n>

message public own = {message-nick $0} {text $2}
message private own = {message-nick $0} {text $2}


action-nick = %_*%_ $0
action public = {action-nick $0} {text $2}
action private = {action-nick $0} {text $2}
Expand All @@ -53,7 +60,6 @@ ctcp own msg = {prefix-user} CTCP to $T: $2
ctcp msg = {prefix-user} $0 requested CTCP %_$2%_ from $T: $3
ctcp reply = {prefix-user} CTCP %_$2%_ reply from $0: $3

message-nick = <$0>
text = $0
channel = %_$0%_
reason = [$0]
Expand Down
4 changes: 4 additions & 0 deletions interfaces/ie.pm
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ sub exists {
return 1 if defined &{__PACKAGE__ . '::' . $_[1]};
}

sub query {
return 1;
}

sub line {
my($self, $info, $html) = @_;
my $target = defined $info->{target} ? $info->{target} : 'Status';
Expand Down
4 changes: 4 additions & 0 deletions interfaces/make-js-interfaces.pl
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ sub exists {
return 1 if defined &{__PACKAGE__ . '::' . $_[1]};
}

sub query {
return 1;
}

sub line {
my($self, $info, $html) = @_;
my $target = defined $info->{target} ? $info->{target} : 'Status';
Expand Down
4 changes: 4 additions & 0 deletions interfaces/mozilla.pm
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ sub exists {
return 1 if defined &{__PACKAGE__ . '::' . $_[1]};
}

sub query {
return 1;
}

sub line {
my($self, $info, $html) = @_;
my $target = defined $info->{target} ? $info->{target} : 'Status';
Expand Down
4 changes: 4 additions & 0 deletions interfaces/nonjs.pm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ sub exists {
return 1 if defined &{__PACKAGE__ . '::' . $_[1]};
}

sub query {
return 0;
}

sub header {
my($self, $config, $cgi) = @_;
print <<EOF;
Expand Down
6 changes: 5 additions & 1 deletion nph-irc.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use vars qw(
);

($VERSION =
'$Name: $ $Id: nph-irc.cgi,v 1.13 2002/03/15 22:05:27 dgl Exp $'
'$Name: $ $Id: nph-irc.cgi,v 1.14 2002/03/16 00:39:29 dgl Exp $'
) =~ s/^.*?(\d\S+) .*$/$1/;
$VERSION =~ s/_/./g;

Expand Down Expand Up @@ -642,6 +642,10 @@ sub irc_event {
defined $params->{text} ? $params->{text} : '');
}elsif($name =~ /^ctcp/) {
return irc_ctcp($name, $info, @params);
}elsif($name eq 'message public' && $params[2] =~ /^\Q$irc->{nick}\E\W/i) {
$name = 'message public hilight';
}elsif($name eq 'message private' && $interface->query) {
$name = 'message private window';
}

if(exists $format->{$name}) {
Expand Down

0 comments on commit 1966ae3

Please sign in to comment.